Coder Social home page Coder Social logo

go-eventsourcing-cqrs's Introduction

Go-eventsourcing-cqrs

A reference project that implements event sourcing and CQRS, based on Jet Basrawi's implementation.

The main goal of this implementation is to clearly show responsibility segregation in an event sourced system at the architectural level by running each responsibility in an independent microservice.

Requirements

Execution

  • docker = 24.0
  • docker buildx = 0.10
  • docker-compose = 2.18

Development

  • make = 4.4
  • golang = 1.20
  • protoc = 23.3
  • protoc-gen-go = 1.3
  • protoc-gen-go-grpc = 1.3

Quick start

Build docker images.

docker buildx bake

Run the system with docker-compose.

docker-compose up

Open localhost:8088 in your browser and interact with the UI.

Important: The UI is not reactive, you may need to refresh your browser after making an update.

Services

Command

Processes incoming command messages and executes them, writing the resulting events to EventStoreDB.

Command messages are received via RPC.

Projection

Processes incoming events and writes the corresponding projections to Redis.

Incoming events are received through a persistent subscription to EventStoreDB.

Query

Processes incoming query messages and runs them, returning the corresponding data from Redis.

Query messages are received via RPC.

UI

Serves rendered html files that let the user interact with the system via forms.

Forms trigger RPC commands when submitted. Html files are rendered with information fetched through RPC queries.

go-eventsourcing-cqrs's People

Contributors

jrlangford avatar

Watchers

 avatar

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.