Idea: eventstorageengine with mapDb

Hi

I am experimenting with mapDb as eventStorageEngine … the implementation stays a java collection, but it can be stored on file system -> http://www.mapdb.org/.

this is an early draft: https://github.com/toolisticon/axon-extensions/blob/master/axon-mapdb/src/main/kotlin/MapDbEventstorageEngine.kt

used like this:

fun main(args: Array<String>) {
  val db = DBMaker.fileDB("./.tmp/eventstore.db").closeOnJvmShutdown().make()
  val storage = MapDbEventStorageEngine(db)
  val embeddedEventStore = EmbeddedEventStore(storage)

  val projection = BankAccountProjection()

  val configuration = DefaultConfigurer.defaultConfiguration()
    .configureEventStore { _ -> embeddedEventStore }
    .registerModule(EventHandlingConfiguration()
      .registerEventHandler { _ -> projection })
    .registerQueryHandler { _ -> projection }
    .configureAggregate(BankAccount::class.java)
    .buildConfiguration()
  configuration.start()

  val commandGateway = configuration.commandGateway()

  println("accounts: ${projection.accounts}")

  //commandGateway.sendAndWait<Any>(CreateAccountCommand("1"))
  println("accounts: ${projection.accounts}")
  println("events: ${storage.events.values}")

  assertThat(storage.events).hasSize(1)

  commandGateway.sendAndWait<Any>(DepositCommand("1", 100))
  println("accounts: ${projection.accounts}")
  println("events: ${storage.events.values}")

}


I am getting some (minor?) issues with serialization and reflection ... 

Question: What do you think about this approach? Has this been done before? Is it worth to poceed or a waste of time?
Looking forward for feedback

Jan

Hi Jan,

we have helped customers with MapDB specific implementations of an event store (used as an archive, in their case). They have eventually moved away from it, as they had some issues and upgrading versions was painful.
We’re going to do some interesting announcements next week on the AxonIQ conference (and in media thereafter) that might present a better alternative. Just hang on for a while.

Cheers,

Allard

Hi Allard

I am hanging on … and am getting curious … what could the intersting announcements have been … any news/links for me?

Thanks
Jan

We have announced Axon 4 last week. AxonDB and AxonHub will be merged into a single product, called AxonServer. There will be an open source (and free) version available, too.
We’re working on final touches, and expect to release it on Oct 18th. There is a webinar on that day as well.

News will start flowing as of next week with further details.

Cheers,

Allard