Giter Site home page Giter Site logo

denismurphy / microservices-architectural-patterns Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 3 KB

Microservices Architectural Patterns

License: MIT License

api-gateway eda event-driven-architecture resource-oriented-architecture roa service-oriented-architecture soa hexagonal-architecture task-based-architectures vertical-slice-architecture

microservices-architectural-patterns's Introduction

Microservices Architectural Patterns

Microservices is an architectural style for building applications as a collection of small, independent services that communicate with each other over a network. There are various architectural patterns that can be used to design and implement microservices, each with its own strengths and weaknesses.

In this guide, we will take a look at some of the common microservices architectural patterns:

Service-Oriented Architecture (SOA)

Service-Oriented Architecture is a pattern that defines a collection of services that work together to provide a single business capability. Each service is a self-contained unit that implements a specific business capability and is deployed and managed independently. Services communicate with each other using standard protocols, such as HTTP and REST, to share information and data.

Event-Driven Architecture (EDA)

Event-Driven Architecture is a pattern that involves the production, detection, and consumption of events, which are lightweight messages that describe a change in the state of an application. Services in an EDA communicate by publishing and subscribing to events, rather than directly invoking each other. This pattern is well-suited for applications that need to handle large volumes of events and need to scale rapidly.

API Gateway Pattern

API Gateway is a pattern that provides a single entry point for client applications to access a collection of microservices. The API Gateway acts as a reverse proxy, routing requests from clients to the appropriate service and returning the service's response back to the client. This pattern can help reduce the complexity of client applications by hiding the details of the underlying services and providing a unified, versioned API.

Resource-Oriented Architecture (ROA)

Resource-Oriented Architecture is a pattern that focuses on the resources that an application exposes and manipulates, rather than the services that implement those resources. In a ROA, each resource is represented by a unique URI and can be manipulated using standard HTTP methods, such as GET, POST, and DELETE. This pattern provides a simple and consistent way for client applications to interact with the resources provided by an application.

Vertical Slicing Architecture

Vertical Slicing Architecture is a pattern that decomposes a monolithic application into smaller, independent services based on the functional areas of the application. Each service implements a specific slice of the functionality of the original monolithic application and is deployed and managed independently. This pattern can help improve the maintainability, scalability, and reliability of an application by breaking it down into smaller, easier-to-manage components.

Horizontal Slicing Architecture

Horizontal Slicing Architecture is a pattern that decomposes a monolithic application into smaller, independent services based on the different types of data and information that the application handles. Each service is responsible for a specific type of data or information and can be deployed and managed independently. This pattern can help improve the performance and scalability of an application by allowing different services to be optimized for different types of data.

Task-Based Microservices Architecture

Task-Based Microservices Architecture is a pattern that decomposes a monolithic application into smaller, independent services based on the tasks that the application performs. Each service implements a specific task and is deployed and managed independently. This pattern can help improve the maintainability, scalability, and reliability of an application by breaking it down into smaller, easier-to-manage components.

Bounded Context Architecture

Bounded Context Architecture is a pattern that defines a context within which a particular domain model applies. Each bounded context is a self-contained unit that implements a specific part of the overall domain model of an application and is deployed and managed independently. This pattern helps to minimize the complexity of the overall domain model by breaking it down into smaller, easier-to-understand pieces. It also promotes reusability and reduces the risk of conflicting interpretations of the same data by different parts of the application.

Hexagonal Architecture

Hexagonal Architecture, also known as the Ports and Adapters Architecture, is a pattern that separates the core functionality of an application from its external dependencies, such as databases, message queues, and APIs. The core functionality is implemented in the center of the architecture, while the dependencies are connected to the core through ports. This pattern can help improve the maintainability, testability, and scalability of an application by making it easier to change or replace external dependencies without affecting the core functionality.

Conclusion

There are various microservices architectural patterns that can be used to design and implement microservices, each with its own strengths and weaknesses. The choice of pattern depends on the specific requirements and constraints of a given project, and can involve a combination of different patterns to achieve the desired results. It is important to carefully consider the trade-offs of each pattern and to choose the one that best fits the needs of the project.

microservices-architectural-patterns's People

Contributors

denismurphy avatar

Stargazers

 avatar  avatar  avatar

Watchers

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