tools4j / elara

Efficient, zero garbage framework to implement event sourcing applications
MIT License
16 stars 7 forks source link

Continuous Integration Maven Central Javadocs

elara

The tools4j elara project provides an efficient, zero garbage framework to implement event sourcing applications.

The event store is pluggable; a default implementation is available for chronicle queue.

Elara uses direct buffers as defined by the agrona library. For this reason elara applications are perfectly suited to integrate with SBE and aeron UDP/IPC messaging.

The elara library is used productively in applications in the financial industry. However elara is also under active development and some new plugins and features may be considered experimental especially if they are not released yet.

Overview

Introduction

There are excellent introductions to event sourcing out there. Some of our favorite links are

Elara Event Sourcing

A typical elara event sourcing application performs the following main functions:

These main functional modules can be processed in a single process or in separate applications. Elara supports different application types for different subsets of those main modules (some app types include additional function modules as well).

In the simplest case, a single application performs all 4 main functions from above.

Elara All-In-One Application

Application type that performs all main functional modules in a single threaded application.

Elara All-In_One App

Terminology

Plugins

Plugins are optional features that can be configured when defining the application context. Third party plugins can be provided by implementing the plugin API.

Plugins can define their own state and applications can optionally access plugin state when defining the plugins in the elara context. By convention plugins define commands and events with negative types which marks them as 'admin' types so that they can be easily distinguished from non-negative application types.

Elara provides the following default plugins:

Samples

Banking application

A simple banking app that supports the following commands:

Sample code and test to run:

Timers

Timers are tricky with event sourcing. Elara provides timers through the timer plugin with support for once-off and periodic timers. The timer sample app demonstrates both timer types in action:

Maven/Gradle

Maven

<dependency>
        <groupId>org.tools4j</groupId>
        <artifactId>elara-core</artifactId>
        <version>1.7</version>
</dependency>

Gradle

api "org.tools4j:elara-core:1.7'

Download

You can download binaries, sources and javadoc from maven central:

FAQ

Credits