Академический Документы
Профессиональный Документы
Культура Документы
Guohong Cao Department of Computer & Engineering 310 Pond Lab gcao@cse.psu.edu
An architectural model simplifies and abstracts the functions of the individual components of a distributed system and then it considers
The placement of the components across a network of computers The interrelationships between the components
Process classification
Server process: a process that accepts requests from other processes client process, peer process.
1 2
Middleware
Mask heterogeneity and provide a convenient programming model
Implement communication and resource sharing to support distributed applications. For example, naming, security, transactions, persistent storage, event notification. Provide building blocks for construction of software components Early packages: RPC, Isis Recently, Object Management Groups Common Object Request Broker Architecture (CORBA), Java remote object invocation (RMI), Microsofts distributed common object model (DCOM).
Client-server model
Servers can be clients, and clients can be servers.
Peer processes
All processes play similar roles.
Mobile code
An applets is responsible to communicate with the server, also referred to as push model, in which the server instead of the clients initiates interaction.
Mobile Agents
A mobile agent is a running program that travels from one computer to another carrying out a task to someones behalf, such as collecting information, eventually returning with the results.
Security
10
Thin clients
Supports a GUI while executing applications on a remote computer Low cost Drawbacks: CAD and image processing may incur network latencies.
11 Guohong Cao (gcao@cse.psu.edu)
Failure Models
Fail stop: a process crashes and remains halted. Send-omission: a process completes a send, but the message is not in the outgoing buffer Receive-omission: a msg is put into a processs incoming buffer, but that process does not receive it. Omission (channel): a message is lost Arbitrary (Byzantine): Anything can happen.
13
14
OSI v TCP/IP
15
32 Bits
Class
IPv4 Header
A B C D E
1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 240.0.0.0 to 247.255.255.255
17
18
Reduced overhead
Used in real-time applications Network management
TCP Header
End-to-end semantics
Acknowledgements sent to TCP sender confirm delivery of data received by TCP receiver Ack for data sent only after data has reached receiver
Cumulative acknowledgements
An acknowledgement acks all contiguously received data
21
22
Establishing a connection
Server
socket() bind() listen()
blocks until data Received from client
data (request)
process request
data (reply)
write()
23
read()
Guohong Cao (gcao@cse.psu.edu)
Server
socket()
Connection-oriented protocol
bind() listen() accept()
blocks until connection from client connection establishment data (request)
Jini Technology
Jini technology allows plug-and-participate
Client
socket() connect()
The arrow indicate the different levels of communication that are required.
After the camera locates the printer service, to print the picture it downloads and runs the java code supplied by the printing service. The code uses the underlying network transport, and perhaps RMI to implement the printing service
read()
process request
write()
write()
data (reply)
read()
26
Jini Technology
Camera
Printe picture
Jini system
Enabling users to share services and resources over a network
service protocol
bridge protocol
Providing users easy access to resource anywhere on the network while allowing the network location of the user to change Simplifying the task of building, maintaining, and altering a network of devices, software, and users.
Network
Jini System
Based on discovery/join protocol, lookup service, and Remote Method Invocation (RMI).
Foreign service
Discovery
service protocol
bridge protocol
Network
29 30
Join
Lookup
Service Invocation
33
34
Characteristics of leasing
A lease is a time period during which the grantor (lookup service) ensures that the holder will have access to some resources. The lease can be cancelled by the holder. The holder can request to renew the lease. Negotiate with the granter A lease can expire. Time: widely distributed system
Use duration instead of absolute time. Not cumulative in the way errors in absolute time. Consider the communication delay
35
37
38
Multicast Announcement
The entity that runs the lookup service
constructs a object, send the multicast establish a server multicast announcement at intervals (120s). Long-live process.
If the entity must respond, Using unicast discovery protocol to connect to the other partys multicast response server
41
Persistent State
A service must maintain certain items of states.
Service ID A set of attributes that describe the services lookup service entry A set of specific lookup services to register with. A set of groups in with the service wishes to participate.
Join Protocol
When a service initially starts up, it should pause a random amount of time (up to 15s). Initial discovery and registration
Perform unicast discovery of each lookup service and register with them. In case of failure, retry or not retry
45
46
Jini device bay could provide power, a network connection, and a processor running a JVM. Devices could be plugged into the bay and announce themselves to the bay.
47
48