Skip to content

malikmasis/TelephoneDirectory

Repository files navigation

TelephoneDirectory

microservices -> .net 6.0, golang - Docker, Tye,Dapr, Jenkins, Ocelot, RabbitMq, MassTransit, Serilog, Elasticsearch, Kibana, Swagger / SwaggerForOcelot, Prometheus(integrated to Jaeger), Jwt, Postgresql, Mssql

If you want to read in detail in Turkish, please visit here

Summary of the project - video - Turkish

Running the project

The project was created with Code First approach. In this way, we will be able to run the database on the code side. Also, there is a different database for each service. In this way, we are not dependent on only one database. Postgre and Mssql were used as databases. You can switch them easily.

* dotnet ef migrations add Initial
* dotnet ef database update

Note: No need to take any action as the existing migrations in the project are automatically run.

General structure
  • API Gateway -> Ocelot
  • Message Broker -> Rabbitmq, Redis(dapr)
  • Service Bus -> MassTransit
  • Health Check -> Watchdog - (via slack implementation)
  • Continuous Integration -> Jenkins
  • Logging -> Serilog, Elastic Search and Kibana
  • Databases -> Postgre and Mssql
  • Open Doc -> Swagger and SwaggerForOcelot
  • Applied Pattern -> DDD, Saga Pattern, Mediator, CQRS, Circuit Breaker, Event Sourcing, Publish-Subscribe, Sidecar
  • Tests -> xUnit (via MassTransit) - Mocking, Integration, CDC, and Functional Tests
Existed microservices
  • Ocelot - Gateway, .net6 - It provides coordination as a gateway.
  • Guide - Postgre, .net6 - We can perform all kinds of CRUD operations related to contacts.
  • Report - Postgre, .net6 - There are some reports on the people in the directory.
  • Auth - MSSQL, .net6 - We keep users. Authentication is done with JWT.
  • Example - A simple golang project that consumes events by integrated dapr and sends notifications.
  • Saga - Saga Pattern's Orchestration method is used for transaction management.
Installation

Thanks to the docker-compose.yml file, both the tools used and the databases will run properly.

* docker-compose up -d

Or

* tye run / run-tye.ps1
Testing
  • Unit Tests started to be added. We started to use it with MassTransit for consumers. Also mocking is used.

MassTransit unit testing - video
Unit testing in general - blog - Turkish
Mocking in unit testing - video - Turkish

  • Integration Test:

Integration testing in general - blog - Turkish
Integration testing in general - video - Turkish

  • Consumer Driven Contracts Test:

Implementation of CDC with Pact

About

microservices-> .net 6, golang - Docker, Tye, Dapr, Ocelot, RabbitMq, MassTransit, mssql, postgresql, elasticsearch, kibana, jwt

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published