Hi Guys,

I've got an Eventsourcing & CQRS based application. Not using DDD or Akka 
persistence (because of certain restrictions).

Has anyone tried storing the *State* of an *Actor* to local file system 
instead into a remote database (Like snapshotting in Akka-persistence)  ? 

I was thinking of doing the following

1. *Command* arrives at *ActorA*
2. *ActorA* checks if it has a serialized *State* on local file system, if 
yes, it de-serializes the *State* and processes the *Command*, and then *ActorA 
*flushes it's *State* to disk holding only directory reference to the 
updated local serialized *State*.
3. If *State* does not exists on local file system then it replays all 
*Event*s from the database, process the *Command*,and then *ActorA *flushes 
it's *State* to disk holding only directory reference to the updated local 
serialized *State*.

I see the following benefits in doing this

   1. Much less memory usage since the state is not being kept in memory.
   2. I don't have to worry much about killing Actors in real time since 
   the State is only holding a String which is a reference to the locally 
   serialized State's location and creating Actors is cheap.
   3. Reduced trips to the database.
   4. It's faster to read data locally since we know the location of the 
   Serialized State, so probably help in building a speedy app :)

Am I seeing this right ? Or there are some problems that I have not thought 
of ? Any experience with this ? 

Chel

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to