Communication Among Processes
202402131213
Status: #idea
Tags: DC
Communication Among Processes
- TODO Layers from slide 3 (2/13/24)
Higher Level Protocol & Middleware
- Domain Name System (DNS)
- Authentication protocol
- Distributed commit protocol
- Distributed locking protocol
- Remote Procedure Call (RPC)
Interface Definition Language
- IDL consists of a set of functions called by a client and implemented by server
- One can have compiled or interpreted language
- Eg. client in Py, server in C
- In such a case, include files have to be separate
- TODO image from slide 7 (2/13/24)
TODO Class before 20th from arnav
ZeroMQ
- Socket may be bound to multiple addresses, allowing a server to handle messages from very different sources through a single interface
Design Patterns - ZeroMQ
- Request-reply
- Request socket (REQ) is paired with reply socket (REP)
- Ties the receipt of a message to the subsequent response
- Pub-sub
- The server is PUB and the client is SUB
- Only messages received through the SUB socket are the ones that the client has subscribed to
- If multiple clients subscribe to the same messages, each client will get a copy of the same message
- Pipeline
- A process producing tasks to be picked up by others
- The first available worker will pick up work from the moduler
- Pushing process does not really care which other process pulls in its requests
Role of Queue in Messaging
- Actually buffers which store these messages
- <>
<>
Flooding
- Undirected graph
- Node
forwards message to each enighbour , provided u did not recive from in the first place - How many messages?
- Let
initiate flooding of , and let be teh number of neighbours. -
- Then total messages is
- If G is a tree, then it is optimal at
. Othwewise <TODO Slide 23->26
- Let