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

Plugin proposal: Akka.Persistence.PostgreSQL #944

Closed
davidflerlage opened this issue May 4, 2015 · 5 comments
Closed

Plugin proposal: Akka.Persistence.PostgreSQL #944

davidflerlage opened this issue May 4, 2015 · 5 comments

Comments

@davidflerlage
Copy link
Contributor

I just finished the initial implementation of a PostgreSQL persistence plugin. I am hoping to submit a pull request later today or tomorrow. If you are curious, you can find the code here: https://github.com/davidflerlage/akka.net/tree/akka-persistence-postgresql.

This plugin is largely a port of the Sql Server plugin, with some inspiration from the JVM Akka PostgreSQL plugin, https://github.com/okumin/akka-persistence-sql-async. There is some duplication between the Sql Server and PostgreSql plugins that we might want to address. I imagine that any future sql plugins will also need some of the same code.

I have a question about the best way to handle database initialization on the build server during automated testing. I see two main options:

  1. Drop and create the database each time.
  2. Drop and recreate just the tables each time.

In either case, I would provide a script.

The Sql Server plugin uses LocalDb, so it can easily recreate the database each time the tests run. I do not think PostgreSQL has a LocalDb equivalent, so that's not really an option here. I also don't think integrated security is an option, so user credentials need to be persisted somewhere.

I am leaning towards option 1, but I am eager to hear everyone's thoughts.

@Horusiath
Copy link
Contributor

@davidflerlage The Akka.Persistence.SqlServer plugin will be rewritten using ADO.NET async API soon - we know that this could probably introduce some problems with testing. I'll try to address problem with repeatable parts of all SQL databases. Concerning testing I think that drop/create tables is better option, but this should also ensure if database is created on first run and eventually create it. This test suite also should be deployed as separate build task (there is such for SQL Server).

Also we decided that only limited set of the persistence plugins should be part of akka core repository and have official support. @akkadotnet/developers should we include PostrgreSQL to our contrib repo and give support to it?

@annymsMthd
Copy link
Contributor

+1
On Mon, May 4, 2015 at 11:34 PM Bartosz Sypytkowski <
notifications@github.com> wrote:

@davidflerlage https://github.com/davidflerlage The
Akka.Persistence.SqlServer plugin will be rewritten to using ADO.NET
async API soon - we know that this could probably introduce some problems
with testing. Also we decided that only limited set of the persistence
plugins should be part of akka core repository and have official support.
@akkadotnet/developers
https://github.com/orgs/akkadotnet/teams/developers should we include
PostrgreSQL to our contrib repo and give support to it?


Reply to this email directly or view it on GitHub
#944 (comment).

@skotzko
Copy link
Contributor

skotzko commented May 5, 2015

+1

@taswar
Copy link

taswar commented May 5, 2015

+1

On Tue, May 5, 2015 at 11:15 AM, Andrew Skotzko notifications@github.com
wrote:

+1


Reply to this email directly or view it on GitHub
#944 (comment).

@Horusiath
Copy link
Contributor

Merged

Horusiath pushed a commit to Horusiath/akka.net that referenced this issue Jul 4, 2015
…re. See issue akkadotnet#944

 -Largely ported from Akka.Persistence.SqlServer plugin

 -Event journal and snapshot store specs passing

 -Added separate build task for PostgreSql tests

 -Added initial draft of readme and nuspec file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants