Dipanjan Chakraborty
Anupam Joshi
CSEEUniversity of
Maryland Baltimore County
Anamika:
Distributed Service Discovery and Composition Architecture for Pervasive
Environments
Service
I am Wireless LAN enabled!!Blender!!
I have GPS service!!
Do you have MP3 songs?
Service Discovery
I am looking fora printer!!
Are you a Toaster ??
Definitions• “Service”
– Hardware or software entity residing on any device or platform
• Has distinct functional description• Can be utilized by other services/clients
• “Service Discovery”– Process of discovering the availability of a service in
the neighborhood
• “Service Composition”– Integration and execution of multiple services in the
planned order to satisfy a request
Ad hoc Environment
• Network formed by multiple heterogeneous nodes in the reachable vicinity of one another
• Some nodes are mobile, some are not
• Environment around a device changes dynamically
• Services exist on those devices
Issues of Service Discovery in an Ad hoc Environment
• Discovery Architecture• Registry-based/centralized/semi-centralized
• In Ad hoc Environment– Global request broadcasting
– Global Advertisement and caching
• Discovery method• Unique identifier/Interfaces/attributes
• Language/network independence
• Scalability
Issues of Service Composition in Ad hoc Environments
• Services are distributed in the Environment
• Efficient Service Discovery
• Composition needs to be done in a de-centralized manner
• Fault tolerance and graceful recovery
• Solution should efficiently utilize node/service topology
General Architecture
Network Layer (DSDV/AODV/CSGR etc)
Service IntegrationLayer
Application Layer
Broker Arbitration and Delegation
Service ExecutionLayer
Fault Recovery Module
Service Discovery Layer (Bluetooth SDP, Salutation-lite etc)
Planner
Anamika: System Components
Anamika: Network Manager
• Communication between Bluetooth peers done over RFCOMM
• Connect-transmit-disconnect mode of operation
• Segmentation and reassembly of Anamika messages
• Implementation done on IBM’s Bluedrekar transport driver
Anamika: Service Discovery
• Peer-to-peer service discovery (Group-based Service Discovery)
• Dynamic caching of discovered services in peers
• Semantic description based service matching (using DAML-S and DReggie Ontology)
• Service Discovery also provides invocation information
GSD Protocol Summary
• GSD= Group-based Service Discovery
• Peer-to-peer caching of service advertisements– No global advertisements– No global request broadcast
• Describe services semantically in DARPA Agent Markup Language (DAML)– Enhance service matching mechanism based on
semantic description
GSD Protocol Summary• Class/subClass hierarchy of DAML used to classify
services to different groups based on functionality• Intelligently forward requests to appropriate nodes
– Prevent request flooding• Efficient in terms of bandwidth usage and discovering a
service in a MANET
Group-based Request Routing
S1 (G1)
S4,G1,G2,G3
N4: S1 (G1)
N1: S4
N5: S2 (G2)
N3: S3 (G3)
N2
Source
Advertisement
Service Request
N6: S6 (G2)
Service Composition Techniques
• “Request Processor” uses DAML-S to model Composition Knowledge
• Dynamic Broker Selection Technique– No assumption about the platform of the broker/central
entity– Broker Arbitration and Delegation
• Source of the request starts a process which decides the broker platform
– Parameters based on current processor usage, memory capability, longevity, services available in its vicinity etc
Dynamic Broker Selection Technique (contd)– Broker discovers *all* the required services– Fault tolerance
• Source-monitored fault-tolerance– Assumption: Source remains ‘alive’ all the time
• Periodic ‘checkpoints’ being sent to the source
• Source issues a new composition request in case of failure
Service Composition Techniques• Distributed Brokering Technique
– Broker Arbitration and Delegation• Requester is responsible to determine the ‘first’ broker
– Parameters to select a broker are similar to the ‘dynamic Broker selection’ mechanism
» More emphasis on services that are needed ‘immediately’
– ‘first’ broker not responsible for the whole composition
• Composes only ‘as much’ as it can• ‘radius’ of composition is small
– ‘first’ broker selects another broker when it has completed the ‘partial’ composition
Distributed Brokering Technique (contd.)– Fault Recovery
• Similar to the one used in ‘dynamic entity selection’ mechanism
– Each broker keeps the client informed about the partial state of composition and execution
– Client issues a new composition request with the subset that is remaining
Results
• Simulation carried in Glomosim simulator
• 25 to 100 nodes
• Movement pattern=random way-point
• Radio Range of each node=31 meters
Results
Effect of Advertisement Diameter on Request Diameter
0
1
2
3
4
5
6
7
1 2 3 4 5 6
Advertisement Diameter
Avg
. R
equ
est
Dia
met
er
Avg. Request Diameter
Results
Group-based Selective Forwarding vs. Broadcasting w.r.t No. of Requests (Static Topology)
0
10
20
30
40
50
60
1 2 3 4
Number of Advertisement Hops
Av
g. S
erv
ice
Re
qu
es
ts P
roc
es
se
d b
y a
No
de
Broadcasting Requests to all Neighbors
Selective Service group-based Forwarding
Results
Group-based Selective Forwarding vs. Broadcasting w.r.t No. of Requests (Mobility=30(1,4))
0
10
20
30
40
50
60
70
80
1 2 3 4
Advertisement Diameter
Avg
. N
o.
of
Req
ues
ts P
roce
ssed
/N
od
e
AbsoluteForwarding ofRequestsGroup-basedSelectiveForwarding
ResultsGroup-based Selective Forwarding vs. Broadcasting w.r.t No. of Requests (Mobility=3(1,4))
0
10
20
30
40
50
60
70
80
1 2 3 4
Advertisement Diameter
Av
g. N
o. o
f B
roa
dc
as
ts p
er
No
de
Complete Broadcasting
Group-based Selective Forwarding
Results
Effect of Response Time on Number of Services needed for a Composite Process
0
5
10
15
20
25
30
35
40
45
1 2 3 4 5
Number of Services
Ave
rag
e R
esp
on
se T
ime
(Sec
on
ds)
Average Response Time to Discover allservices
Future Work
• Simulation of the whole composition architecture
• Implementation of a pro-active service discovery and composition architecture
• Mathematical modeling of the discovery and composition process