Shared Flashcard Set

Details

Comp2005 - Lecture 2 - Distributed Objects
Alejandro Saucedo - Comp2005 Lecture 1 FlashCard Set
31
Computer Science
Undergraduate 2
05/17/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Show a diagram of the middleware layers for Remote Invocation
Definition
[image]
Term
What are the main remote invocation types?
Definition
  • Request-reply protocols
    • Low level support for remote operations
  • Remote procedure calls (RPC)
    • Call remote procedures
  • Remote method invocations (RMI)
    • Object oriented RPC
Term
What are the characteristics of Request-Reply communcation
Definition
  • Supports client-server interaction
  • Client blocks until reply arrives
  • Message structure: Message type, requestid, remoteReference, operationid, arguments
  • Some implementations use TCP to ensure reliability
  • Some use UDP for efficiency
  • Timeouts used to detect server crashes or dropped messages, recovery is by resending request and filtering duplicate replies
Term
Show an example of Request-Reply communication
Definition
[image]
Term
What are the RPC fault-tolerant semantics?
Definition
  • Underlyig request-reply protocol may
    • Retransmit request messages until receive reply
    • Filter out duplicate requests at server
    • Retransmit results without re-excecuting operations
  • Fault tolerant measures
  • Maybe semantics
  • At least once semantics
  • At most once semantics
Term
What does fault tolerance maybe RPC semantics consist of?
Definition
  • No fault tolerance built in
  • RPC executed once or not at all
  • Can suffer from communication omission failures or process crashes
Term
What does fault tolerance At least once RPC semantics consist of?
Definition
  • Invoker receives either result (at least one execution) or exception)
  • Achieved by retransmitting requests
  • Can suffer from crash failures (of server) or arbitrary failres (whn procedure is excecuted more than once)
Term
What does fault tolerance At most once RPC semantics consist of?
Definition
  • Invoker receives either result (exactly one execution) or exception (no excecution)
  • Achieved by using all of the above fault-tolerant measures
Term
What are the roles of interfaces in Distributed Systems
Definition
  • Used to control interactions between different components/objects
  • Interfaces cannot specify direct access to variables
  • Sevice interfaces(RPC)/remote interfaces(RMI) specify remote procedures/methods available for remote calls/invocations
  • A different semantics for parameter passing is needed
  • Interface definition languages (IDLs) allo procedures/objects implemented in different languages invoke each other
Term
What is the role of an Interface Definition Language (IDL)?
Definition
Allow procedures/objects implemented in different languages to invoke one another
Term
What is the role of Service Interfaces?
Definition
Specifies remote procedures available for remote procedure calls (RPC)
Term
What is the role of remote interfaces?
Definition
Specify remote methods available for remote method invocations (RMI)
Term
How is RMI similar to RPC?
Definition
  • Supports programming with interfaces
  • Uses request-reply protocols
  • Range of possible semantics: at least/most once
  • Similar levels of transparency
Term
What distinguishes RMI form RPC?
Definition
  • Full expresive power of OOP in distributed systems
  • Richer parameter-passing semantics: parameter include object references
Term
What does the object model consist of?
Definition
  • Programs consist of collections of interacting objects (data + methods)
  • Objects communicate via method invocation
  • Objects can be accessed via object references
  • Interfaces define sets of methods provided by objects
  • Exceptions used to deal with error conditions
Term
What are the principles of the Distributed Object Model?
Definition
  • Objects physically distributed into several processes
  • Client-server architecture: remote objects are managed by servers and their methods can be invoked by clients using RMI
Term
How are remote objects managed by the client-server architecture?
Definition
  • Client's request is sent in a message to server
  • Method of the object excecuted at server
  • Result is sent back to client in another message
  • This enforces encapsulation; synchronisation primitives used to deal with concurrent addresses
Term
What are other distributed object models?
Definition
  • Replicate objects to achieve fault tolerance and enhanced performance
  • Migrate objects to enhance performance and availability
Term
Explain the Distributed Object Model and its components
Definition
  • Several processes (on different machines), each containing a collection of objects
  • Objects in the same process communicate via the local method invocation
  • Objects in different processes communicate via remote method invocation
  • Objects that can receive remote method invocations are called remote objects
  • Remote object reference is needed to access a remote object
  • Remote interface specifies which methods of a remote object can be invoked remotely
  • RMIs should be able to raise exceptions due to either distribution or error conditions
Term
Show a diagram of the Distributed object model
Definition
[image]
Term
What are some principles of Remote Object References?
Definition
  • Similar to local remote object references
  • Can be passed as arguments to results of RMIs
  • Serve as unique identifiers for remote objects, valid throughout a distributed system
  • Format ensures uniqueness over space and time (first 4 fields), and describes the methods offered by the remote object (last field)
Term
What elements does remote object references contain?
Definition
  1. IP address
  2. Port number
  3. Time of creation
  4. Local object number
  5. Interface of remote object
Term
How are remote methods accessed?
Definition
  • Through a remote interface
    • Only methods of remote interface can be invoked by objects in other processes
Term
What are some issues that RMI must address?
Definition
  • Location transparency: client should not know the location of the object it invokes
  • Access transparency: remote and local objects accessed in the same way; can only be partially achieved
  • Mechanism for acquisition of remote object references
  • Ability to raise exceptions due to distribution
  • Distributed garbage collection, if garbage collection is supported
Term
A diagram showing RMI implementation
Definition
[image]
Term
Explain the components of an RMI implementation
Definition
  • Communication modules transmit requests and replies between client and server processes
  • Remote reference modules create remote object references and translate between local and remote object references
  • Remote object table records correspondence between local and remote references
  • Proxy makes remote invokation transparent: client can make what looks like a local method invocation
Term
What role does the Proxy have in the RMI implementation?
Definition
  • Makes remote invocation transparent
  • Behaves like a local object to the invoker
  • One proxy for each remote object for which a process holds a remote reference
  • Its class (stub) implements the methods in the remote interface of the object it represents
  • Instead of executing a method it forwards the invocation to the remote object (after marshaling the remote object reference, id and parameters)
  • It returns the results to the invoking object (after un-marshaling them)
Term
What role does the dispatcher and skelleton have in the RMI implementation?
Definition
  • One of each for each class, representing a remote object
  • Dispatcher receives request messages and calls appropriate method of skeleton
  • Skeleton class implements the methods in the remote interface by:
    • Un-marshaling the request mesasge
    • Invoking the corresponding method of the remote object
    • Marshaling the results/exceptions into a reply message
Term
How is parameter and result passing operate?
Definition
  1. Client calls local method in stub
  2. Stub marshals target object, the method name and the parameters into a message which it sends to the skelleton on the server
  3. Server unpacks message and invokes actual method on server object
  4. Server then marshals result into a message which it sends back as a reply
  5. Client then unpacks reply message and returns result to client object
Term
What is object serialization?
Definition
  • Flattening into serial form suitable for transmission in a message
  • Carried out automatically by the middleware
Term
What is needed for the use of Remote Object References?
Definition
  • Binders (Naming services) are used to maintain a list of remote objects held by server
  • Servers register remote objects by textual names
  • Clients lookup remote objects by names
Supporting users have an ad free experience!