Hi Akka users, I've recently been learning about Akka persistence, and we have some of our services based on persistent actors. I am trying to model a user service using persistence. Now, we have persistent actors for other entities, but they have explicit CRUD operations to manage them such that we won't have any ghost entities hanging around. The user service is different.
The use case is as follows: - A new (unregistered) user entering the system gets a token before they actually signup. The token will be their identifier until registration. The state of the user attached to this token will be persisted/looked up as they go through a registration/authorization process involving multiple API calls. - Once registration is successful, they get a user id. Subsequent activity is tied to this user id and a session id. The token previously created will be discarded from that point onward. - For query purposes we also use a separate indexing service based on a different data store. However the indexing is not expected to be up-to-date and may refresh at intervals. So we won't be using it for time-sensitive token/session lookups. Originally, our idea was to use persistent User Actors that would manage all user info but only after a user is created. We could also have a SessionActor as a child of the UserActor, and that would only persist the latest session info always. Finally, we would add a persistent UserToken actor that manages unregistered tokens. If the registered user returns after an idle session has expired we have a chance to delete the associated lingering child session. But the main *question for me is how to handle idle/timed out token as well as session data that doesn't have an explicit termination*, but also needs to be expired/deleted because it is irrelevant data that will end up cluttering the datastore. What is the recommended approach for this case? Thanks for your help. Lakshmi -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
