1. What is a distributed system?
A distributed system is a collection of independent computers that appear to the user as a single coherent system.
To achieve a common goal, the computers in a distributed system communicate with each other. The computers of a distributed system can be housed in one physical location or dispersed in different regions. The main advantage of a distributed system is that it outperforms a single computer system in terms of performance, reliability and availability.
It involves sharing resources and processing power between different workstations through distributed computing and databases. The key components of distributed systems are multiple nodes, communication networks, and distributed middleware that controls communication between nodes.
Nodes are independent computing entities that communicate with each other. A communication network acts as a medium to exchange information between nodes. Distributed middleware and distributed systems refers to the software layer between the distributed applications and the underlying network infrastructure that provides services such as communication, coordination, and resource management to enable efficient and reliable distributed computing.
By distributing the workload and data across multiple nodes, the architecture of distributed systems is created to achieve fault tolerance (the ability to continue working in the presence of node failures or network problems), scalability and high availability.
2. How do distributed systems work?
For distributed systems to work, a task must be divided into smaller subtasks and spread across several nodes or computers in a network. The nodes or computers then communicate and cooperate to complete the work.
The following four steps provide a brief overview of how distributed systems work:
Decentralized components
A distributed system comprises many parts or nodes spread over different real or virtual locations. These parts can communicate with each other over a network to achieve a single goal.
Communication
The components of a distributed system can communicate using a variety of protocols and tools, including TCP/IP, HTTP, or message queues. These protocols allow the nodes to communicate by sending and receiving messages or data.
coordination
For the parts of a distributed system to work well together, they must coordinate their actions. Various mechanisms, such as distributed algorithms, consensus protocols or distributed transactions, can be used to achieve this coordination.
fault tolerance
A distributed system should be designed with fault tolerance in mind. This implies that it is able to handle failures of specific parts or nodes without hindering the performance or availability of the entire system. Distributed systems use redundancy, replication, or partitioning strategies to achieve fault tolerance.
An online search engine is an example of a distributed system because it contains many nodes that perform various functions, including crawling web pages, indexing content, and handling user queries. The nodes cooperate to provide users with fast and efficient search results.
The blockchain – a decentralized ledger that records transactions securely and transparently – is also an example of a distributed system. It is distributed because the ledger is stored on multiple nodes in the network, with each node holding a copy of the entire ledger, allowing for greater transparency, security, and resilience against errors or attacks.
3. What are the main characteristics of distributed systems?
Distributed systems are used in many applications, including social networking platforms, cloud computing, and online retail. The different characteristics of distributed systems make them stand out from other computer systems.
One such attribute of distributed systems that allows many processes or threads to execute simultaneously is concurrency. Although this feature makes the system more efficient, it can also lead to problems such as deadlocks.
A deadlock is a situation that can occur in distributed systems where two or more processes are blocked and cannot continue because each is waiting for the other to release a resource. Deadlocks can occur in distributed systems due to the inherent complexity of coordinating multiple processes running simultaneously across multiple nodes.
Another key characteristic of distributed systems is scalability.