Lecture 22 – April 9, 2002
Subprotocols – static and dynamic.
Property access subprotocol
Security models
1
Subprotocols
Dialects – Conversations
The set of Bond messages is partitioned into small
closed subsets of commands necessary to perform
a specific task.
Each message identifies the subprotocol the
message belongs to.
Closed set of messages – commands in a
subprotocol do not reference commands outside it.
An object either understands all messages in a
subprotocol or none of them.
2
Subprotocols
Each Bond object has a property called
SubprotocolsImplemented that lists the
subprotocols implemented by the object.
All Bond objects implement the Property
Access subprotocol.
All agents including implement the Agent
Control subprotocol.
Other suprotocols: Security, Monitoring,
Scheduling, Data Staging, Persistent
Storage, Registration
3
SubprotocolsImplemented = Agent Control, Security
Agent Y
SubprotocolsImplemented = AgentControl,Monitoring
Security
Monitoring
Agent Z
Agent Control
Agent X
Agent X
Property Access
SubprotocolsImplemented
= AgentControl
4
Static subprotocols
A Bond object hierarchy inherits the
subprotocols implemented by the objects
above it in the object hierarchy.
The messaging thread delivers an incoming
message to the say() method of the object.
If the say() method of the object does not
understand the message it passes it to the
say() methods of the immediate ancestor of
the object.
5
Example of protocol inheritance
The ancestors of the bondSchedulerAgent
are bondScheduler, bondAgent,
bondExecutable, bondObject.
The bondSchedulerAgent is capable of
understanding all messages in the Agent
Control subprotocol.
But it does not understand any message in
the Monitoring subprotocol because none of
its ancestors does.
6
Agent control
message
bondSchedulerAgent
Monitoring
message
bondScheduler
(Scheduling)
bondScheduler.say()
bondAgent
(AgentControl)
bondAgent.say()
bondExecutable
Reply
bondExecutable.say()
bondObject
(PropertyAccess)
bondObject.say()
Sorry
7
Dynamic subprotocols; probes
Some objects in a class may need to
understand a subprotocol while others do
not, e.g., some agents agents may need to
monitor others. It would be wasteful to have
all agents speak the monitoring subprotocol.
Probes are specialized objects that can be
attached to a regular object as dynamic
properties
The only function of a probe is to speak a
certain subprotocol.
8
Dynamic subprotocols; probes
The implementation of the bondObject
guarantees that when an object does not
understand a message, its dynamic
properties list is searched for a probe that
can handle the subprotocol and then deliver
the message to the object.
If no probe is found, the object replies sorry.
9
A bondScheduler agent extended with a
monitoring probe
bondSchedulerAgent
Monitoring
message
bondScheduler
(Scheduling)
bondScheduler.say()
bondAgent
(AgentControl)
bondAgent.say()
bondExecutable
bondExecutable.say()
bondObject
(PropertyAccess)
bondObject.say()
Reply to
monitoring
message
Monitoring Probe
10
Probes
Regular - activated after searching the list of
the static subprotocols understood by an
object, e.g., the monitoring probe.
Preemptive - activated before searching the
list, e.g., the security probe.
Autoprobes – used to load dynamically a
probe at run time.
11
public class bondAutoProbe extends
bondProbe { Hashtable lookup;
public bondAutoProbe(bondObject parent) {
super(parent);
lookup = new Hashtable();
initDefaults();
}
12
public void initDefaults() {
addAutoLoad("Monitoring","bondMonitoringProbe";
addAutoLoad("AgentControl","bondAgentFactory");
}
public void addAutoLoad(String name, String
probename){ lookup.put(name, probename);
}
public boolean implementsSubprotocol(String name)
{
if (lookup.get(name) != null) { return true; }
return false;
}
13
// the say() function is used to receive a message
public void say(bondMessage m, bondObject
sender){
String name =
(String)m.getParameter(":subprotocol");
String val = (String)lookup.get(name);
bondProbe p = loader.loadProbe(val);
p.parent = parent;
parent.set("AutoProbe_"+name, p);
p.say(m,sender);
}
}
14
Message sending and delivery- say()
public void say(bondMessage m, bondObject sender) {
if (sender == null) {
sender = m.getSender(); }
String sp = m.getSubprotocol();
if( sp != null ){
if (sp.equals("PropertyAccess")) {
sphPropertyAccess(m,sender);
return; } }
else {
switch (m.performative) {
case bondMessage.PF_SORRY:
case bondMessage.PF_ERROR:
case bondMessage.PF_DENY:
return;
default;}
}
15
if (values != null) {
bondAutoProbe ap = null;
for (Enumeration e = values.elements();
e.hasMoreElements();) {
bondObject o = (bondObject)e.nextElement();
if (bondProbe.class.isAssignableFrom(o.getClass())
&& o.implementsSubprotocol(sp)) {
if (o instanceof bondAutoProbe) ap (bondAutoProbe)o;
} else {
o.say(m,sender);
return; }
}
if (ap != null) { ap.say(m,sender);}
}
}
16
Property access subprotocol
A message consists of a performative, content, and
parameters.
The performative gives the broad meaning of the
message. For example,
ask-one is a question requesting an answer,
achieve is an imperative request,
tell is the response to a question.
The content specifies the actual function requested.
For example, to store and read a property
set
get
17
Examples
If object X wants to obtain the value of the
property w of object Y it sends the following
message:
(ask-one :sender X :receiver Y :subprotocol
PropertyAccess :content get :property w
:reply-with zzzz)
18
Example
Assuming that property w of object Y has
value 7 then object Y replies with the
following message:
(tell :sender Y :receiver X :subprotocol
PropertyAccess :content value :value 7 :inreply-to zzzz)
19
Security models
Authentication
PAP
CHAP
Kerberos
Certificate-based
Access Control
20
CHAP
CHAP - Challenge Handshake
Authentication Protocol
The authentication agent, typically a
network server, sends the client program
a key to encrypt the username and the
password.
21
Kerberos
Kerberos - ticket-based authentication
The authentication server assigns a unique
key, called a ticket, to each user that logs
on to the network.
The ticket is then embedded in every
message to identify the sender of the
message.
22
Certificate-based
This model is based on public key
cryptography. Each user holds two
different keys: public and private.
The user can get a certificate that proves
the binding between the user and its public
key from a third party. The private key is
used to generate evidence that can be
sent with the certificate to the server side.
The server uses the certificate and
evidence to verify the identity of the user.
23
Client
Object
(1)
Client
Security
Context
PAP
Credential
Server A
Security
Context
N
E
T
W
O
R
K
(2)
Server
A
Object
bond
Password
Authenticator
bond
IPAddress
Access
Control
(3)
24
Client
Object
(1)
Client
Security
Context
Server B
Security
Context
Server
B
Object
(2)
bondCHAP
Credential
N
E
T
W
O
R
K
(3)
bond
Challenge
Authenticator
bond
Name-Based
Access
Control
(4)
25
© Copyright 2026 Paperzz