Migo Lee’s Post

View profile for Migo Lee

Software Engineer @ Talabat | Delivery Hero

It's negligent to assume the relative speeds of processes in asynchronous system. There is no guarantee that messages will be delivered in a bounded time or a particular order. And that is just as true in consensus problem. Only with asynchronous model, it's not always possible to achieve 100% accurate synchronization. The better assumption is some of the process WILL fail, and your system should be geared up for that. For that, we need to have the notion of "timing" which will allow us to use timeouts. And from the timing and timeouts, we build abstractions for distributed systems such as leader election, consensus, failure detection. For example, "quorums" only describe the blocking properties of the system to guarantee safety - meaning that the system waits until sufficient amount of votes are made. Bringing up to a service level application. The question is, is it possible to remove all the synchronous call(say, point-to-point HTTP/gRPC calls) in micro-services? The realistic answer to that is No. Some people may argue that we should anyway remove the dependency between services and best way to decouple them is to have asynchronous mechanism such as message queue - Who would disagree. But then the actual problem is having to have the awareness of data from different source(or service) in and of itself. For that, you may consider: 1) duplicating data using the aforementioned asynchronous mechanism 2) making a point to point call which is synchronous The main criticism over the first approach is how close the data that you've just duplicated can be to the data in source of truth - sooner or later this data will definitely be outdated unless that's the purpose of data such as transaction logging. From the data perspective as well, why does your system have to store the data it doesn't generate? To top it off, the worst case scenario is, some random developer comes along and have the entire system depend on the data when source of them is else where.

To view or add a comment, sign in

Explore topics