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.SqlServer #667

Closed
Horusiath opened this issue Feb 21, 2015 · 1 comment
Closed

Plugin proposal: Akka.Persistence.SqlServer #667

Horusiath opened this issue Feb 21, 2015 · 1 comment
Assignees

Comments

@Horusiath
Copy link
Contributor

Add Journal and (optionally) SnapshotStore implementations using SqlServer database on the backend. Since SqlServer is considered an important part of a .NET dev culture, I think it should be placed in contrib lib with support from Akka.NET community.

  • It also should provide some easy way to check and run necessary database schema update if required.
  • I think that it should support SqlServer 2008 and above.

Minimal Journal configuration necessary to make plugin work with Akka.Persistence correctly:

akka.persistence.journal {
  plugin = "akka.persistence.journal.sql-server"
  sql-server {
      class = "Akka.Persistence.SqlServer.SqlServerJournal, Akka.Persistence.SqlServer"
      plugin-dispatcher = "akka.actor.default-dispatcher"

      # connection string to SqlServer database
      connection-string= "Server=myServerAddress;Database=myDataBase;User Id=myUsername;"
  }
}

In case if plugin will also implement SnapshotStore based on SqlServer, this is minimal configuration necessary to make plugin work with Akka.Persistence correctly:

akka.persistence.snapshot-store {
  plugin = "akka.persistence.snapshot-store.sql-server"
  sql-server {
    class = "Akka.Persistence.SqlServer.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
    plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"

     # connection string to SqlServer database
     connection-string= "Server=myServerAddress;Database=myDataBase;User Id=myUsername;"
  }
}

Integration tests can be done fairly simply using Akka.Persistence.TestKit library (see Akka.Persistence.TestKit.Tests for more details).

References:

  • MemoryJournal implementation based on AsyncWriteProxy. For SQL databases more adviced is to use SyncWriteJournal instead (see canonical Akka's LevelDbJournal)
@Horusiath
Copy link
Contributor Author

Completed by #842 and #901

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

2 participants