Let’s bring some positive..kya hoga.. kya hone wala koi nahi janta .. just motivate our player to play best bgmi in next 6 games, result kuch bhi .. point kuch bhi ho..
Baki All good plans 🤞🤞🚀🚀🚀🚀
Jai Mata di
Microservices are great for building flexible and scalable systems, but they also bring the challenge of getting those independent services to work together smoothly.
Collaboration patterns are the key to making this happen.
[1.] 𝐒𝐚𝐠𝐚 𝐏𝐚𝐭𝐭𝐞𝐫𝐧 => Keeping Things Consistent
You're booking a flight and a hotel.
You want BOTH to be confirmed or NONE at all.
Sagas handle this.
��� Break down a big task into smaller steps, each handled by a different microservice.
◾ If one step fails, the others 'undo' their changes.
=> Two Flavors :
◾ Choreography - Services chat via events ('Flight booked!', 'Hotel booked!', 'Oops, flight canceled!') to keep things in sync.
◾ Orchestration - A central 'manager' tells each service what to do and cleans up if something goes wrong.
[2.] 𝐀𝐏𝐈 𝐂𝐨𝐦𝐩𝐨𝐬𝐢𝐭𝐢𝐨𝐧
A personal shopper for your app.
Instead of going to each store (microservice) yourself, you ask the shopper to gather everything you need.
◾ An API Gateway or BFF (Backend for Frontend) service talks to multiple microservices, collects the data and gives it to the client in one neat package.
[3.] 𝐂𝐐𝐑𝐒 => Splitting Reads and Writes
Having two different chefs in a kitchen, one for cooking (writing data) and one for serving dishes (reading data). 😊
◾ You have separate models for reading and writing data.
◾ This lets you optimize each side for its specific task.
◾ Complex to set up, need to keep the two models in sync.
[4.] 𝐄𝐯𝐞𝐧𝐭-𝐃𝐫𝐢𝐯𝐞𝐧 𝐂𝐨𝐥𝐥𝐚𝐛𝐨𝐫𝐚𝐭𝐢𝐨𝐧
A group chat where services share updates.
Anyone interested can listen and react.
◾ Services publish events ('Order placed!').
◾ Other services subscribe to these events and do their part when they hear something relevant.
◾ Can be tricky to debug, need to ensure messages are processed in the right order.
[5.] 𝐂𝐨𝐦𝐦𝐚𝐧𝐝-𝐒𝐢𝐝𝐞 𝐑𝐞𝐩𝐥𝐢𝐜𝐚 => Local Copy for Speed
Keeping a copy of frequently used files on your desktop for quick access, instead of always fetching them from a network drive.
◾ A service keeps a local, read-only copy of data from another service.
◾ This speeds up reads and reduces dependency on the other service's availability.
◾ Data might be slightly outdated (replication lag), adds complexity to keep copies in sync.
[6.] 𝐒𝐡𝐚𝐫𝐞𝐝 𝐃𝐚𝐭𝐚𝐛𝐚𝐬𝐞 (Anti-Pattern)
Multiple roommates sharing one toothbrush.🤣
Messy and leads to conflicts.
◾ Several microservices use the same database.
When to use => Almost never. 😉
Maybe as a temporary step while breaking up a monolith.
Happy to discuss.
Follow @techNmak
Illustrious legacy 🇮🇳
Inspiring intensity 👏
Incredible icon ❤️
The Former #TeamIndia Captain gave it all to Test Cricket 🙌
Thank you for the memories in whites, Virat Kohli 🫡
#ViratKohli | @imVkohli
𝗧𝗵𝗮𝗻𝗸 𝘆𝗼𝘂, 𝗩𝗶𝗿𝗮𝘁 𝗞𝗼𝗵𝗹𝗶! 🙌
An era ends in Test cricket but the legacy will continue FOREVER! 🫡🫡
@imVkohli, the former Team India Captain retires from Test cricket.
His contributions to #TeamIndia will forever be cherished! 👏 👏
Thank you, Captain 🫡🫡
End of an era in whites!
@ImRo45 bids adieu to Test cricket. He will continue to lead India in ODIs.
We are proud of you, Hitman 🫡🫡