Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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)(a) Example with implicit binding using only global references b)(b) Example with explicit binding using global and local references Distr_object* obj_ref;//Declare a systemwide object reference obj_ref = …;// Initialize the reference to a distributed object obj_ref-> do_something();// Implicitly bind and invoke a method (a) Distr_object objPref;//Declare a systemwide object reference Local_object* obj_ptr;//Declare a pointer to local objects obj_ref = …;//Initialize the reference to a distributed object obj_ptr = bind(obj_ref);//Explicitly bind and obtain a pointer to the local proxy obj_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 a)Persistent asynchronous communication b)Persistent synchronous communication 2-22.1

12 Persistence and Synchronicity in Communication c)Transient asynchronous communication d)Receipt-based transient synchronous communication 2-22.2

13 Persistence and Synchronicity in Communication e)Delivery-based transient synchronous communication at message delivery f)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. PrimitiveMeaning MPI_bsendAppend outgoing message to a local send buffer MPI_sendSend a message and wait until copied to local or remote buffer MPI_ssendSend a message and wait until receipt starts MPI_sendrecvSend a message and wait for reply MPI_isendPass reference to outgoing message, and continue MPI_issendPass reference to outgoing message, and wait until receipt starts MPI_recvReceive a message; block if there are none MPI_irecvCheck if there is an incoming message, but do not block

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. PrimitiveMeaning PutAppend a message to a specified queue GetBlock until the specified queue is nonempty, and remove the first message PollCheck a specified queue for messages, and remove the first. Never block. Notify Install a handler to be called when a message is put into the specified queue.

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. AttributeDescription Transport typeDetermines the transport protocol to be used FIFO deliveryIndicates that messages are to be delivered in the order they are sent Message lengthMaximum length of a single message Setup retry count Specifies maximum number of retries to start up the remote MCA Delivery retriesMaximum times MCA will try to put received message into queue

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 PrimitiveDescription MQopenOpen a (possibly remote) queue MQcloseClose a queue MQputPut a message into an opened queue MQgetGet a message from a (local) queue

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. Characteristics of the InputService Required maximum data unit size (bytes) Token bucket rate (bytes/sec) Token bucket size (bytes) Maximum transmission rate (bytes/sec) Loss sensitivity (bytes) Loss interval (  sec) Burst loss sensitivity (data units) Minimum delay noticed (  sec) Maximum delay variation (  sec) Quality of guarantee

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


Download ppt "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."

Similar presentations


Ads by Google