Coordinating Typed Actors
Typed actors, as we saw in Using Typed Actors, are a glamour child of object-oriented programming and actor-based programming. They bring together the all-too-familiar, convenient method calls and the benefits of actors. So, in an OO-application, instead of using actors, we may be tempted to use typed actors. However, just like actors, typed actors run in isolation and don’t provide transactional coordination—we’ll have to use coordinating typed actors for that.
Akka makes it really simple to make a typed actor a coordinating typed actor; we simply have to mark the corresponding interface methods with a special Coordinated annotation. To indicate that a sequence of calls should run under a coordinated transaction, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access