Event Store

Event Store JVM client

Yaroslav Klymko aka @t3hnar

Event Store server

The open-source, functional database with Complex Event Processing in JavaScript.

Event-sourcing

Event Store stores your data as a series of immutable events over time, making it easy to build event-sourced applications.

Projections

Projections allow you to react to events as they are written, and to create new events when interesting combinations occur. You can use the same model for writing temporal correlation queries that run over historical data and on into the future.

Open Source License

Event Store is licensed under a 3-clause BSD license, whether it runs on a single node or as a high availability cluster. Commercial support services are available.

Client Interfaces

Event Store has a native HTTP interface based on the AtomPub protocol which is plenty fast enough for the majority of use cases. For high-performance use, there are native drivers for .NET, Akka and Erlang

High Availability

Event Store can run as a cluster of nodes containing the same data, which remains available for writes provided at least half the nodes are alive and connected. See HA in action at ha.geteventstore.com.

Great Performance

Whilst performance depends on configuration and use patterns, we’ve benchmarked Event Store at around 15,000 writes per second and 50,000 reads per second!

Runs on Windows, Linux or Mac OS X

Event Store is written in C++, C# and JavaScript. The server runs on Mono or the .NET CLR, on Windows, Linux or Mac OS X

Event Store JVM client

  • Written in Scala
  • Based on Akka IO
  • Has Java API

Cool features

  • Non blocking
  • Scala API is a bunch of case classes
  • Automatic reconnections
  • Everything is configurable via Typesafe config
  • Catchup subscriptions

Use it via sending messages to an actor

      
val connection = system.actorOf(ConnectionActor.props())
connection ! ReadEvent(EventStream("my-stream"), EventNumber.First)
    
      
val connection = system.actorOf(ConnectionActor.props(settings))
implicit val readResult = system.actorOf(Props[ReadResult])

connection ! ReadEvent(EventStream("my-stream"), EventNumber.First)

class ReadResult extends Actor with ActorLogging {
  def receive = {
    case ReadEventCompleted(event) => log.info("event: {}", event)
  }
}

Use it via typed API


val connection = EsConnection(system)
val msg = ReadEvent(EventStream("my-stream"))
val future: Future[ReadEventCompleted] = connection.future(msg)
readEvent.onSuccess {
  case ReadEventCompleted(event) =>
}
    

btw, we are using MAGNET pattern


def future[OUT <: Out, IN <: In](
      out: OUT, credentials: Option[UserCredentials] = None)
     (implicit outIn: OutInTag[OUT, IN]): Future[IN] =
    
      
val msg = ReadEvent(EventStream("my-stream"))
val future: Future[ReadEventCompleted] = connection.future(msg)
      
      
implicit object ReadEventTag
  extends OutInTag[ReadEvent, ReadEventCompleted]

def future[ReadEvent, ReadEventCompleted](ReadEvent(..))(ReadEventTag)
      

More about magnet pattern

http://spray.io/blog/2012-12-13-the-magnet-pattern

Future plans

  • Add support for Event Store cluster
  • Implement Event Store Journal for Akka Persistence
  • Switch legacy Tcp Pipeline code to new Reactive Streams
  • Add support for Event Store cluster with sharding

Thanks


Project can be found at github.com/EventStore/EventStore.JVM

i