Please enable JavaScript.
Coggle requires JavaScript to display documents.
Akka Essentials (Dispatcher p110 (Types (Dispatcher (default) p116 (event…
Akka Essentials
-
each dispatcher runs on a thread, dispatch messages to mailboxes and allocate on heap to the executor threads
Types
Dispatcher (default) p116
event-based, binds a set of actors to a thread pool (either thread pool or fork join pool) backed by a BlockingQueue
-
-
one thread per actor, cannot be shared among actors
optimized for blocking code (I/O, long-running calculations)
-
-
Calling-thread dispatcher p118
-
Software Transactional Memory p180
mark memory that need concurrency control with Ref(value), Ref is bound to a single memory location entire lifetime
Ref is mutable cell containing immutable value, use CAS to enforce concurrent changes from Refs in the transaction
used when implementing shared state model and providing consensual, stable view of the state across threads
CommitBarrier
like CountDownLatch, provide synchronization point across actors in a transaction
-
-
atomically(Object msg)
if msg is Coordinated message, participates in the incoming coordinated tx context.
else create a new tx context and run there
-
-
-
Mailbox
dispatcher arranges threads to run Mailbox.run() for mailboxes it manages.
Mailbox.run() will dequeue message and apply current actor behavior accordingly
-