Professional Documents
Culture Documents
Communication
Communication across address spaces
Local Remote
Same Rules apply
Overview
Mechanism
Message Passing
Abstractions
Message Passing Synchronous: Procedure Calls Asynchronous: Events Coupled: Shared Memory De-coupled: Tuple-spaces
Layered Communication
Application
Distributed System (RPC)
Socket OS
TCP/IP UDP/IP
Local Communication
How would 2 processes communicate? Message Passing: Sockets Shared Memory: Files Procedural call (across address space)? Ever used local RPC? Heard of OLE? COM?
Fault-isolation
Client failure does not affect the server Centralized consistency management
Local RPC
Transparency!
Makes sense?
Issues:
What transpires in a subroutine call?
RPC Components
Client Server
Stub
Client Framework
Skeleton
Server Framework
Network
Remote RPC
Same Issues
BUT transparency makes sense?
To what degree?
Modularization Fault-isolation
But masking? Failure may be partial
Time?
Consistency
Scalable Performance?
Sun RPC
What does a Sun RPC request contain? Wire format
Xid Call orreply RPC version program # program version procedure # auth bits Marshalled arguments
RMI: Objects
Recursive packing
RPC: Summary
Synchronous, Blocking Mimics a procedural call Involves:
Data transfer: Marshaling Thread Migration
NFS Transparency
Tension between performance and consistency
Syntax preserved Not Semantics File read/write semantics
Only check on open() Consistency?
Events!
Events
Subscribe/notify Asynchronous Non-blocking
Subscribe
Notify
Events
Better performance than polling for larger tasks
Do it, let me know when you are done
Preferred mode of communication for interactive applications: none-blocking But Harder to program
Synchronization Spaghetti code
Programming Events
Main thread
Subscribe
Events Handler
Notify
X = 10
Tuple-spaces
Tuple-space
Explicit DSM Tuple as the atomic data object Clearly defined semantics for insert/read/peak