Skip to main content

Before Starting MicroServices just walk through Orchestration !! Matters a lot

What is this Orchestration :

Orchestration is the traditional way of handling interactions between different services in Service-Oriented Architecture (SOA). With orchestration process, there is typically one controller that acts as the “orchestrator” of the overall service interactions. This typically follows a request/response type pattern.

For example, if three services needed to be called in a particular order, the orchestrator makes a call to each one, waiting for a response before calling the next. 


As you can identify the differences of two flow as seen in the picture.

PROS: 

Provides a good way for controlling the flow of the application when there is synchronous processing. For example, if one Service  needs to complete successfully before another Service  is invoked.

CONS:

  • If there is a central shared instance of the orchestrator for all requests, then the orchestrator is a single point of failure. If it goes down, all processing stops.
  • Leverages synchronous processing that blocks requests.
Reactive architecture patterns solve for some of the orchestration challenges listed above.  
Reactive architecture pattern is an event-driven architecture pattern applied to microservices. Instead of having a central orchestrator that controls the logic of what steps happen when, that logic is built into each service ahead of time.
Services use an event stream for asynchronous communication of events. Multiple services can consume the same events, do some processing, and then produce their own events back into the event stream, all at the same time. The event stream does not have any logic and is intended to be a dumb pipe.
The asynchronous nature of a reactive architecture removes the blocking, or waiting, that happens with orchestration (request/response) type processing. Services can produce events and keep processing. 
Pros:
  • Enables faster end-to-end processing as services can be executed in parallel/asynchronously.
  • Easier to add/update services as they can be plugged in/out of the event stream easily.
  • Aligns well with an agile delivery model as teams can focus on particular services instead of the entire application.
  • Control is distributed, so there is no longer a single orchestrator serving as a central point of failure.
  • Several patterns can be used with a reactive architecture to provide additional benefits. For example, Event Sourcing is when the Event Stream stores all of the events and enables event replay. This way, if a service went down while events were still being produced, when it came back online it could replay those events to catch back up. 

Comments

Popular posts from this blog

Difference between String ,StringBuffer & StringBuilder?

Run this simple java program and create scenerio of String object creation in your mind.You will see huge difference than expectation.                                I would recommend to first try on your own then follow the solution . As you execute the above line of codes in your Java Runtime Environment .As compiler read the lines .In  case of                                      String a= new String("Hello");        As it will allow compiler to create a new string object .It is always mandatory for  compiler to allocate a memory space in heap whenever new  keyword is used.So String class object created successfully in heap with reference variable a.And a very important point  need to be noted down that here  "new String("Hello');"  ...

AngularJs/javascript and Angular/typescript (version 2/4/latest) have a series of difference.

                         AngularJs vs Angular (Typescript)                                                 On basis of process of compilation          ANGULARJS : Angular Js  compiler  traverses the DOM looking for attributes . It takes two phase for compilation where initial phase  traverse the DOM and collect all of the directives. The result is a linking function.   Next  phase evolves combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. This makes the scope model the single source of truth.

Base knowledge for spring framework developer

Spring Framework : Facts:Spring Framework is a lightweight framework.Do you know reason.Read out Proof: As Spring follow MVC model as following  Fig.1.MVC model  Does the image show that spring framework is light weight framework.If you are new then you might be confuse.So Don't be confuse go to the below coding example which proves it's light weight properties. Reason.1-> Use Of POJO's  POJO means  Plain Old Java Object . It refers to a Java object (instance of definition) that isn't bogged down by framework extensions. For example, to receive messages from JMS, you need to write a class that implements the MessageListener interface. Coming to a simple example. Here College class has it's own property name & Address.It include references s1 for student type class & similarly t1 for Teacher type class.As there is a case of Assciation(HAS-A) relationship between college and student.Similarly to teacher also.But if you ana...