All Projects → pavelnikolov → eventsourcing-go

pavelnikolov / eventsourcing-go

Licence: other
Event Sourcing + CQRS using Golang Tutorial

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to eventsourcing-go

Todomvc Ddd Cqrs Eventsourcing
Implementation of basic Todo app via tastejs/todomvc in C#/Typescript with eventsourcing, cqrs, and domain driven design
Stars: ✭ 134 (+78.67%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
nota
"None Of The Above" - is going to be a secure online voting system, intended to give the electorate better choices. It always adds one additional choice to anything to be voted on: If more than 50% of voters choose "None of the Above", the election is considered null and void.
Stars: ✭ 17 (-77.33%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
chekov
A CQRS/ES framework for building application in Rust
Stars: ✭ 21 (-72%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
delta
DDD-centric event-sourcing library for the JVM
Stars: ✭ 15 (-80%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Go Cqrs All
All-in-one collection for Go CQRS / ES / DDD examples
Stars: ✭ 39 (-48%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Jdonframework
Domain-Driven-Design Pub/Sub Domain-Events framework
Stars: ✭ 978 (+1204%)
Mutual labels:  cqrs, asynchronous, eventsourcing
les
Go directly from an event storming to a working API: Event Markdown / Markup validation & NodeJS CQRS/ES application builder.
Stars: ✭ 48 (-36%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Eshoponcontainersddd
Fork of dotnet-architecture/eShopOnContainers in full DDD/CQRS design using my own patterns
Stars: ✭ 126 (+68%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+2476%)
Mutual labels:  cqrs, eventsourcing, cqrs-es
fee-office
A DDD, CQRS, ES demo application
Stars: ✭ 35 (-53.33%)
Mutual labels:  cqrs, cqrs-es
Totem
Knowledge work at play
Stars: ✭ 56 (-25.33%)
Mutual labels:  cqrs, eventsourcing
node-evented-command
provides simple command/event handling for evented systems like cqrs
Stars: ✭ 15 (-80%)
Mutual labels:  cqrs, event
android-cuberto-dialog-design
This is an implementation inspired by beautiful design by Cuberto on his Dribble page, which can be found here https://dribbble.com/shots/3206606-Landing-page-wip
Stars: ✭ 15 (-80%)
Mutual labels:  tutorial-code, tutorial-exercises
rss2hook
POST to webhook(s) when new feed-items appear.
Stars: ✭ 33 (-56%)
Mutual labels:  rss, golang-application
Dermayon
Dermayon is Library for supporting build large application,distributed application, scalable, microservices, cqrs, event sourcing, including generic ef repository pattern with unit of work, generic mongo repository pattern with unit of work, kafka, etc
Stars: ✭ 66 (-12%)
Mutual labels:  cqrs-es, cqrs-pattern
golang-gqlgen-reactjs-subscription-demo
GraphQL Subscription with Golang/React JS & React Apollo Client Subscription
Stars: ✭ 29 (-61.33%)
Mutual labels:  golang-examples, golang-application
workflow
Functional CQRS Eventsourcing Engine
Stars: ✭ 22 (-70.67%)
Mutual labels:  cqrs, eventsourcing
akka-persistence-foundationdb
A replicated Akka Persistence journal backed by FoundationDB
Stars: ✭ 43 (-42.67%)
Mutual labels:  cqrs, cqrs-es
nestjs-boilerplate-microservice
Nestjs Microservice boilerplate: apply DDD, CQRS, and Event Sourcing within an event driven architecture
Stars: ✭ 270 (+260%)
Mutual labels:  cqrs, eventsourcing
go-eventually
Idiomatic Event Sourcing in Go
Stars: ✭ 76 (+1.33%)
Mutual labels:  cqrs, cqrs-es

Event Sourcing + CQRS using Go Tutorial

Background

"Fairflax Media logo"

Imagine that you are working for a large news publisher called Fairflax Media, inspired by flax flower (not to be mistaken with Fairfax Media, of course).

You have been tasked with breaking the huge monolith system into microservices and moving everything to Kuberentes. You prefer domain driven design, and believe that each database should only ever be owned by a single application. But as time goes by, you notice that many services need common data. You need to make sure that the data is consistent across all services and the query performance is reasonable.

Project Goals

  • Create a step-by-step tutorial for (opinionated) asynchronous microservices using Golang.
  • Each step of the tutorial should be in a separate git branch.
  • The master branch contains the initial state - tightly coupled services.
  • The event-sourcing branch should contain the Event Sourcing + CQRS implementation, containing asynchronous services, which are independent and easy to test.
  • Present actual problems and solve them using Event Sourcing + CQRS in Golang (with a few dependencies)
  • Use minimalistic approach and try to use fewer moving parts. (For example, the services are intentionally kept basic and do not include proper logging, tracing, metrics, feature flags, rate-limitting, docker containers, authentication, authorisation, K8s helm charts, docker-compose etc.).
  • In the initial branch DB is mocked up intentionally.
  • Demonstrate the use of in-memory data stores (e.g. BoltDB and Bleve).
  • Be more detailed and realistic than the regular Hellow World example, but remain minimalistic.
  • Demonstrate the use of channels for the basic event broker.

Non-Goals

  • Try to be everything for everyone.
  • Demonstrate how to use Kafka/Kafka Streams.
  • Demonstrate how to use DistributedLog.
  • Guarantee exactly-once delivery.
  • Show how to save/restore snapshots and use pub/sub systems with limited retention periods (e.g. AWS Kinesis and Google Cloud Pub/Sub).
  • Implement server-less version, for example, using AWS Lambda or similar.
  • Use event sourcing with a decentralized events ledger/blockchain.

Target Audience

This project is intended for anyone willing to switch to a asynchronous microservice architecture using Golang.

Prerequisites

  • Go 1.9 or later

  • $GOPATH is set

  • dep for managing dependencies

    On Mac OSX using brew...

    $ brew install dep
    $ brew upgrade dep
    

    On other platforms you can use the install.sh script:

    $ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
    
  • Add ensure the PATH contains $GOPATH/bin

    $ go help gopath
    $ export PATH=$PATH:$GOPATH/bin
    

Quick install

$ go get -u github.com/pavelnikolov/eventsourcing-go/demo-articles
$ go get -u github.com/pavelnikolov/eventsourcing-go/demo-graph
$ go get -u github.com/pavelnikolov/eventsourcing-go/demo-sitemap
$ go get -u github.com/pavelnikolov/eventsourcing-go/demo-rss

Clone the repository

Either:

$ go get -u github.com/pavelnikolov/eventsourcing-go/...

Or:

$ mkdir -p $GOPATH/github.com/pavelnikolov
$ cd $GOPATH/github.com/pavelnikolov
$ git clone github.com/pavelnikolov/eventsourcing-go

Then install the dependencies:

$ dep ensure

Try it!

Run in four different terminal windows:

go install ./cmd/demo-articles && demo-articles
go install ./cmd/demo-graph && demo-graph
go install ./cmd/demo-rss && demo-rss
go install ./cmd/demo-sitemap && demo-sitemap

Navigate to the apps in your browser:

Optional tasks

Rebuild the generated code

  1. Install protobuf compiler

  2. Install the protoc Go plugin

    $ go get -u github.com/golang/protobuf/protoc-gen-go
    
  3. Rebuild the generated Go code

    $ go generate github.com/pavelnikolov/eventsourcing-go/...
    

    Or run protoc command (with the grpc plugin)

    $ protoc -I publishing/ publishing/publishing.proto --go_out=plugins=grpc:publishing
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].