1 - Server/Client Flashcards
(20 cards)
What are the 2 broad models of a distributed system?
- Server with many client (can be thick or thin)
- Peer to peer systems (clients are servers)
What really is the cloud? What’s an elastic cloud?
The cloud is literally just a host. Elastic Cloud is just adding more hosts to a distributed system.
What are the ways that we can find and contact resources?
- Just hard code it (put in IP)
- Configuration file (hostname)
- Announce yourself (DHCP)
- Lookup service (domain names!)
What are the 4 resource location requirements?
- Location transparency
- Global uniqueness
- Ability to access names from all locations
- Protocol identification - speak same language
What is DNS?
Domain Name System:
- hierarchical lookup, translates domain names to IP addresses
What are 3 issues with client/server architectures?
- Division of labour (how to split up work?)
- Reliability of transmission
- Is it the right solution?
What are some important considerations for server design of multiple machines?
- How to manage state between clients/server, server/client?
- Concurrency
- Work distribution
Who holds state in a thin server? What about thick?
Thin - client (stateless)
Thick - server (stateful)
For an NFS like aviary, argue for both sides of why stateless or stateful would be better
Stateful - need to lock files to prevent concurrent writes
Stateless - invalid locks on crashes, stateless would be better
Give the pros and cons of thin clients
Pros:
cheap clients
Cons:
beefy servers, can’t do anything if not connected to internet
Give the pros and cons of thick clients
Pros:
- offload work to client, server has less load
- reduce cost if lots of stuff is done on client-side
- client can work even if not connected (offline netflix)
Cons:
- maintenance is hard because you have to push it out to every client
When sending data, what does it mean to “push”?
Send an announcement, data to peers and no response is needed
When sending data, what does it mean to “pull”?
Request/response protocol, (e.g. HTTP), you ask for a response and you get that resource
When sending data, what does it mean to “push/pull”?
Do both push/pull, can announce and respond to requests (P2P)
When would you block?
When you need to know the response before continuning:
- check if logged in
- check if the write worked
What’s a rendezvous?
Synchronizes client and server
- client blocks while it waits for a response
- client and server have the same data for a moment
What’s a callback?
Client sends a message and says where it is to send a message back
- client goes on doing whatever, server eventually sends a message
What’s a relay/buffer?
- Send asynchronously to a middle host
- sender does a push, receiver can be pushed-to, or pull from middle (message queue!)
How does P2P flooding work?
Receive a message, forward message to every peer except the one that sent it (message is received by a peer multiple times)
How does P2P gossiping work?
Flooding, but only to some neighbours which reduces the avalanche of methods