Events are frequently used in communication between services in a microservice architecture. One of the most common use of events is to provide data consistency between distributed systems. In a microservice architecture, there are many databases as well as many services. In order to ensure the data is consistent between these databases, data is sent asynchronously from one service to another service via events.

One of the most important issues in distributed messaging systems is the atomicity of database updates and event publishing. At this point, we need to look at the CAP theorem. According to this theorem, it is…

Authentication is a key aspect in enterprise-level Web API applications. In addition to authentication, it is also necessary to ensure that everyone has authorized access to the correct part of the API. HTTP protocol is widely used in client-API communications. In HTTP, the authorization header is mostly used to handle authentication and authorization issues. For example, JSON Web Token (JWT) is commonly used in token-based authentication mechanisms. The token is written in the Authorization header like this:

Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

The number of services in microservice architectures is much higher than in monolithic structures. Most of these microservices require authentication and…

Clean architecture is an architectural style that allows business applications to be tested and developed separately from the rest of the infrastructure. Therefore, in clean architecture, there is a certain layer for business logic, often called domain or core.

Besides core business operations, some business rules are also checked within this layer. Business logic exceptions may be thrown in case of violation of any of these rules. These controls can be done while creating or updating an entity instance. For example, checking the name field uniqueness during creating a category entity, or checking the subcategory limit when adding a subcategory…

When we have started to develop a layered architecture by following clean architecture rules, an ORM(Object-Relational Mapping) structure was needed between the application layer and data access layer, for various reasons such as separating object model from persistence model. When the development platform is based on .NET Core along with Entity Framework Core (EF Core) the need to form a structure between these layers has emerged.

Lets take a look to the definition of Microsoft:

Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. …

Microservices, also know as microservice architecture, is an architecture that consists of many services which have the responsibility of a single function. In this architecture style, a client application should have access to associated microservices. This access can be made separately which means every request has to be processed and evaluated through the services. Therefore, the client application would require making multiple requests for a single operation. This situation can potentially cause bottlenecks, especially in large, complex enterprise-level service architectures. One of the ways to prevent or manage this bottleneck is to use the API Gateway.

API Gateway pattern provides…

Emre Teoman

Senior Software Engineer, Borda Technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store