Hi Konrad, Thank you, it's good to know we can reach out for expert help :)
We are also indexing this token/session data for query purposes, so my thought was to be able to get it from there even if deleted from the persistent store. I do see that deletion is not really a good thing. We don't expect there to be an ultra large scale of users in this store, but in terms of the unused sessions, we really would like to clean that up since we cannot be sure how many such dangling objects would be created. Can you please elaborate on your statement about "deadlines" for tokens? I'm not very clear about that. Thank you, your help is much appreciated! Lakshmi On Thursday, September 17, 2015 at 6:42:59 AM UTC-7, Konrad Malawski wrote: > > Hi there, > In general we provide architecture guidance and reviews as a commercial > service available to our customers, so if you're interested in a deep dive > into architecture details with us, please use the contact form > <https://www.typesafe.com/company/contact>. > > From a high level view though: > - It's an event sourced system, you should *never delete things*, and I > would not call it "irrelevant data" - it's valuable data you can apply > datamining to once you're ready to make that step in your business. > - You can either persist "deadlines" after which tokens can not be used. > - Active entities can be passivated > http://doc.akka.io/docs/akka/snapshot/scala/cluster-sharding.html#Passivation > to not use resources when they are not needed. > > Hope this helps > > On Tue, Sep 15, 2015 at 5:08 PM, lakshmi <[email protected] <javascript:>> > wrote: > >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Cheers, > Konrad 'ktoso' Malawski > Akka <http://akka.io/> @ Typesafe <http://typesafe.com/> > -- >>>>>>>>>> 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.
