230 likes | 265 Views
Lecture 3. From process-oriented to agent-oriented programming. Distributed object systems. Bond objects. Communication. Asynchronous communication. Event handling. Semantic understanding of messages. Probes. Bond basics. Distributed-object system.
E N D
Lecture 3 • From process-oriented to agent-oriented programming. • Distributed object systems. • Bond objects. • Communication. • Asynchronous communication. • Event handling. • Semantic understanding of messages. Probes.
Bond basics • Distributed-object system. • Message passing distributed object system. • Why? • Other systems, e.g. Jini are based upon Java RMI.
Bond objects • A Bond object extends the standard Java object with: • Unique identifier. • Communication support. • Serialization and cloning. • Dynamic properties. • Multiple inheritance. • Visual Editor. • Light-weight objects (e.g. messages, shadows)
Bond resident • Container Object. • Directory. Each object is registered at the time of creation. • Aliases. • Communication Engine – runs at a known port on a system with a given BondIPAddress
Local shadow of a remote object • We wish to communicate with a remote object as if it were local. To do so we need a local representative of the remote object. • Proxy in Voyager • Stub in RMI • Stubs are used to create VONs • Shadows are used to crfeate a local copy of a remote object.
Message composition • The system supports messages in KQML and XML format. • Message composition – putting all pieces together: • The contents of the message. • The source. • The destination. • The sub-protocol – we’ll talk about them later. For now think of a subprotocol as a dialect that two objects understand…..
KQML performatives • Categories of performatives: • Queries: ask; • Responses: tell; • Informational: • Generative: • Capability: • Networking:
Event handling • Java objects use listeners abstractions to capture events. • Corba uses an event service. • Bond uses event waiting slots.
Subprotocols • Dialects. • Closed sets of messages required for a “conversation”. • Each message is stamped with the subprotocol it belongs to. • Each bond object: • has a property called subprotocols implemented that lists all the subprotocols it understands. • Implements the bondAccessSubprotocol
Subprotocol inheritance • Static inheritance • Dynamic inheritance. Probes extend an object and allow it to speak a new protocol. • Probes are dynamic properties.