Giter Club home page Giter Club logo

booktown's Introduction

Booktown microservice project

Introduction

Microservices are becoming a new trend, thanks to the modularity and granularity they provide on top of advantages like releasing applications in a continuous manner. There are tons of information, courses, great YouTube videos which aim to make writing and managing microservices easy.

But the acquired knowledge is not always possible to apply to your current job.

Keeping that in mind, I thought, why not make a demo application that can give an example of how microservices are built and how they interact, implement best practices and architecture patterns.

General overview

What domain should we choose? Popular TODO list service is too trivial. CRUD service is not an option also ๐Ÿ˜’ Well, eCommerce application is something everyone understands. There are several well-defined services and entities in this domain.

Yet another book store is what we need. ๐Ÿ˜ƒ

Ok, let us try to implement clean architecture. We can play with

and everything you can think of!

Also we can use the most suitable persistent storages for each service Relational databases and NoSQL.

  • Postgres
  • Redis
  • Mongo
  • Elastic Search
  • Neo4j

you name it!

For asynchronous communications with Service bus we'll leverage CQRS pattern with using MediatR, FluentValidation and AutoMapper packages and choose Masstransit with RabbitMQ as one of the most popular open source message brokers.

We'll put an API Gateway based on Ocelot API Gateway in front of our app, to protect inner network. Though it is not absolutely necessary we will create BFF aggregator with sync service communication with the purpose - get our hands dirty on gRPC :)

Also we need to add some monitoring and observability to our system - Logging, Metrics, Traces, Healthchecks.

We all love dashboards

Since there are lots of moving parts, we need to orchestrate the whole process. Saga pattern is also a hot topic nowadays.

Unit and Integration testing is a mandatory requirement. xUnit is a right tool for it.

Some CI/CD tools would also be appropriate.

All microservices should be containerized it goes without saying. So we'll create Docker images Also app can be run locally using docker-compose, and also deployed to a local Kubernetes cluster.

C# ASP.NET Core 6 is our weapon of choice.

The only thing we'll not create is a frontend application or mobile app. Well I'm a backend developer. So I'll concentrate on my trade. But if you want to help me with user app - feel free to send me your ideas.

Architectural overview

This application is cross-platform at the server side, thanks to .NET 6 services capable of running on Linux or Windows containers depending on your Docker host. The architecture proposes a microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/DB) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using HTTP as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and a Masstransit Event Bus (a light message broker, to choose between RabbitMQ or Kafka, underneath) plus other features defined at the roadmap.

Architecture

It is not a production-ready project but rather showcase of architectural patterns and technologies. But I think it might be helpful for education purposes. If you have ideas how to improve project, please share them with me.

booktown's People

Contributors

greenbutton75 avatar yanotek avatar

Stargazers

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