Professional Documents
Culture Documents
Service Discovery Middleware: Finding Needed Services
Service Discovery Middleware: Finding Needed Services
Middleware:
Finding Needed Services
Introduction
• Mobile clients depend more on dynamic interaction with their environment,
discovering services as needed.
• While a desktop computer typically has ready access to many peripheral devices
such as printers, scanners.
• This naturally makes device mobility less painful—moving a device from home to
an office and then to a friend’s home requires no reconfiguration
Introduction
• A service discovery framework is a collection of protocols for developing highly
dynamic client-server (CS) applications that standardizes a number of common
mechanisms for interaction between clients and services.
• The service discovery frameworks that have been proposed to date, for example,
Jini, Universal Plug and Play etc.
Introduction
• All service discovery frameworks support the concepts of client and service,
defined in the typical sense.
• Service subtyping:
• Clients may be interested in specific type of service e.g. high
resolution color printer required to print photo.
• In other cases black and white printing service is required.
Service subtyping allows clients to specify a needed service
type with required detail.
Service insertion and advertisement: Service advertisement
allows dynamic insertion into and removal of services from
the network, providing an extension of plug and play
technologies into a networked environment.
Services slip into a network with minimum manual
configuration and advertise their availability either directly
to clients or to servers maintaining catalogs of services.
Services leaving a network can advertise their departure.
Service Browsing: browsing allows clients to explore the
space of currently available services without prior
knowledge of network environment and without any specific
service types in mind.
Information obtained through service browsing may be
presented to user in a GUI and then user can select the
service to interact with.
Service Catalogs: Services perform advertisement against
one or more catalogs rather than interacting with the
clients directly.
Similarly clients query catalogs for needed services rather
than searching the network for services.
The advantages are greater flexibility in deploying
services beyond the local network segment and a
reduction in multicast traffic.
Eventing : Eventing allows asynchronous notification of
interesting conditions e.g. a needed service becoming
available or an important change in the state of the
service such as printer running out of paper.
An eventing mechanism provides more timely
notifications of important events.
Garbage collection: it facilitates remove outdated
information from the network, including advertisements
associated with dysfunctional services and subscriptions to
eventing services.
Otherwise clients try contact non-existence services or
services continue to perform operations on behalf of crashed
clients. Critical for proper operation of service catalog.
• Globally unique identifiers for services so that individual service instances can be
tracked.
• How services are located
• Methods for standardization.
Universally unique identifiers
• It is useful to be able to identify services uniquely, particularly in large
networks where many instances of the same service type may be
present.
• Assigning universally unique identifiers (UUIDs) to services has
several benefits:
• It allows clients to search for a specific service by its identifier.
• It allows clients and service catalogs to determine if two service
instances are in fact the same service
If the version field contains 1, then the node field is set to a 48-bit MAC address, the
clock_seq field is set to a random number, and the three time fields are set to a 60-bit measure
of elapsed time (in 100-ns increments) from midnight, October 15, 1582.
If the version field is 4, then the other fields (except for the variant) are set to a random
number.
The second issue is choosing the particular protocol used between a client and a
service instance. Some service discovery frameworks, such as SLP, use an
attribute to specify an external protocol that is used for client/service
communication; SLP is not concerned with the definition of this protocol.
• A client configured statically with the location of one or more service catalogs (in
the case of catalog-based frameworks such as Jini) or services (in peer-to-peer
systems such as UPnP) can contact the needed resources directly.
• Unicast discovery protocols typically use TCP/IP or another reliable, stream-
oriented transport protocol.
Unicast Discovery
Multicast discovery and
advertisement
• Discovery
• Advertisement
Multicast discovery and
advertisement
• Service advertisement is the converse of discovery, allowing services entering or
leaving a network to advertise their availability (or unavailability).
• In addition, services periodically advertise their presence for the benefit of clients
that have just entered the network.
Multicast Discovery
Service catalogs
• An alternative to putting clients and services directly in touch with one another is
to deploy catalogs of available services.
• Clients make discovery attempts against these service catalogs and services
advertise directly to the catalogs.
• The first is dramatically reduced multicast traffic because once service catalogs
are discovered, multicast is not necessary for future service discovery or service
advertisements.
• Another is that discovery is extended beyond the multicast radius of the local
network because the locations of remote service catalogs can be configured.
Service catalogs
• The catalog needs to give the developer all the information she needs
to make good use of these services.
Service catalogs
• Sample of the information included in a service catalog:
• Without a mechanism for removing network state associated with dead clients
and services, an tremendous amount of “garbage” eventually would gather.
• The timeout allows a service to express the expected period during which clients
might expect to interact successfully with the service.
Security :
Jini
• JINI depends heavily on Java’s security model, which provides tools such as
digital certificates, encryption, and control over mobile code activities such as
opening and accepting socket connections, reading and writing to specific files,
and using native methods.
• The purpose of the Jini architecture is to join together groups of devices and
software components into a single, dynamic distributed system.
The heart of the Jini system is a trio of protocols called discovery, join, and
lookup.
It functions similarly but provides more advanced searching capabilities and
mechanisms for distributed object applications.
Jini
A pair of these protocols .
Discovery occurs when a service is looking for a lookup service with which to register.
Join occurs when a service has located a lookup service and wishes to join it.
Lookup occurs when a client or user needs to locate and invoke a service described
by its interface type.
Steps
Service provider locates a lookup service by multicasting a request on the local
network or a remote lookup service known to it in prior.
A service provider registers a service object and its service attributes with the
lookup service.
A client requests a service by Java type and, perhaps, other service attributes.
Then, client interacts directly with the service provider via the service object.
Architecture
Security:
SLP
• The Service Location Protocol (SLP, srvloc) is a service discovery
protocol that allows computers and other devices to find services in
a local area network without prior configuration. SLP has been
designed to scale from small, unmanaged networks to large
enterprise networks. It has been defined in RFC 2608 and RFC 3224
as standards track document.
• SLP:
• User agent
• Service agent
• Directory agent
• Does not define protocols for communication
• Prevents the propagation of false info about service loaction
• Messages in SLP have attached authentication blocks
• Support DSA and SHA
Interoperability middleware
• Interoperability middleware can bridge service discovery domains, allowing
clients of one type (e.g., Jini) transparently to access services of another sort (e.g.,
a UPnP printer).
• Interoperability middleware bridges service advertisement, discovery, and client/
service interaction in one or both directions (e.g., Jini to UPnP, or SLP to and from
Jini).
NINJA
• Java based, using service catalog with service descriptions expressed
in XML
• Support capability based discovery
• Client without credentials are not even able to look up on services.
• NINJA encrypts the communication between client and service
catalog or between service and service catalog.
• In Ninja, digital certificates are used to authenticate all endpoints,