Comparing Akka persistency and SQL Server relational DB

Hello

I am coming from relational DB and monolithic application background and trying to understand Akka. There is one thing confusing me about Akka persistency. In relational DB’s you assign server instances, file names, logs, discs etc. and you provide consistency, recovery, security and all the other things about data around this structure. How do you do same things for Akka persistency? Where does persistent data resides, how do you manage persisted data in terms of consistency, recovery, security etc.?

NOTE 1: I assumed that we do not use any third party data store system such as mongo or mysql.

NOTE 2: If I am not wrong, I understood that Akka persistency is not relational, but it is key based.

Regards

Özcan Öz

You need a Akka Persistence plugin for the database of your choice. If you are familiar with relational DBs I would recommend Akka Persistence R2DBC Documentation or Akka Persistence JDBC

2 Likes

Thanks. I will be looking at them. But what I was really trying to ask is whether I could use Akka persistency with the same reliability as RDBMS without using any RDBMS?

I’d reiterate Patrik’s point. Akka persistence doesn’t provide any persistence on its own: it’s just an abstraction layer for providing ES/CQRS. As such, it requires a persistence plugin to actually store the data. That backend doesn’t have to be relational (Cassandra is a popular choice), but you must have some sort of backend.

And in response to your second note, Akka Persistence isn’t key based. Akka Persistence is an abstraction layer for providing ES/CQRS. As such, it’s somewhat similar to an ORM in that it is providing a “native” data access layer for the application code, and abstracting away the details of the underlying storage. (But instead of exposing the data as POJOs with a CRUD interface like an ORM, Akka Persistence is exposing the data as actors with a ES/CQRS interface. And instead of relational databases as a backend, it is using persistence plugins. So although it has some similarities to ORM, it’s not really “O”, nor “R”, nor “M”.)

Extending that analogy, asking if you can use Akka Persistence without using a database is like asking if you can use Hibernate without a database. The answer is no, you can’t. Neither can function without underlying persistence store.

David

2 Likes

Many thanks. That was the answer that I was looking for.