• Keine Ergebnisse gefunden

Discovery

Im Dokument I-Centric Communications (Seite 86-89)

3 ARCHITECTURAL FRAMEWORK 27

3.3 SUPER DISTRIBUTED OBJECTS

3.3.5 Common Interfaces of Super Distributed Objects

3.3.5.1 Discovery

The functional requirements outlined in section 3.3.3 identified the necessity of a mechanism that allows an SDO to gather information about the cumulative resources and capabilities of all SDOs currently present in the network. There are two complementing implementations of such a discovery mechanism:

- pro-active presence announcements and

- a re-active search.

The pro-active announcement mechanism is a way for an SDO to publicize its capabilities to all other SDOs in the network. These announcement messages provide a description of the services the SDO is providing as well as the status of its presence in the network (whether it is new in the network, been in the network for a while or leaving the network). Announcement messages are spread across the network, possibly by means of multicast or broadcast communication pro-tocols. Furthermore, these announcement messages can be sent intentionally on different occa-sions.

An SDO can save the announcement message it receives, if the SDO is interested in a service or capability of the announcing SDO. These stored announcement messages can later be used by an SDO to contact directly a proper SDO when needed for a certain service. It keeps the refer-ences to both of these SDOs.

However, the drawback of using such announcement messages alone is that new SDOs have to wait for such announcements before they can try to contact other SDOs. Additionally, SDO might accumulate stale announcement data if they miss messages due to network problems or processing congestions.

To bypass these drawbacks and in order to improve the interconnection abilities, an additional search mechanism is provided. The search procedure enables SDOs to find specific SDOs or services in the network.

SDO Announcements

The announcement mechanism gives SDOs the possibility to spread information about them across the SDO network. To participate in the announcement processes, an SDO must possess the capabilities to create and publish announcements, to receive and interpret somebody else’s announcements and to store them if needed. On leaving, the SDO should inform other partici-pants about it, so that they can update their information about available SDOs and services.

An SDO can send three different types of announcement message to the network:

- NEW : the SDO is new in the network.

- ALIVE : the SDO still exists in the network.

- LEAVE : the SDO is leaving the network.

Arrival: When joining a network, an SDO sends an announcement message across the network to notify network participants about its existence and to provide information about itself. The other SDOs receiving the announcements will interpret it in order to learn if the advertising SDO is useful for their own services (e.g. if the SDO provides services that the receiving SDO might need now or later). In this case, the SDO can store the announcement (or the reference to the SDO) and refer to the sending SDO. Since, the announcement message includes the address of publishing SDO direct contacts between SDOs are possible without the need for a mediator.

Leaving: When leaving the network, the SDO sends announcement message LEAVE. Upon re-ceiving such messages, other SDOs will react accordingly. For example, if TemperatureCon-troller SDO receives a message specifying that the Airconditioner SDO has left the network it will remove its reference to the Airconditioner SDO and will not try to invoke its service.

However, since SDOs can leave the network unexpectedly (in case of network failure), without being able to send the LEAVE messages, a mechanism is needed to ensure that other SDOs can determine that the SDOs that left the system is no longer existent in the system. For this pur-pose, the announcements include the period specifying the validity of such messages. Before the validity of such messages expires, the SDO must renew it by sending ALIVE message. If an announcement from an SDO is not received before the validity expires, other SDOs should pre-sume that this SDO no longer exist in the system.

Figure 47: SDO announcements.

The process of SDO announcements is shown in message sequence chart in Figure 48. An SDO that joins the network sends the NEW announcement to all SDOs in the system (messages 1 and 2). The announcement message contains the period of the announcement validity. If this period expires and the SDO remains in the system, it broadcasts ALIVE announcements (messages 3, 4). The SDO broadcasts ALIVE announcements during its presence in the network shortly be-fore the previous announcements become invalid. When leaving the network, the SDO sends LEAVE announcements, so that the SDOs that have cached its announcements can remove them and free their resources.

NEW announcement LEAVE announcement SDOs inform the network participants about their intentions by means of announcements. SDO A joins the network and sends NEW

announcements; SDO B is about to leave and spreads LEAVE

announcements across the network.

SD O

SD

A O

B SDO network

[join]

[leave]

sdo1 : SDO sdoN : SDO newSDO : SDO

broadcast to all SDOs in the system [AnnouncementType:

NEW

1: announce(in AnnouncementMsg) 2: announce(in AnnouncementMsg)

3: announce(in AnnouncementMsg) 4: announce(in AnnouncementMsg) broadcast to all SDOs

in the system [AnnouncementType:

ALIVE 5: announce(in AnnouncementMsg) 6: announce(in AnnouncementMsg)

7: announce(in AnnouncementMsg) 8: announce(in AnnouncementMsg) broadcast to all SDOs

in the system [AnnouncementType:

LEAVE

...

Figure 48: Message Sequence Chart: Announcement Search

SDOs can use the Discovery interface to search for SDOs or services they need. For search pur-poses, data structures for request specification are defined. For the definition of search criteria, search masks are used. The appropriate properties of the requested SDO are specified in SDO-Mask; device properties can be defined in the DeviceProfile mask, and service properties in ServiceMask.

sdo1 : SDO sdo2 : SDO sdo3 : SDO ... sdoN : SDO

1: searchSDO(in SDOMask, in DeviceProfile, in ServiceMaskList)

4: sdo2 sdo2 & sdo3

match the searched parameter

search for SDOs

6: searchService(in SDOMask, in DeviceProfile, in ServiceMask) 5: sdo3

9: Service service in sdo3

matches the searched parameter

Figure 49: Message Sequence Chart: Search

The search process for SDOs and services in network is shown in Figure 49. The searching SDO (sdo1) sends to all SDOs in network the search request with search conditions specified in the appropriate masks (message 1). The SDOs whose properties fulfill the search criteria (sdo2 and sdo3 in the diagram) answer the request by sending their addresses back to the searcher.

The format of the addresses depends on the SDO basis technology. For example, in CORBA-based SDO middleware the SDOs respond with their object references. Subsequently sdo1 can use these addresses to access SDOs and request details of their properties or services.

The procedure of search for services is similar to the search for SDOs. The searching SDO spreads the request with the appropriate search masks across the network. The SDOs that pro-vides services matching the criteria can respond by sending back the addresses at which these services can be reached (in the diagram, sdo3 sends back the address of its service). As outlined before, the format of these addresses depends on the basis technology of SDOs.

The SDO announcement and search mechanisms described above are assumed to operate in a decentralized system. In this case, when publishing services by an announcement or searching for other SDOs’ services, the announcement/search messages must be broadcasted to all SDOs present in the network.

Unlike this, in systems with a centralized discovery service, all the data concerning the SDOs currently available in the system is collectively stored in the server. Consequently, there is no need to broadcast announcements to all SDOs - it is sufficient to send the announcement mes-sages only to this central entity. The search for an SDO or service can be performed in the simi-lar way, by sending a search request to the discovery service. Besides, since the discovery ser-vice possesses information on all SDOs available in the network or group, it is possible to re-trieve information about all SDOs as a group.

Im Dokument I-Centric Communications (Seite 86-89)