Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document which DB dialects support durable state store #612

Open
johanandren opened this issue Nov 3, 2021 · 6 comments
Open

Document which DB dialects support durable state store #612

johanandren opened this issue Nov 3, 2021 · 6 comments

Comments

@johanandren
Copy link
Member

And how to configure them for that.

Sister ticket to akka/akka#30857

@johanandren
Copy link
Member Author

I'm not entirely sure about this myself, we only have durable state schema for Postgres so far AFAICS

@patriknw
Copy link
Member

patriknw commented Nov 8, 2021

It's only implemented for Postgres so far.

@hirsivaja
Copy link

Hi guys,

the durable state store is very interesting new feature in akka framework.

I have tried it with Postgres and it works fine.

I would like to keep customer deployments as simple as possible so I would like to embed the used database in my application. I tried using using Apache Derby and H2 database, but like you say they do not seem to be supported for durable state. Embedded (in-mem) db would also be easier to use in unit tests (no need for docker).

Are there any plans to add support for any other databases than Postgres? Any embeddable dbs in the pipeline?

@patriknw What exactly needs to be added to support a db? Could a developer add the support themselves (for example extend some critical piece of code) or are the changes needed in the akka code?

If you feel like this is the wrong place for this question, I can create an issue someplace else.

Thanks!

@johanandren
Copy link
Member Author

Hi @hirsivaja , the changes needed are only here in the akka-persistence-jdbc plugin. A bit of work for each supported database, hard to say exactly how much (as usual with software). If you would like to contribute durable state support for a specific database dialect is definitely welcome!

@hirsivaja
Copy link

Thanks for the quick response.

I know so little about akka internal architecture that it would be quite impossible for me to fix this on my own.
I can see from the code in DurableStateQueries.scala that some effort to support H2 has been taken already. Hopefully at some point in time you guys will have a chance to finish the work.

In the mean time I have plenty of other options. For example I can continue using the Event Sourcing. Even though in my use case the Durable State would fit better as I am only interested in the final state, the Event Sourcing is fine too.

@hirsivaja
Copy link

Hi @johanandren,

I looked into this a little bit more. Seems like it might work after all.
Earlier I was using H2 version 2.0.202 and got some errors.

But when using the same H2 version as in

"com.h2database" % "h2" % "1.4.200",

I could persist some data.

I was trying to check your documentation but did not see any mention about which version of the databases to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants