Tech Story

Menu
  • Home
  • Programing
    • Delphi
      • Database
    • Arduino
    • Android
    • Unix Socket
    • Database
  • Network
    • Mikrotik
  • software
    • File Recovery
    • Driver software
    • backup
    • download
    • Drivers
    • format converter
    • programing tools
    • internet
    • phone apps
    • Network
    • graphics
    • professional
    • DISK AND PARTITION
    • OPTIMIZER
    • utility
    • programming tools
  • Digital Coin
    • Bitcoin
    • Blockchain
  • Free Proxy
  • Privacy Policy
  • contact us
  • news
  • Health and Fitness
  • General
  • Computer
  • Games
    • android games
    • computer games
    • ps4
  • Management skills
  • Monuments
  • Series and Movies
  • electrical and electronics
  • YouTube watch
Home
electrical and electronics
Composition Patterns
electrical and electronics

Composition Patterns

December 17, 2020

Composition Patterns

Software composition means the way to build your software product. Basically it deals with high level software architecture diagram where different modules of your software will communicate for specific business goals. In this chapter, we will learn about different software composition patterns widely used in organizations. In microservice, we split each function into one process. Each of these services will be independent and full stack in nature.

Functional decomposition plays an important role in building your microservices. It provides agility, flexibility, and scalability to your application.

Aggregator Pattern

Aggregator pattern is the simplest web pattern that can be implemented while developing a microservice. In this composition pattern, a simple web module will act as a load balancer, which means it will call different services as per requirements. Following is a diagram depicting a simple microservice web app with aggregator design. As seen in the following image, the “Aggregator” is responsible for calling different services one by one. If we need to apply any business logic over the results of the service A, B and C, then we can implement the business logic in the aggregator itself.

Aggregator Pattern

An aggregator can be again exposed as another service to the outer world, which can be consumed by others whenever required. While developing aggregator pattern web service, we need to keep in mind that each of our services A, B and C should have its own caching layers and it should be full stack in nature.

Proxy Pattern

Proxy microservice pattern is a variation of the aggregator model. In this model we will use proxy module instead of the aggregation module. Proxy service may call different services individually.

Proxy Pattern

In Proxy pattern, we can build one level of extra security by providing a dump proxy layer. This layer acts similar to the interface.

Chained Pattern

As the name suggests, this type of composition pattern will follow the chain structure. Here, we will not be using anything in between the client and service layer. Instead, we will allow the client to communicate directly with the services and all the services will be chained up in a such a manner that the output of one service will be the input of the next service. Following image shows a typical chained pattern microservice.

Chained Pattern

One major drawback of this architecture is, the client will be blocked until the entire process is complete. Thus, it is highly recommendable to keep the length of the chain as short as possible.

Branch Microservice Pattern

Branch microservice is the extended version of aggregator pattern and chain pattern. In this design pattern, the client can directly communicate with the service. Also, one service can communicate with more than one services at a time. Following is the diagrammatic representation of Branch Microservice.

Branch Microservice Pattern

Branch microservice pattern allows the developer to configure service calls dynamically. All service calls will happen in a concurrent manner, which means service A can call Service B and C simultaneously.

Shared Resource Pattern

Shared resource pattern is actually a conglomerate of all types of patterns mentioned earlier. In this pattern, the client or the load balancer will directly communicate with each service whenever necessary. This is the most effective designing pattern followed widely in most organizations. Following is a diagrammatic representation of the Shared Resource design pattern.

Shared Resource Pattern

Share
Tweet
Email
Prev Article
Next Article

Related Articles

A Capacitor is a passive component that has the ability …

Basic Electronics – Capacitors

Before we discuss, what is image transformation, we will discuss …

Image Transformations

Teclast M40 10.1'' Tablet 1920x1200 4G

Recent Posts

  • SideFX Houdini FX 18.5.462 x64 / 17.5.229 Linux / macOS Free Download
  • Udemy – Ultimate AWS Certified Developer Associate 2021 – NEW! 2021-1
  • Athentech Perfectly Clear Complete 3.11.2.1905 x64 / 1907 macOS Free Download
  • VirtualBox 6.1.18 Windows / Linux / macOS Direct Download
  • Sysinternals Suite 2021.01.19 Free Download

Categories

  • Advertisement
  • Android
  • android games
  • antivirus
  • Arduino
  • audio video editor
  • backup
  • Bitcoin
  • Blockchain
  • Chinese medicine
  • Computer
  • computer games
  • Database
  • Database
  • Delphi
  • DISK AND PARTITION
  • download
  • Driver software
  • Drivers
  • electrical and electronics
  • Fashion and beauty
  • File Recovery
  • Forex Trading
  • format converter
  • General
  • general
  • graphics
  • Health and Fitness
  • Healthy Eating
  • internet
  • Management skills
  • Mikrotik
  • Monuments
  • Network
  • News
  • Nutrition
  • Operating System
  • OPTIMIZER
  • passwords
  • phone apps
  • phone software
  • professional
  • Programing
  • programing tools
  • programming tools
  • ps4
  • Raspberry Pi
  • Series and Movies
  • software
  • Sport
  • thems
  • Uncategorized
  • Unix Socket
  • utility
  • Videos
  • YouTube watch

Tech Story

Copyright © 2021 Tech Story
Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh