• No results found

FuzzySpace – A Distributed Communication Platform

The model to spread context information and the change of relevance based on temporal and spatial distance is created with regard to context. However it can be observed that for other communication purposes in Ubiquitous Computing the notion of relevance and spatial and temporal distance is also applicable.

In this section a communication platform incorporating these features will be presented. The FuzzySpace is a general communication platform with an underlying semantic distribution model targeted for Ubiquitous Computing environments. In a later section the FuzzySpace will be refined for the use in context-aware systems.

6.5.1 Architecture

This communication architecture consists of three types of components: message producers, message consumers, and the FuzzySpace as communication platform in between. The FuzzySpace is based on a tuple space that is extended with spatial and temporal semantic. The general architecture is depicted in Figure 23.

Components that supply messages to the system are denoted as message producer, components that read messages from the system are denoted as message consumer. Each message producer and consumer is at any given point in time at a specified position.

Consumer and producer can communicate with the FuzzySpace. If a component supplies messages and also reads messages it incorporates a consumer and a producer.

6.5.2 FuzzySpace

The FuzzySpace realises the underlying communication platform. It is developed as an extension to tuple spaces [Gelernter,82]. The FuzzySpace offers the possibility for independent communication between components without prior knowledge of each other. To provide a communication semantic similar to the observations stated earlier a spatial and temporal spreading semantic is built into the platform. Designing FuzzySpaces as an extension of tuple spaces was a deliberate choice as it allowed to reuse findings and implementations available.

All elements in the FuzzySpace are inherently bound to a location and a time. When communication facilitates the FuzzySpace each element has assigned a relevance value dependent on the time and location of access.

In tuple spaces that are deployed for loosely coupled systems common basic operators are add, read, and remove [Wyckoff,98]. The FuzzySpace offers a subset of these operations, which are extended by location and time. Elements that are added to the FuzzySpace are always associated with a location and are implicitly associated with a time – the time when they are added. When reading from the FuzzySpace this is similar – it implicitly happens always at a certain time and is explicitly bound to a location. Typically the location is related to the device that is communicating.

6.5.2.1 Operators

The following operators are derived from standard operators for tuple spaces extended to support the requirements stated above. The main differences result from mechanisms to dynamically include temporal and spatial relevance with each tuple. The primitives presented here are basic operators for the management of FuzzySpaces

FuzzySpace M essage Producer

Message C onsumer

as communication instances as well as primitives that allow system components to access the FuzzySpace.

The following basic operators support the creation, deletion, and querying of particular instances of a FuzzySpace.

CREATE_FS(<description>?, <FuzzySpace_Handle>!)

The function CREATE_FS creates a FuzzySpace in the system. The only input parameter is the description for the instance of the FuzzySpace. The description is an arbitrary data structure. In the implementation a string of characters is used to represent the description, this can be used to provide a free form description or to store a structured description by using data types on top of the character string, such as an XML description. The description can then be used to identify FuzzySpace. The return value is an object that is the identifier for the FuzzySpace.

DROP_FS(<FuzzySpace_Handle>?, <Status>!)

Using the function DROP_FS a FuzzySpace can be deleted from the system. The input parameter <FuzzySpace_Handle> identifies uniquely the instance of the FuzzySpace that should be deleted. When an instance of a FuzzySpace is removed from the system all data that is still in the FuzzySpace at this time is delete as well. Ongoing communications between other components in the system and the FuzzySpace are terminated, too. The return parameter <Status> offers information whether or not the operation was successful.

DESCRIBE_FS(<FuzzySpace_Handle>?,<description>!)

The function DESCRIBE_FS is used to access the <description> for a FuzzySpace that is identified by the <FuzzySpace_Handle>. The description that is retrieved with this command was stored with the create command.

QUERY_FS([<search_term>?],{<FuzzySpace_Handle>}!)

By using the function QUERY_FS the handles to all available FuzzySpaces can be retrieved from the system. The function returns a set of handles that identify

FuzzySpaces matching the query. When no <search_term> is supplied all handles available in the system are provided as a result. If a value for this optional parameter is specified, only FuzzySpaces that contain the search term in their description are returned.

System components that use the FuzzySpace to communicate, such as message producer and message consumer, need basic operators to provide and read data. In contrast to standard tuple spaces no operator for removing data elements is required. The existence of elements is strictly defined by the characteristic of the spatial and temporal distribution. Operations are executed at a specific position and at a defined point in time, these values are represented by the variables <Location> and

<Time> which are used in the primitives.

ADD(<FuzzySpace_Handle>?, <Element>?, <Location>?, <Time>?,

<spatial_Relevance_Function>?, <temporal_Relevance_Function>? <Status>!)

The function ADD is used to add elements to an instance of a FuzzySpace that is identified by <FuzzySpace_Handle>.

The <Element> can be any vector or scalar value. The time and spatial position where an element is added to the FuzzySpace is encoded in the parameters

<Location> and <Time>. Further two parameters are used to specify the functions that describe the spatial and temporal relevance of the element that is added. The return parameter <Status> provided information whether or not the operation was successful. MATCH (<FuzzySpace_Handle>?, <Element_template>?, <Location>?, <Time>?, <Minimale_spatial_Relevance>?, <Minimale_temporal_Relevance>?, {<Element>}!)

The function MATCH realises a query for elements in the fuzzySpace identified by the handle. The query is related to the position and time encoded in <Location> and

<Time>. All elements that have a spatial and temporal relevance which is at least as

specified (<Minimale_spatial_Relevance> and

<Minimale_Temporal_Relevance>) and match the template provided (<Element_template>) are selected. These elements are returned in a set together with their relevance values.

6.5.2.2 Message Producer

Message producers are components that generate messages and add them into the FuzzySpace. The message producer utilises the ADD-operator to put elements in the FuzzySpace.

The parameters for using the ADD-operator are gained as follows. The handle to the FuzzySpace is either predetermined (in the case where systems only use one FuzzySpace) or determined using the QUERY_FS-operator. The element that is added is the message itself. The location and time are implicitly given by the time the ADD- operator is executed and by the whereabouts of the component at this time. When implementing a message producer there is knowledge about the semantics of this component, especially how far these messages should be visible and how long they should be available. This knowledge about the specific instance of the message producer is encoded into the spatial relevance function and into the temporal relevance function.

A message producer is characterised by the following 4 parameters:

MP=(<current_location>, <current_time>, <spatial_relevance_function>,

<temporal_relevance_function>);

6.5.2.3 Message Consumer

Message consumers are components that request messages from the FuzzySpace. The message consumer utilises the MATCH-operator to ask for elements that are of interest and that are available in the FuzzySpace.

Similar to the message producer the handle to the FuzzySpace is either predetermined or gathered via the QUERY_FS-operator. The consumer uses an element template to filter results from the FuzzySpace. This template is dependent on the data structures used. The time and location parameter are filled with the current time and current location of the component. A further mechanism to filter the result set is to state minimal relevance required. Only elements that have a higher local and temporal relevance are then matched by the operator.

A message consumer is characterised by the following 4 parameters:

MP=(<current_location>, <current_time>, <required_spatial_relevance >,

<required_temporal_relevance>)

The result can be used by the message consumer directly; as the result set is ordered one option for the message consumer is to use only the first element that is returned and not further process other elements.