Distributed System
Distributed System
INTRODUCTION TO PARALLEL
AND DISTRIBUTED SYSTEMS
TP: 1
GROUP: I4-AMS(D3)
1. In a distributed system, servers work together over a network. When a request is
forwarded from one server to another, it usually happens through a process called "request
forwarding" or "proxying." This occurs when the first server (Server A) cannot handle the
request directly, so it passes it to another server (Server B) that can process it. Here’s how it
works:
o The client sends a request to Server A.
o Server A checks and sees it cannot handle it—maybe it doesn’t have the file or it’s too
busy.
o Server A sends the request to Server B, which has the resource or power to help.
o Server B processes it and sends the answer back, either through Server A or directly to
the client.
2. Peer-to-peer computing is a way for computers (peers) to share resources—like files,
processing power, or storage—directly with each other over a network, without needing a
central server to control everything. Each peer can act as both a client (asking for something)
and a server (giving something).
❖ Here's an Example:
Skype: Skype used P2P in its early days for voice and video calls and it worked by When I
called my friend, my computer connected directly to hers to send voice and video data. Other
users’ computers (peers) helped route the call if needed, instead of everything going through a
central Skype server. So, Peers shared the work of connecting calls, making it cheaper and more
scalable.
3. In a client-server program, the client asks for something, and the server provides it.
Between a web browser and web server:
● The client is your browser (like Chrome). It sends requests, like “Show me this
webpage.”
● The server is the web server (a computer online). It listens, finds what’s asked for, and
sends it back. It’s like HTTP and it’s work by:
o You type “www.google.com” in Chrome.
o Chrome sends a request to Google’s web server.
o The server sends back the Google homepage, and Chrome shows it.
❖ Example: When I go to Netflix, my browser (client) asks Netflix’s server for a movie
list. The server sends it, and I see it on my screen.
4. Byte ordering is how computers store numbers (integers) in memory. There Are two
ways: Big-Endian and Little-Endian.
● Big-endian (BE): Stores the most significant byte (the “big end”) first. This means that
the first byte (at the lowest memory address) is the largest, which makes the most sense to
people who read left to right. For instance, a 32-bit integer 0x12345678 would be stored in
memory as follows in a big-endian system:
Address: 00 01 02 03
Data: 12 34 56 78
Easy way to think: Like reading “1234” normally—big part (12) first.
● Little-endian means the smallest part of a number (the least significant byte) is stored
first, at the lowest memory address. It’s like writing a number backward, starting with the least
important digit. For the same 32-bit integer 0x12345678, a little-endian system would store it
as:
Address: 00 01 02 03
Data: 78 56 34 12
Easy way to think: Like flipping “1234” to “4321”—small part (78) first.