Akka persistence with Neo4J or any other graph-centric store

301 views
Skip to first unread message

Soumya Simanta

unread,
Jul 26, 2014, 10:38:05 PM7/26/14
to akka...@googlegroups.com
I'm new to Akka persistence. I like the concept and would like to evaluate it for a new application I want to build. 

I've a stream of data coming in. My events will be derived from stream elements in a window by time or number of elements. These events are best represented as a graph. Any ideas about what's the best to way to store and query these events into a graph DB using Akka persistence. Has anyone else any experience with a similar use case? Currently I'm looking at Neo4J but I'm open to other stores as well. 

Thanks
-Soumya


Roland Kuhn

unread,
Aug 12, 2014, 9:30:42 AM8/12/14
to akka-user
Hi Soumya,

sorry for the late reply. Akka Persistence is about persisting stateful Actors such that they can survive infrastructure failures and recover states from the past. As such the storage is divided per actor and that piece is always a linear sequence of events. Of course the state that your actor builds can be a graph, but that would be transparent to the persistent storage (which just remembers the changes you want to apply to the graph). What I mean to say is that Persistence and Neo4j are orthogonal as far as I can see.

Regards,

Roland

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



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


Ryan Tanner

unread,
Aug 12, 2014, 10:55:56 AM8/12/14
to akka...@googlegroups.com
I've been toying with this idea lately.  Not so much using Neo4j as the storage for Akka Persistence but rather using Akka Persistence to store the events that cause changes to Neo4j so that the graph can be rebuilt later on without going all the way back to source data (which takes a long time for us).

We use Play as an API/integration layer between Neo4j and Elasticsearch and sometimes there are bugs that cause them to get out of sync with each other.  Presently we use Rabbit to persist updates that fail for whatever reason but I'm thinking about using Akka Persistence.  

Updates come into Play -> sent as commands to a persistent actor -> Akka persists those commands -> On successful persistence, updates are applied to Neo4j -> Neo4j sends back its results (created/updated graph nodes) which are indexed in ElasticSearch.

The advantage over our current architecture is that we could essentially roll back our graph to a given point in time (we keep snapshots of ES/Neo at 24 hour intervals).  Right now we just have these "crawlers" that run in Play to identify and fix nodes that are broken or out of sync but it'd be nice to just roll back to before a bug was introduced and resend the updates to Neo and ES from scratch rather than fix them piecemeal later on.
Reply all
Reply to author
Forward
0 new messages