What is the precedent for an Accor actor?

Am I in a mess about the applicability of Akka Persistence and permanent characters, when should I use a permanent Actor?

Taking, for example, from the Cart module of this shopping application, will each Cart user session be a busy actor with a corresponding unique persistenceId?

What is the usability in real applications? How does the request side handle the persistent participant state? When is a regular actor not useful in real applications?

Saving states or saving messages is the same thing? Are? What is the difference when I should use each?

Can someone give me some examples?

+4
source share
1 answer

It will be a very stubborn question, and a highly stubborn answer.

Imagine you have a task management system, for example. Jira or either. Say you have the following cast of actors:

  • Project 1
    • Ticket 1
    • Ticket 2
  • Project 3
    • Ticket 3

If the projects and tickets are actually regular participants, then you have, in comparison with the standard approach (request, etc.), the following advantages:

  • Bringing an actor up and down restores his state - therefore more complex queries and matching with the actor’s code. In addition, if your application does not work, rebooting essentially loads the data with the entire history (below)
  • / Akka - (.. ), .
  • ( , , , / ). - - , , .
  • - - , , , .

- (.. ), (.. )

+4

All Articles