11-12-2012, 01:10 PM
Distributed Computing
1Distributed Computing[.pdf (Size: 45.99 KB / Downloads: 35)
Distributed system
• Supports distributed computing
• What should a distributed system provide?
- Illusion of one system while running on multiple
systems
- Transparancy of resources
• Issues
- Communication, failure handling, synchronization
- Protection, security
- Resource management (allocation of process,
devices, memory, re-allocation)
- Naming (of resources, locating)
- Data management (files, sharing)
- Deadlock
RMI features
• Distributed object model
- Objects: normal and remote
• Idea
- Remote object exists on other host
- Remote object can be used as normal object
- Behavior described by interface
- Environment takes care of remote invocation
• Differences normal and remote objects
- Remote references can be distributed freely
- Clients only know/use interface, not actual
implementation
- Passing remote objects by reference, normal
objects by copying
- Failure handling more complicated since
invocation itself can also fail
Exceptions
• Extra things may go wrong
- Connection may break
- Server may be down (or go down halfway
invocation)
- Server may refuse (e.g. too busy)
- Server does not trust data from client (security
problem)
- etc.
Parameter passing
• Non-remote objects
- Passed by copy
- Graph of related objects is packaged
(marshalled) at client side
- Packaged data is unmarshalled at server side
and reconstructed into local object graph
• Remote objects
- Stub of remote object is passed as non-remote
object
- Stub contains information on location of server
object
Security
• Loading of classes
- When stub (i.e. remote object) is received (in
server or client), its class is loaded
- Only if not already loaded
- Loaded by appropriate ClassLoader, same as
class from which new class is needed
• Stubs may misbehave, e.g. trojan horse
- Classes only loaded when SecurityManager is
running
- Stub contains location from which classes may
be loaded
- Class location may or may not be used
- Policy implemented in SecurityManager
• Other security issues
- Firewall inhibits direct communication (via
sockets) needed by RMI
- Invocation need to be wrapped in to HTTP
requests (which are passed)