Skip to content

altenwald/ream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ream

Package Version Hex Docs

REAM is an event-sourcing system.

The REAM server is a simple TCP server that receives events from aggregators that are sending the event and a status update. The idea is:

  • The Aggregator receives a command.
  • The aggregator validates the command and generates:
    1. One or more events are generated by the aggregator and published into REAM.
    2. A modification in the state is performed in the aggregator and stored in REAM.
  • Subscribers, mainly projectors receive the event.
  • These subscribers perform a change in the schema and publish changes into projections.

Therefore we have three different but related storage:

  • Events. It's getting events in different streams. We can create as many streams as we need.
  • Aggregations. It stores the state for the aggregators based on the last processed event for a specific stream.
  • Projections. Stored the projections based on the information provided by the projectors.

The main idea is to provide an easy way for implementing aggregators and projectors to process the data we need in the way we need it.

Quick start

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

Installation

If available on Hex this package can be added to your Gleam project:

gleam add ream

and its documentation can be found at https://hexdocs.pm/ream.

License

Apache License Version 2.0, see LICENSE

Copyright 2023 Altenwald

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

REAM is an event-sourcing system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published