Hi!

In my current project we are using akka-persistence with LevelDB. Our 
application is completely event sourced using akka-persistence, i.e there 
are no other mechanism for persisting business state in use. 

However, we have identified the need for being able to convert persisted 
messages, when deploying a new version of the application with changes 
effecting the persisted data structure (.ie new attributes, deleted 
attributes, changed datatypes). As of now, we must completely discard our 
business data every time we deploy a new version, in order to avoid 
exceptions when replay of persisted messages upon startup.

I would believe that many other projects face the same problem, and believe 
that this could be solved with a general mechanism in akka persistence.

I have done a poc on "daisy-chaining" persistence plugins, by creating my 
own plugin ("proxy-plugin") and have this plugin forward all messages to 
the actual persistence plugin (leveldb or cassandra). In addition we are 
using our own serializer, serializing all messages to json strings prior to 
persisting (to avoid class version issues).

In my own proxy-plugin I can now register mapper classes (these 
implementing a common apply() trait, intercept messages and modify the 
persisted json-based messages from previous versions to the current 
deployed. This way we can keep our persisted business messages across 
versions of the message classes, without the need for discarding old data. 
The poc now is working ok for journals, but not yet for snapshots.

There are also other cross-cutting concerns related to persistence where 
such a feature could be useful, for instance auditing

Is this something that could be implemented in akka-persistence?


-- 
>>>>>>>>>>      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.

Reply via email to