Recent trends in computer architecture make concurrency and parallelism an essential ingredient of efficient program execution. The actor model of concurrency allows you to express real-world concurrency in a natural way using concurrent processes that communicate via asynchronous messages.
Scala is a programming language for the Java virtual machine, providing excellent support for both object-oriented and functional programming. By including a powerful actor framework in its standard library, Scala offers a compelling approach to tackle concurrent programming. Scala's actors let you apply the actor concurrency model to the JVM, enabling real-world solutions that are efficient, scalable, and robust.
Published by Artima, this is the first book on Scala's actors, co-authored by the creator and lead maintainer, Philipp Haller, and Frank Sommers. Starting with the fundamentals of the actor concurrency model, this book offers a comprehensive tutorial on practical programming with actors in Scala. It enables you to leverage the full power of today's and tomorrow's multi-core processors by describing both basic and advanced features of Scala's actor framework in-depth.
The book is currently available as a PrePrintâ„¢ edition here:
Looks like a possibly interesting book, and the intro chapter preview is good.
However, neither the intro chapter nor the table of contents posted give me a good idea of what the scope of this book will be.
Is it mainly intended as an introduction to actor-based programming for people not yet familiar with that topic, or will there also be substantial sections of more advanced material?
Will it be interesting for someone who has read 'Programming Erlang' by Joe Armstrong?
Would there be anything along the lines of running a service on a cluster and upgrading it one server at a time, without ever taking the service as a whole down?
From the sounds of things, it is geared specifically toward Haller's actors library. Therefore, it is not precisely "Actors in Scala", but "Haller's Actors in Scala".
> Is it mainly intended as an introduction to actor-based > programming for people not yet familiar with that topic, > or will there also be substantial sections of more > advanced material?
The book's focus is to teach you how to effectively use the actors library that's part of the standard Scala distribution ("Scala actors"). My co-author is Philipp Haller, the creator of that API. Much of the preprint is devoted to introducing you to the API, including both basic and some advanced uses.
There are at least 3 "advanced" topic areas that we have considered for inclusion. Some of that is already part of the book and some will be forthcoming in another preprint and, of course, in the final version:
(1) A more advanced introduction to message-based programming. Since actors are about pure message-based programming, we thought it was important to include a good overview of what's possible with message-based concurrency (vs, say, shared-state concurrency). Of course, we had to keep this discussion focused on actors (there are non-actor message-based concurrency models, too, such as MPI). Two chapters in the preprint address this topic: The introductory chapter on shared-nothing concurrency, and the second chapter on messages. These chapters also describe briefly how the actor idea came about, i.e., the rationales for actors.
(2) Advanced uses of the Scala actor API. There are currently 2 chapters devoted to customizing the performance and of the actors API and runtime.
(3) Using the actors API with existing Java APIs, especially with Java EE. This chapter is not part of the preprint yet.
> Will it be interesting for someone who has read > 'Programming Erlang' by Joe Armstrong? >
Absolutely!
> Would there be anything along the lines of running a > service on a cluster and upgrading it one server at a > time, without ever taking the service as a whole down?
We are considering including something like that in the context of using the actors API within some enterprise use-case scenarios. I'll post more about this soon, please stay tuned.
And thanks for your interest in the book! Please keep the feedback coming.
> From the sounds of things, it is geared specifically > toward Haller's actors library. Therefore, it is not > precisely "Actors in Scala", but "Haller's Actors in > Scala".
The book's focus is the actors API that's part of the Scala distribution. So, yes, that's "Haller's actors;" however, you could also call that the "default" actors or the "standard" actors API. Whatever the name, that API is the focus of this book. That said, many exciting things are going on with actors outside of the standard actors API. But we feel that this book needs to stay focused; undoubtedly, some of the other Scala actor implementations will have their own books, too.