Giter Site home page Giter Site logo

shijuvar / go-distributed-sys Goto Github PK

View Code? Open in Web Editor NEW
632.0 632.0 117.0 191 KB

Guidance for building event-driven distributed systems and microservices in Go with NATS JetStream, gRPC and CockroachDB

License: Apache License 2.0

Go 100.00%
cockroachdb cqrs event-sourcing go golang grpc grpc-go microservices nats nats-jetstream nats-streaming

go-distributed-sys's Introduction

Senior Consulting Solutions Architect: Go (Golang) and Distributed Systems

Shiju Varghese is a solutions architect, consultant, published author and speaker. He is focused on building large-scale distributed systems in the Go programming language, with a strong focus on clean architecture, domain-driven microservices architecture, event-driven architecture and event streaming. He is an early adopter of Go, and has been providing consulting and training for building highly-scalable backend APIs and distributed systems with Go ecosystem. Before adopting Go as the primary technology stack, he worked extensively on Microsoft .Net technologies for more than a decade, and was awarded Microsoft MVP seven times. He has spoken at numerous conferences including GopherCon India (Go Conference in India), DevConf.IN and Great Indian Developer Summit. He has authored two books on Go, titled "Web Development with Go" and "Go Recipes", both published by Apress.

Consulting and Training on Go and Distributed Systems

Contact at [email protected], for training and consulting on the Go Programming Language and Distributed Systems.

Technologies: Go, Google Cloud, gRPC, NATS, NATS JetStream, CockroachDB, Go kit, Google Service Weaver, Microservices, Event-Driven Streaming Architecture, DDD, Event Sourcing, CQRS.

go-distributed-sys's People

Contributors

shijuvar 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  avatar  avatar  avatar  avatar  avatar

Watchers

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

go-distributed-sys's Issues

Possible data inconsistency

From what I can see while reading the code there is a possibility that the system can be in an inconsistent state in a scenario when publishEvent fails to execute when creating order. I cannot see any compensating actions that handles this situation.

Event Retrieval and Domain Logic Missing

Firstly, thanks for the example and the medium article. I am busy trying to make my own CQRS ES system with go. I have done work on a CQRS ES system in C# but have decided to try learn go and see if it works better.

I see that you do have the function to retrieve events for an aggregate but it is not implemented (not a problem of course)

My main issue is knowing where and how to implement the domain rules. From my experience (which may be wrong), if a command comes in then all the events related to that aggregate ID need to be retrieved and replayed to create an aggregate state. The command can then execute to see if it passes the domain logic. Like to to stop a payment if a certain order has already had its payment executed.

Once the domain logic has passed then the event can be stored and published.

Hope I am on the right track and have not been misled. I would like to know how you would do this. Or if you have a more full example for me.

Benthos for reducing code

nice example of CQRS . Thank you for making this available to everyone and writing about it on Medium.

Lately I have started using benthos to configure these types of systems.
As i read the article I kept thinking of how all the data mapping and logic could be done in benthos.

NATS Jetstream is supported by benthos.

It now also has CueLang support but it’s not finished yet .

https://www.benthos.dev/docs/configuration/using_cue

Cuelang is strongly typed to a degree and you can model your types and generate protocol buffers and open api with it.

The cool thing with cuelang is that it has modules just like golang and so you can built up a large system with it to do the streaming transformations as well as validation as it has expressions .

mit there is not enough then you can extend cuelang with golang modules , and the cuelang can use it.

cluster discovery

am a bit confused about how each server finds the others int eh cluster.

DO you run Consul ?

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.