Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This depends a little on what you mean with "model" - you can either refer to the "execution model" or the "programming model" (and perhaps other models as well).</p> <p>For execution models, there are basically two: thread-based or event-based. The Scala standard actor library contains both. The thread-based uses one thread for each actor, whereas the event-based uses a thread-pool. The former is more intuitive to understand, the latter is more efficient. Akka is built on the event-based model.</p> <p>For programming model, there is a big difference between the scala standard library and Akka. In the scala standard library, you basically implement the "run" method - and if you want to wait for an incoming message, you get yourself into a waiting state (by calling "receive" or "react"). So, the programming model follow the "thread-metaphor". However, in Akka, the programming metaphor is that you implement a few life-cycle methods - but the "run"-method is written inside the framework. It actually turns out that this programming model works a lot better with the event-based execution model as well.</p> <p>If you are interested in the different execution models and programming models of scala standard actors I have written <a href="http://dearjunior.blogspot.se/2011/05/scala-actor-waiting-for-godot-vladimir.html" rel="noreferrer">a</a> <a href="http://dearjunior.blogspot.se/2011/05/vladimir-galore-lots-of-threaded-scala.html" rel="noreferrer">few</a> <a href="http://dearjunior.blogspot.se/2011/05/how-heavy-is-estragon-event-based-scala.html" rel="noreferrer">posts</a> on the issue. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload