Distributed System: Its a mechanism having multiple components are located in different networked systems and communicate and coordinate the each other using message events exchange with one another to achieve goals.
Distributed system will provide 3 major benefits: 1. Scalability 2. High Performance and 3. High Availability
When we design teh distributed system we assume Fallacies But in real time those never we met
Example:
- The network is reliable; we don't know hardware failure or any other software failures due to lack of system resources
- Latency is zero : We cannot say latency always zero.
- Bandwidth is infinite : https://grpc.io/, https://thrift.apache.org/ and REST apis libs will use for it but still no guarantee...
- The network is secure : Devices distributes across may not have secure communication.
- Topology doesn't change: Network topology may change when new requirements comes
- There is one administrator: One admin can manage better
- Transport cost is zero : T. Cost may increate when we communicate b/w different geo located devices
- The network is homogeneous : Same network may not possible all the times when geo- distributed
Global clock i.e network Asynchronous, Partial failures like out of 6 nodes 1 node may fail etc, and Parallel or multiprocessing i.e concurrency on same resource will make distributes system design considerations to be addressed.
Safety vs liveness .. some times we make sure safety is more important then livenes(availability)s of a solution
When we distribute message or events between nodes we should think it can be Synchronous or asynchronous.
In real time asynchronous way only we interact, and keepi in mind of failures in nodes like one node may crash, halt the system or not able to send or receive messages and send unappropriate messages in the conteext due to failures in memory or data.