/rill

Clojure Event Sourcing toolkit

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

Rill Event Sourcing Toolkit

A Clojure foundation for CQRS/Event Sourcing.

This is an alpha release.

We are using Rill in production but things are still in flux. Breaking changes to the API are likely, though we have every intention of making upgrades straightforward.

Documentation is missing for almost everything.

Dependency specification

Latest stable release:

From version 0.1.7 on, the durable backends for rill are split out from the core, which only includes an in-memory backend.

[rill/rill "0.1.10"]
[rill/rill-psql "0.1.10"] ; to include postgres store

Rill provides protocols and/or implementations for:

EventStore

The system of record in an Event Sourcing architecture; a collection of event streams with provisions for appending and retrieving events.

Rill provides two complete implementations of the EventStore protocol; an ephemeral, in-memory store for testing/development, and a durable implementation using Postgresql as a backing store.

Repository

Aggregate storage implemented on top of an EventStore. Aggregates are implemented as reductions of event streams.

Command handler

Rill implements a fairly simple command -> repository -> aggregate -> events loop for evaluating commands and storing the resulting events in the event store. Synchronous event triggers are implemented with the provisional observers hook.

Messages; commands and events

Rill provides mechanisms for defining message schemas and hooks for integrating messages with the command handler, event store and repository.

Event Channels

Event channels are core/async channels that provide “real time” views on event streams.

Changelog

  • 0.2.0-RC4
    • Fix exception reporting for non-SQLExceptions
  • 0.2.0-RC3
    • Also provide rill’s stream-id in the metadata
  • 0.2.0-RC2
    • Put rill-specific metadata in separate database columns for rill-psql
  • 0.2.0-RC1
    • Bump version because of breaking schema change
    • Fix concurrency issues with cursors in all-event-stream

      Run file:rill-psql/resources/rill_psql/migration-0_2_0.sql to upgrade your Postgres event store.

      This will break older versions of rill. You MUST upgrade all clients to 0.2.0 or higher.

  • 0.1.11-SNAPSHOT
    • rill.aggregate/aggregate-ids multimethod now takes [primary-aggregate command] as arguments.

      this is a breaking change.

  • 0.1.10
    • Fix regression in event channels & improve testing
  • 0.1.9
    • Fix: ignore cursors when comparing messages in tests
  • 0.1.8
    • Make cursors explicit in messages
  • 0.1.7
    • Split out durable implementations in their own projects
    • Fix performance bug when retrieving long event streams
  • 0.1.6
    • Generalize process managers into observer/notifications
  • 0.1.5
    • Improved command-result= testing function
  • 0.1.4
    • Auto-retry queries when streaming all events in psql event store
  • 0.1.2
    • Add process managers
  • 0.1.1
    • ??
  • 0.1.0
    • First beta release