GREEN ARROWS : From the Admin panel, user performs Create, Update, and Delete, or CRUD operations using Rest service provided. In here we are using JSON as payload format.
RED ARROWS : Once the application receives an admin request, the application makes requests to do write operations.Those changes are first applied to L1 cache, then L2 cache, and finally into MySQL DB.
BLUE ARROWS: Once the application receives an admin request, the application makes requests to do read operations. The application will search the L1 cache first and then move on to L2 and finally mySQL directly if it cannot be found in each subsequent location..
YELLOW ARROWS: Application even can ignore L1 and L2 cache and directly call MySQL DB.
BLACK ARROWS : Cluster communication.
- Please note that applications can work without L2 cache as well.
Application Load Balancing
Hazelcast is used for application clustering and we are using a distributed map to share productId information among the applications which are run inside the cluster. That way, each application knows what product Ids that need to be processed.
Ex: 100 Products process within two nodes application cluster.
Each node processes 50 products and those 50 products also can be processed in parallel within each node.
Source Code:
https://github.com/dhanuka84/distributed-applications
Source Code:
https://github.com/dhanuka84/distributed-applications
No comments:
Post a Comment