I am now starting to learn the actor programming model. For practice I'm planning to use the Akka actors to generate random user interactions.
For starters I'm thinking of implementing a simple state machine like: user login, then perform 0 or more actions and then go to a final state (logout).
I'm thinking of the following actor hierarchy. The OrchestratorActor
receives a config of the traffic specs it should generate and then delegates to one of the actors involved in the start states. Then, for each "level" the actors delegate to a random actor from the layer beneath.
Questions:
- What do you think of the actor hierarchy proposed?
- I'm going to use the scheduler to delay the "actions". The
OrchestratorActor
must ensure the traffic it generates matches the given conditions (e.g. 80% legit, 20% fraudulent traffic or something like that). How can I do that? Splitting the traffic into chunks (10 minute) and making sure that the conditions are met for the current chunk?
Thank you in advance! I don't need code, only ideas no matter how smart/crazy :)
Aucun commentaire:
Enregistrer un commentaire