1/23
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Client-Server Model
► There are processes offering services (servers)
► There are processes that use services (clients)
► Clients and servers can be on different machines
► Clients follow request/reply model with respect to using services
Thin Client
A client that relies on a server for processing, often having minimal local resources.
Distributed Application = (Application interface, Data, Processing).
– These component could be local or distributed (between client and server).
– OS and hardware could be different
3-Tier Architecture
• Thin client
• Gateways between clients and backend servers
• Data servers
Parameter marshalling (also called flattening)
convert data item to a stream of bytes
RPC (Remote Procedure Call)
• Goal: make distributed computing look like centralized computing
• Allow remote services to be called as procedures
– Transparency w/ regard to location, implementation, language '
• Issues
– Bindings
– Semantics in face of errors
• Two classes:
– integrated into prog. languages (ex. Java)
– Separate (ex. Courier)
Failure Semantics
• Client unable to locate server: return error
• Lost request messages: simple timeout mechanisms
• Lost replies: timeout mechanisms
– Make operation idempotent
– Use sequence numbers, mark retransmissions
• Server failures: did failure occur before or after operation?
– At least once semantics (SUNRPC)
– At most once
– No guarantee
– Exactly once: desirable but difficult to achieve
Replication Transparency
The practice of concealing the existence of multiple instances of a resource from users.
Interface Definition Language (IDL)
A specification language used to define the interface between client and server stubs.
Interprocess Communication (IPC)
A mechanism allowing processes to communicate and synchronize their actions in a distributed system.
Binding
The process by which a client locates and connects to a server in a network.
Thin client
Instead of having a big, loud and complex computer : a quiet, thin machine that rarely needed an upgrade or a fix
Using thin clients connected to remote servers that handle the processing of data.
Interface and processing at client, data objects at server(s)
– ex. (1) remote file access (NFS), (2) access to database, (3) distributed data processing, (4) database application: distributed data base
Multi-tiered centralized system architectures
Some traditional organizations
►Single-tiered: dumb terminal/mainframe configuration
► Two-tiered: client/single server configuration
► Three-tiered: each layer on separate machine
• What are the type of Data exchanged between client and server in each case?
– Interface protocol
– Remote IPC
– SQL requests, record set
– Request, file blocs
C/S Failure issues
• Failure
– Communication failure
• timeout, retransmission, multiple execution, sequencing.
– Server failure
• multiple execution, partly executed (atomic execution), idempotent action.
– Client failure
• orphans (orphan detection and elimination)
Communication in DS
• Interprocess communication is essential in DS • Comm. in DS is based on low-level message passing in underlying network • Harder than using primitives based on shared memory
Steps of a Remote Procedure Call
1. Client procedure calls client stub in normal way
2. Client stub builds message, calls local OS
3. Client's OS sends message to remote OS
4. Remote OS gives message to server stub
5. Server stub unpacks parameters, calls server
6. Server does work, returns result to the stub
7. Server stub packs it in message, calls local OS
8. Server's OS sends message to client's OS
9. Client's OS gives message to client stub
10. Stub unpacks result, returns to client
RPC protocol: Parameter Specification
a) A procedure
b) The corresponding message
c) caller and callee must agree on the format of the messages they exchange.
d) Caller and callee must agree on the representation of simple data structures (int, char, bool, …)
e) Passing huge data: breakdown into multiple messages
• Client failure: what happens to the server computation?
– Referred to as an orphan
– Expiration: give each RPC a fixed quantum T; explicitly request extensions
• Periodic checks with client during long computations
5- Interface Description & Stub Generation
a) After RPC protocol s defined, client and server need to be implemented
b) Stubs for # procedures differ in their interface to the application
• Interface = collection of procedures to be called by the client
• Interfaces are specified by means of Interface Definition Language (IDL)
• An interface is compiled into a client stub and a server stub
c) Mapping to a specific language (C, Java, …)
Binding a Client to a Server
• Binding: how does a client locate a server
• Server must be registered
• Server registers in a name server or a directory service
• Client must identify machine hosting server and port number daemon is listening to:
– daemon has a well-known port number
– Server is identified statically or dynamically
Client-to-server binding in DCE
• Endpoint, Endpoint table
• Directory server: machine address,name of the server