Beruflich Dokumente
Kultur Dokumente
Objects
Persistentobjectscontinuetoexistevenif
theyarentintheaddressspaceofaserver
process
Transientobjectsexistencedependson
havingaserver
Binding a Client to an Object
UnlikeRPC,distributedobjectshave
systemwideobjectreferences
Thesystemmaysupporteitherimplicit
bindingorexplicitbinding
TheobjectreferencemaycontainIP
address,port,objectname
Orusealocationserversoweneedonly
addressforthisserverplustheobjectname
Binding a Client to an Object
a) (a)Examplewithimplicitbindingusingonlyglobalreferences
b) (b)Examplewithexplicitbindingusingglobalandlocalreferences
Parameter Passing
Sincewehavesystemwideobjectrefs,we
donthavethesametypesofproblemswe
hadwithRPCsandpointers
However,forperformancemotiveswemay
wanttotreatobjectrefparameters
differentlydependingonwheretheobject
resides
Parameter Passing
Thesituationwhenpassinganobjectbyreferenceorby
value.
2-18
Java RMI
Javaoffersremoteobjectsastheonlytype
ofdistributedobject
Onedifferencebetweenlocalandremote
objectsisthatsynchronizedmethodswork
differentlyonthetwotypes
Blockingappliesonlytotheproxiesofthe
remoteobjects
AparameterpassedtoanRMImustbe
serializable
Message-Oriented
Communication
NeitherRPCnorRMIworkswhenwecant
assurethatthereceivingsideisntexecuting
Wecanusemessaginginthiscase
Message-Oriented Communication
Generalorganizationofacommunicationsysteminwhich
hostsareconnectedthroughanetwork
2-20
Messaging Modes
Messagingsystemscanbeeitherpersistent
ortransient
Aremessagesretainedwhenthesendersand/or
receiversstopexecuting?
Canalsobeeithersynchronousor
asynchronous
Blockingvs.nonblocking
Persistent Communication
Persistentcommunicationoflettersbackinthedaysofthe
PonyExpress.
Persistence and Synchronicity in
Communication
a) Persistentasynchronouscommunication
b) Persistentsynchronouscommunication
2-22.1
Persistence and Synchronicity in
Communication
2-22.2
c) Transientasynchronouscommunication
d) Receiptbasedtransientsynchronouscommunication
Persistence and Synchronicity in
Communication
e) Deliverybasedtransientsynchronouscommunicationatmessagedelivery
f) Responsebasedtransientsynchronouscommunication
Message-Oriented Transient
Communication
Socketsareanexampleofmessageoriented
transientcommunication
TheMessagePassingInterface(MPI)isa
newersetofmessageorientedprimitives
formulticomputers
MPIcommunicationtakesplacewithina
knowngroupofprocesses
A(groupID,processID)pairuniquelyidentifiesa
sourceordestinationofamessage
The Message-Passing
Interface (MPI)
Someofthemostintuitivemessagepassingprimitivesof
MPI.
Primitive Meaning
2-26
Message-Queuing Model
Basicinterfacetoaqueueinamessagequeuingsystem.
Primitive Meaning
Put Append a message to a specified queue
Block until the specified queue is nonempty, and remove the first
Get
message
Check a specified queue for messages, and remove the first.
Poll
Never block.
Install a handler to be called when a message is put into the
Notify
specified queue.
General Architecture of a Message-Queuing
System
Messagesareinsertedintoalocalsource
queue
Themessagecontainsthenameofadestination
queue
Themessagequeuingsystemtransfers
messagestothedestinationqueue
Useadbwhichmapsqueuenamestonetwork
locations
General Architecture of a Message-Queuing
System
Queuesaremanagedbyqueuemanagers
Specialqueuemanagersactasrelayswhich
forwardmessagestoothermanagers
General Architecture of a Message-Queuing
System
Therelationshipbetweenqueueleveladdressingand
networkleveladdressing.
General Architecture of a Message-Queuing
System
Thegeneralorganizationofamessagequeuingsystem
withrouters.
2-29
Message Brokers
Messagequeuingsystemscanbeusedto
integrateexistingandnewapplications
Thesediverseapplicationshavedifferent
messageformats
Sincewehaveoldapps,cantuseastandard
messageformat
Sousemessagebrokerswhichconvert
messagesfromoneformattoanother
Message Brokers
2-30
Thegeneralorganizationofamessagebrokerina
messagequeuing
system.
Example: IBM MQSeries
IBMMQSeriesisusedtointegrateoldapps
(generallyrunningonIBMmainframes)
Queuesaremanagedbyqueuemanagers
Queuemanagersareconnectedthroughmessage
channels
Eachofthetwoendsofthemessagechannelis
managedbyamessagechannelagents(MCA)
Queuemanagerscanbelinkedintothesame
processastheapplicationusingthequeue
QueuemanagersimplementedusingRPC
Example: IBM MQSeries
GeneralorganizationofIBM'sMQSeriesmessagequeuing
system.
2-31
Channels
Someattributesassociatedwithmessagechannelagents.
Attribute Description
Transport type Determines the transport protocol to be used
Indicates that messages are to be delivered in the order they
FIFO delivery
are sent
Message
Maximum length of a single message
length
Setup retry Specifies maximum number of retries to start up the remote
count MCA
Delivery Maximum times MCA will try to put received message into
retries queue
Aliases
Inordertobeabletochangethenameofa
queuemanagerortoreplaceitwithanother
withouthavingtorecompileallofthe
applicationswhichsendmessagestoit,
localaliasesareusedforqueuemanager
names.
Message Transfer
ThegeneralorganizationofanMQSeriesqueuingnetwork
usingroutingtablesandaliases.
Message Transfer
Primitive Description
MQopen Open a (possibly remote) queue
MQclose Close a queue
MQput Put a message into an opened queue
MQget Get a message from a (local) queue
PrimitivesavailableinanIBMMQSeriesMQI
Stream-Oriented
Communication
Multimediasystemsusestreamoriented
communications
Thetimingofthedatadeliveryiscriticalin
suchsystems
Suchcommunicationisusedforcontinuous
mediasuchasaudiowherethetemporal
relationshipsbetweendifferentdataitemsare
meaningfulasopposedtodiscretemediasuch
astext
Stream-Oriented
Communication
Datastreamshaveseveralmodes
Asynchronoustransmissionmodeplacesno
timingconstraintsonthedataitemsinastream
Synchronoustransmissionmodegivesa
maximumendtoenddelayforeachitemina
datastream
Isochronoustransmissionmodegivesboth
maximumandminimumdelays
Boundedjitter
Stream-Oriented
Communication
Streamscanbeeithersimpleorcomplex
(withseveralrelatedsimplesubstreams)
Relatedsubstreamswillneedtobe
synchronized
Streamscanbebeseenasachannel
betweenasourceandasink
Sourcecouldbeafileormultimediacapture
device
Sinkcouldbeafileormultimediarendering
device
Data Stream
Settingupastreambetweentwoprocessesacrossa
network.
Data Stream
Settingupastreamdirectlybetweentwodevices.
2-35.2
Data Stream
Anexampleofmulticastingastreamtoseveralreceivers.
Streams and QoS
Timedependentrequirementsaregenerally
expressedasQualityofService(QoS)
requirements
Theunderlyingdistributedsystemandnetwork
mustensurethatthesearemet
Wecanexpresssuchrequirementsusingaflow
specification
Partridgesmodelusesatokenbucket
algorithm
Specifying QoS
Aflowspecification.
Specifying QoS
Theprincipleofatokenbucketalgorithm.
Setting up a Stream
Beforeastreamisopenedbetweensourceand
sinkresourcesthroughthenetworkmustbe
reservedinordertomeettheQoSrequirements
Bandwidth
Buffers
Processingcapability
Figuringouthowmuchofeachisrequiredisdifficult
sincetheyarentspecifieddirectlyintheQoS
RSVPisaprotocolforenablingresourcereservations
innetworkrouters
Setting Up a Stream
ThebasicorganizationofRSVPforresourcereservationin
adistributed
system.
Stream Synchronization
Animportantissueisthatdifferentstreams
(possiblysubstreamsofacomplexstream)
mustbesynchronized
Continuouswithdiscrete
Continuouswithcontinuous(moredifficult)
Differentlevelsofgranularityforsyncing
requireddependingonsituation
Synchronization Mechanisms
Synchronizationcanbecarriedoutbythe
application
Canalsobesuppliedbyamiddlewarelayer
Complexstreamsaremultiplexedaccording
toagivensynchronizationspecification
(e.g.MPEG)
Syncingcanoccureitheratthesendingor
receivingend.
Synchronization Mechanisms
Theprincipleofexplicitsynchronizationonthelevelof
dataunits.
Synchronization Mechanisms
Theprincipleofsynchronizationassupportedbyhigh
levelinterfaces.
2-41