1 / 45

Persistent and Transient Objects

Persistent and Transient Objects. Persistent objects continue to exist even if they aren’t in the address space of a server process Transient objects existence depends on having a server. Binding a Client to an Object. Unlike RPC, distributed objects have systemwide object references

aracely
Télécharger la présentation

Persistent and Transient Objects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Persistent and Transient Objects • Persistent objects continue to exist even if they aren’t in the address space of a server process • Transient objects existence depends on having a server

  2. Binding a Client to an Object • Unlike RPC, distributed objects have systemwide object references • The system may support either implicit binding or explicit binding • The object reference may contain - IP address, port, object name • Or use a location server so we need only address for this server plus the object name

  3. Binding a Client to an Object • (a) Example with implicit binding using only global references • (b) Example with explicit binding using global and local references Distr_object* obj_ref; //Declare a systemwide object referenceobj_ref = …; // Initialize the reference to a distributed objectobj_ref-> do_something(); // Implicitly bind and invoke a method (a) Distr_object objPref; //Declare a systemwide object referenceLocal_object* obj_ptr; //Declare a pointer to local objectsobj_ref = …; //Initialize the reference to a distributed objectobj_ptr = bind(obj_ref); //Explicitly bind and obtain a pointer to the local proxyobj_ptr -> do_something(); //Invoke a method on the local proxy (b)

  4. Parameter Passing • Since we have systemwide object refs, we don’t have the same types of problems we had with RPCs and pointers • However, for performance motives we may want to treat object ref parameters differently depending on where the object resides

  5. Parameter Passing • The situation when passing an object by reference or by value. 2-18

  6. Java RMI • Java offers remote objects as the only type of distributed object • One difference between local and remote objects is that synchronized methods work differently on the two types • Blocking applies only to the proxies of the remote objects • A parameter passed to an RMI must be serializable

  7. Message-Oriented Communication • Neither RPC nor RMI works when we can’t assure that the receiving side isn’t executing • We can use messaging in this case

  8. Message-Oriented Communication • General organization of a communication system in which hosts are connected through a network 2-20

  9. Messaging Modes • Messaging systems can be either persistent or transient • Are messages retained when the senders and/or receivers stop executing? • Can also be either synchronous or asynchronous • Blocking vs. non-blocking

  10. Persistent Communication • Persistent communication of letters back in the days of the Pony Express.

  11. Persistence and Synchronicity in Communication • Persistent asynchronous communication • Persistent synchronous communication 2-22.1

  12. Persistence and Synchronicity in Communication • Transient asynchronous communication • Receipt-based transient synchronous communication 2-22.2

  13. Persistence and Synchronicity in Communication • Delivery-based transient synchronous communication at message delivery • Response-based transient synchronous communication

  14. Message-Oriented Transient Communication • Sockets are an example of message-oriented transient communication • The Message-Passing Interface (MPI) is a newer set of message-oriented primitives for multicomputers • MPI communication takes place within a known group of processes • A (groupID, processID) pair uniquely identifies a source or destination of a message

  15. The Message-Passing Interface (MPI) • Some of the most intuitive message-passing primitives of MPI.

  16. Message-Oriented Persistent Communication • Known as message-queuing systems or Message-Oriented Middleware (MOM) • Support persistent asynchronous communication • Generally have slow communications • Similar to e-mail systems • Basic model - applications communicate by inserting messages in specific queues

  17. Message-Queuing Model • Four combinations for loosely-coupled communications using queues. 2-26

  18. Message-Queuing Model • Basic interface to a queue in a message-queuing system.

  19. General Architecture of a Message-Queuing System • Messages are inserted into a local source queue • The message contains the name of a destination queue • The message-queuing system transfers messages to the destination queue • Use a db which maps queue names to network locations

  20. General Architecture of a Message-Queuing System • Queues are managed by queue managers • Special queue managers act as relays which forward messages to other managers

  21. General Architecture of a Message-Queuing System • The relationship between queue-level addressing and network-level addressing.

  22. General Architecture of a Message-Queuing System • The general organization of a message-queuing system with routers. 2-29

  23. Message Brokers • Message-queuing systems can be used to integrate existing and new applications • These diverse applications have different message formats • Since we have old apps, can’t use a standard message format • So use message brokers which convert messages from one format to another

  24. Message Brokers • The general organization of a message broker in a message-queuing • system. 2-30

  25. Example: IBM MQSeries • IBM MQSeries is used to integrate old apps (generally running on IBM mainframes) • Queues are managed by queue managers • Queue managers are connected through message channels • Each of the two ends of the message channel is managed by a message channel agents (MCA) • Queue managers can be linked into the same process as the application using the queue • Queue managers implemented using RPC

  26. Example: IBM MQSeries • General organization of IBM's MQSeries message-queuing system. 2-31

  27. Channels • Some attributes associated with message channel agents.

  28. Aliases • In order to be able to change the name of a queue manager or to replace it with another without having to recompile all of the applications which send messages to it, local aliases are used for queue manager names.

  29. Message Transfer • The general organization of an MQSeries queuing network using routing tables and aliases.

  30. Message Transfer • Primitives available in an IBM MQSeries MQI

  31. Stream-Oriented Communication • Multimedia systems use stream-oriented communications • The timing of the data delivery is critical in such systems • Such communication is used for continuous media such as audio where the temporal relationships between different data items are meaningful as opposed to discrete media such as text

  32. Stream-Oriented Communication • Data streams have several modes • Asynchronous transmission mode places no timing constraints on the data items in a stream • Synchronous transmission mode gives a maximum end-to-end delay for each item in a data stream • Isochronous transmission mode gives both maximum and minimum delays • Bounded jitter

  33. Stream-Oriented Communication • Streams can be either simple or complex (with several related simple substreams) • Related substreams will need to be synchronized • Streams can be be seen as a channel between a source and a sink • Source could be a file or multimedia capture device • Sink could be a file or multimedia rendering device

  34. Data Stream • Setting up a stream between two processes across a network.

  35. Data Stream • Setting up a stream directly between two devices. 2-35.2

  36. Data Stream • An example of multicasting a stream to several receivers.

  37. Streams and QoS • Time-dependent requirements are generally expressed as Quality of Service (QoS) requirements • The underlying distributed system and network must ensure that these are met • We can express such requirements using a flow specification • Partridge’s model uses a token bucket algorithm

  38. Specifying QoS • A flow specification.

  39. Specifying QoS • The principle of a token bucket algorithm.

  40. Setting up a Stream • Before a stream is opened between source and sink resources through the network must be reserved in order to meet the QoS requirements • Bandwidth • Buffers • Processing capability • Figuring out how much of each is required is difficult since they aren’t specified directly in the QoS • RSVP is a protocol for enabling resource reservations in network routers

  41. Setting Up a Stream • The basic organization of RSVP for resource reservation in a distributed • system.

  42. Stream Synchronization • An important issue is that different streams (possibly substreams of a complex stream) must be synchronized • Continuous with discrete • Continuous with continuous (more difficult) • Different levels of granularity for syncing required depending on situation

  43. Synchronization Mechanisms • Synchronization can be carried out by the application • Can also be supplied by a middleware layer • Complex streams are multiplexed according to a given synchronization specification (e.g. MPEG) • Syncing can occur either at the sending or receiving end.

  44. Synchronization Mechanisms • The principle of explicit synchronization on the level of data units.

  45. Synchronization Mechanisms • The principle of synchronization as supported by high-level interfaces. 2-41

More Related