Giter VIP home page Giter VIP logo

go-eventually's Introduction


Eventually

Domain-driven Design, Event Sourcing and CQRS for Go


Warning

Though used in production environment, the library is still under active development.

Note

Prior to v1 release the following Semantic Versioning is being adopted:

  • Breaking changes are tagged with a new minor release,
  • New features, patches and documentation are tagged with a new patch release.

Overview

eventually is a library providing abstractions and components to help you:

  • Build Domain-driven Design-oriented code, (Domain Events, Aggregate Root, etc.)

  • Reduce complexity of your code by providing ready-to-use components, such as PostgreSQL repository implementation, OpenTelemetry instrumentation, etc.

  • Implement event-driven architectural patterns in your application, such as Event Sourcing or CQRS.

How to install

You can add this library to your project by running:

go get -u github.com/get-eventually/go-eventually

Contributing

Thank you for your consideration ❤️ You can head over our CONTRIBUTING page to get started.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in go-eventually by you, shall be licensed as MIT, without any additional terms or conditions.

go-eventually's People

Contributors

ar3s3ru avatar bretanac93 avatar dependabot[bot] avatar evgeniylugin avatar github-actions[bot] avatar kostassoid 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

Watchers

 avatar  avatar  avatar  avatar

go-eventually's Issues

refactor: remove Subscriber interface

The eventstore.Subscriber interface is used to support push semantics of Event Processors: new Events are pushed from the Event Store to the Processor, similar to Pub/Sub approach.

Push semantics is not always supported by all the event streaming technologies out there, and generally speaking event streaming platforms prefer pull semantics instead (currently supported by the eventstore.Streamer interface).

We can remove any trace of this interface from the codebase for v0.1.0, and only rely on pull semantics. This makes things harder for Volatile Subscriptions, but we could add some support for the Stream* methods to fetch events from the latest one available.

Make eventstore/postgres return eventstore.ErrConflict

Currently, the eventstore/postgres implementation does not return a value of ErrConflict if there is a optimistic concurrency error: the exception is only raised on the pSQL code and not adapted to the Go error type.

This means that any error handling code based upon eventstore.ErrConflict won't work.

Add support for Snapshots

Context and problem statement

Aggregate Roots are typically "small", where the number of Domain Events registered for each AR is in the order of 100-1000.

In such cases, there is no problem rebuilding the state of an AR by the beginning of its Event Stream, as pulling ~1000 events back into the application should still be pretty efficient.

However, there are cases where an AR can record a pretty high number of Domain Events, reaching a point where replaying the Event Stream from the very beginning each time can become a performance bottleneck.

Solution

To alleviate this issue, we can use a Snapshot, which contains the state of the AR at a specific point. Snapshots can be used as a starting point for the AR rehydration to reduce the number of Events that need to be replayed from the Event Stream in the Event Store.

Move to submodules structure

Instead of having a single eventually-go module with all dependencies, it might be a better idea to split functionalities in submodules to limit the number of indirect depedencies pulled from packages requiring eventually-go.

feat: centralize Event Registry

Due to the current limitations of Go, the postgres implementation of the Event Store needs an Event Register to be able to deserialize events from the remote storage into a Go object.

However, this concern is somewhat general to any possibleEvent Store implementation. We can then extract this piece of code in a separate module.

chore: add Github Actions to automate versioning release

I hate manual tagging because, as everything tasked to a human being, the human factor brings inherent error.

Since we're all ✨ software engineers here ✨ we can automate the tagging process when merging on main -- maybe after the tests have passed?

NOTE: for each feature, a minor release should be used, and fix or minor branch, a patch release should be used instead.

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.