Akka and RDBMS?

175 views
Skip to first unread message

kraythe

unread,
May 13, 2016, 10:13:57 PM5/13/16
to Akka User List
Greetings, 

I have a legacy app with an existing RDBMS and I would like to convert it to be an actor system. I have been researching this and came across Akka persistence but the documentation is thin on how to wire this into legacy backends. Furthermore, because of the high volume of legacy analytics code outside my influence, rewriting the system to not use that database, or making radical schema changes, would be politically impossible so that rules out going to something like a journaled persistence mechanism for Akka persistence. That leaves me in a bit of a quandary. So I was interested in people who have had success integrating an actor system with RDBMS and how they went about the process. Any help would be useful. 

-- Robert

Justin du coeur

unread,
May 15, 2016, 11:56:54 AM5/15/16
to akka...@googlegroups.com
Well, keep in mind that Akka Persistence and Akka are very different things.  Akka Persistence specifically is the journaling-persistence approach; it sounds like that's a problem for you.  But Akka more generally works fine with traditional RDBMS, within some contraints.  In particular, if your database's API is blocking, then you'll want to confine the DB access to Actors that are designed for that purpose, and put them within their own dispatcher so that those blocks don't gum up the rest of the ActorSystem.

Besides that, though, it's pretty straightforward -- I've had my system in production for several years, with Actors on top of MySQL, and it's never been a problem...

--
>>>>>>>>>> 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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

ahjohannessen

unread,
May 15, 2016, 1:20:13 PM5/15/16
to Akka User List
One trick going from legacy to ES is to make initial "snapshot" migration events in order to get data over.

Matt Edge

unread,
Jun 10, 2016, 7:39:54 AM6/10/16
to Akka User List
I'll echo the answer Justin provided. I normally taken existing DB access code and wrapped it in an Actor with Futures without issues. Was there any specific use case outside of your typical DB interactions (such as trying to take advantage of Event Sourcing)?
Reply all
Reply to author
Forward
0 new messages