Giter Site home page Giter Site logo

eventsourcing-java-example's Introduction

Event sourcing example in Java

A simplified (in memory) example of Event Sourcing implementation in Java for banking domain. Repository is splitted into exercises adding step by step more functionality towards good design of event sourcing with CQRS. You can play around and try to implement exercises or You can check out solution branches.

Step 1 - In memory iplementation of event sourcing

alt tag

  • Provide simple in-memory implementation of Event Store
  • Make all test passing using event sourcing

soultion

Step 1a (optional) - Unit of work pattern

  • Implement Unit of Work pattern where events are stored outside of aggregate

soultion

  • WIP

Step 1b (optional) - Projections

  • Implement Projections on Account to get number of transactions performed on account
  • eventStore.store() method shoud accept Event playload instead of domain Events
  • what should be api of eventStream()?

soultion

  • WIP

Step 2 (optional) - Optimistic locking

  • add optimistic locking

soultion

  • WIP

Step 3 - new Aggregate extraction

alt tag

  • Refactor to move all money transfer related stuff to separate aggregate
  • New aggregate will be also using Event Store

soultion

  • WIP

Step 4 - adding CQRS

alt tag

  • Apply CQRS rule and separate the command and reading side
  • Solution will use Eventual Consistency approach

soultion

  • WIP

Step 5

soultion

  • WIP

eventsourcing-java-example's People

Contributors

michal-lipski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eventsourcing-java-example's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.