Hi, I am puzzled as to understand exactly how to properly use a persistant actor for a use case that i am trying to solve.
To summarize the problem quickly, I have a legacy CMS system "Lg" which hold publications' metadata records in a database. The publication metadata are recorded with Concept(i.e. terms) Identifier coming from a taxonomy (e.g. authors, topics, etc..). On the other side i have a Taxonomy server, which provide the those concept. The problem i have to solve is updating the metadata record based on the change happening in the taxonomy. Indeed, the taxonomy gets edited and refined all the time. The Taxonomy Server publishes his changes each time something actually change i.e. we have a change history. So this is what has motivated me to use a Persistent actor for the matter. Indeed, i need to update the metadata records, and in the face of shutting down the system or whatsoever, i need to restart with the last change from the taxonomy, that was propagated in the "Lg" system i.e. its records. 1 - In the simplest form, I would use 1 persistent actor that goes and pull the changes from the taxonomy server, generate command from it, then upon receiving a command, record the event (if the command is valid of course), and then update its state by recording this last change (i.e. the change as present in the Taxonomy server history, such that we could restart from there the next time, let say after the time of that change) 2 - The problem: when can I exactly connect to the CMS and update its record according to the change ? 2.1 - Indeed, i can't do that in the update state function, because upon recovery it would go over the CMS records again. Which we do not want. 2.2 - The other issue is, if the update of the record fail when done, what to do ? I mean i can schedule retry but again, whatever or whoever (if it is another actor) does the update of the records, will also needs also to know what is the last update that was successful. 2.2.3 - If it is another Actor, i see it being persistent and propagating the same problem. At some point someone has to execute the actual command not just generate an event out of it. It sounds like updating a reading part of the system somehow. But i am not sure here. Best, Maatari -- >>>>>>>>>> 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.
