Skip to main content

Design Discussion over Microservices Adaption

 Terms that are most commonly used in any microservices architecture

Don't worry after watching so many new terms as below :

  1. Saga Pattern
  2. Bounded context
  3. Eventual consistency
  4. Event Command Execution 
  5. Event broker
  6. CDC (change data capture) event managment
  7. Domain driven design
  8. Event driven design
  9. CQRS (Command query responsibility segregation)
  10. Rollback operation 
  11. Asynchronous Callback operation
  12. Fault tolerance :Bulk Head & Circuit breaker
  13. Open API configurations
  14. Centralized logging ELK
  15. Stats aggregation
  16. Aggregates in Domain Driven Design
  17. FAT Domain VS Anemic Domain
  18. Ubiquitous Language 
  19. Event sourcing
  20. Event replay
  21. Scatter-Gather Pattern

  • Saga Pattern:
     A pattern which is the heart soul of any microservice architecture ,it is used to manage data consistency across multiple microservices in distributed transaction .It performs a sequence of local transactions which perform updation operation in services & publish a message or trigger the event. There are below three type of transaction which perform crucial roleplay :
  1. Compensable transaction: In case of local transaction fails then compensable transaction comes into flow.It can potentially reversed by processing another transaction with opposite effect.
  2. Pivot transaction:It can be referred as go/no-go point .If the pivot transaction is commited ,saga constraints run untils it completion
  3. Retryable transaction :This transaction follows the pivot transaction & guranteed to succeed.

  • Bounded Context:                                                                          
  • Bounded context is a logical boundary: When both sub-domains and the core domain are defined, it’s time to implement the code. Bounded context defines tangible boundaries of applicability of some sub-domain. It is an area where a certain sub-domain makes sense, while the others don’t. It can be a talk, a presentation, a code project with physical boundaries defined by the artifact. Bounded context is a pretty vague concept for a lot of developers.



As per the above image ,CQRS pattern evolve usage of event sourcing ,Now what is event sourcing which need to know ,why its required .
So in case of event driver architecture when the event-command action roleplay is perfromed ,individual action(command) triggered a event,which need to be persist .So the benefit of persisting any event is beneficial in  such a when let say in case of failure of transaction ,you know the event Transaction_failed occurs so you will managing subsequent prior event which was supposed to be happen after checkout event.

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');"  ...

LOVE THE WAY SINGLETON PATTERN CAN BE DESIGNED ! WOWW...

To implement Singleton pattern, we have different approaches : 1.Eager initialization: In this method the instance of clss is created at loading time .As whenever in java there is a requirement of species at loading time we first remember of Static keyword. package com.questprogram.singleton; public class EagerInitializedSingleton { private static final EagerInitializedSingleton instance = new EagerInitializedSingleton(); //private constructor to avoid client applications to use constructor private EagerInitializedSingleton(){} public static EagerInitializedSingleton getInstance(){ return instance; } } 2. Static block initialization Static Block initialization implementation is similar to eager initialization, except that instance of class is created in the static block that provides option for exception handling. package com.questprogram.singleton; public class StaticBlockSingleton { private static StaticBlockSingleto...