DEV Community

Mohammad Abu Musa RABIUL
Mohammad Abu Musa RABIUL

Posted on • Edited on

2

Micro service architecture in .NetCore

In this project we are going to develop micro service based Blog web api. The project is divided into several micro services that are Identity Server, BlogApi, Notification Server and Api Gateway.

Project Overview

The backend server of the application has an Api Gateway receives and manages all the API calls from the client application and route them to appropriate micro services.

Identity micro service works for authorizing client (mobile/ web) application to access Blog Api through user authentication. The identity server uses OAuth 2.0 and OpenID protocol. I will discuss detail about identity server in separate post.

There is also a notification service that sends notification to user when any notification event is triggered by identity and blog api services. RabbitMq message broker is used to exchange these event messages to notification service. For an example, when a new user is being registered by Identity server then a new event message is generated and sent through RabbitMq message broker. Notification server receives that message and sends email notification to the newly created user's email account about successful registration into system.

Note: Current implementation only supports email notification event for identity server.

All the micro services here are running as docker containers.
The following diagram shows overall micro service architecture.

Alt Text

Backend Server Workflow

  1. The client (Web / mobile client) initiates an authentication request, api gateway redirects the request to identity server. Identity server authenticates the client and returns a login portal to client application. User then uses his/her login credentials. Identity server validates user credentials and authorize client application on behalf of user with access token. This access token will be used to access blog api.
  2. Client attaches access token to subsequent requests made to access blog api resource server through api gateway. The Blog Api server validates the access token and fulfill the request depending on client authorization rights.

Project link: click here
or you can reach individual service from here.

  1. Blog Api
  2. Identity Server
  3. Notification Service
  4. Api Gateway
  5. Blog backend application (all in together)
  6. React Sample Client

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay