Enabling Distributed Context Entity Discovery for an
Internet-of-Things Platform
Hasibur Rahman*, Theo Kanter, Rahim Rahmani Department of Computer and Systems Sciences (DSV)
Stockholm University
Nod Buildning, SE-164 55 Kista, Sweden {hasibur, kanter, rahim}@dsv.su.se
Abstract—Use of context has been prevailing in distributed computing with the emergence of mobile computing. An entity is said to be context-aware if it responds to context changes. These distributed context-aware entities share context information in order to make intelligent decisions or carry out important tasks. MediaSense, an Internet-of-Things (IoT) platform, offers such intelligent provision of context information to any host- anywhere. However, such an IoT platform is facing challenge of discovering context entities. In view of this, this paper particularly addresses the challenge of discovering distributed context entities by extending the distributed protocol, Distributed Context eXchange Protocol (DCXP), for MediaSense platform. In response, an artefact based on publish/subscribe model has been explored to overcome the challenge which enables fast context entity discovery.
Keywords—context; distributed computing; context-aware; Internet-of-Things; MediaSense; DCXP; publish/subscribe
I. INTRODUCTION
Context has been investigated in computer science for over last 50 years [1]. Research into understanding context has introduced the notion context-aware applications. When an entity responds to changes in context, the entity is said to be context-aware. However, there have been several definitions of context. Brown’s definition of context was accepted by many researchers [2] earlier, but recently the definition refined by Dey has been prevailing in computer science- “Context is any information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and applications themselves” [3]. Inspired by this definition, Walters has defined context in Internet-of-Things (IoT) scenario as “Any subset of information that can be used to characterize the situation of an entity as well as its relationship with other entities including the entity itself” [4]. He further extended the definition of context awareness as “The ability to realise an application or service over the situation of an entity or its context based relationships”. Here the entity refers to a physical device or a thing in IoT. Context-aware applications and services aim at provisioning context information to remote end nodes i.e. entities. This means context information needs to be accessed and shared among distributed entities. An entity (e.g. a connected device) that provisions the context information is thereby referred as context entity. Recently, penetration of connected devices is escalating. It is predicted that there would be about 50-500
billion connected devices by 2020 [12], and IoT landscape alone expected to encounter about 200 billion entities [13]. Discovering such enormous amount of entities in the IoT domain has been a research challenge [14]. This massive upsurge of entities mandates a scalable approach in IoT landscape to enable fast context entity discovery.
There have been many approaches that are being proposed to broker context information such as SenseWeb [5] and IP Multimedia Subsystem platform [6]. However, these approaches employ centralized solution which is vulnerable to DoS attacks and configuration errors, and central point of failure [4]. This motivated researchers into developing distributed approaches such as MediaSense [7] and SCOPE [8]. MediaSense is based on a novel distributed protocol called Distributed Context eXchange Protocol (DCXP). DCXP enables real-time context information provisioning between distributed entities. DCXP was first introduced as context dissemination for Ambient Networks [9], and further adopted in [10] for distributed context support for ubiquitous mobile awareness services [10]. DCXP is built upon five primitive messages such as REGISTER_UCI, RESOLVE_UCI, GET, SUBSCRIBE, and NOTIFY [10]. Context entity in DCXP protocol is designated as Universal Context Identifier (UCI). An entity such as sensor node along with its context information registers as UCI. When an entity along with its context information registers as UCI, other entity resolves the UCI to fetch the context information. However, the protocol is now facing challenge of discovering the context entity [11].
The remainder of this paper is organized as follows: section II describes DCXP protocol and MediaSense platform, section III outlines the approach to enable context entity discovery, section IV demonstrates the evaluation of the approach and finally section V concludes the paper and outlines future work.
II. RELATED WORK
A. DCXP
Distributed Context eXchange Protocol was initially built on for Ambient Networks project. DCXP enables real-time context dissemination between end-nodes that are DCXP capable. DCXP further utilizes Universal Context Identifier (UCI) to register an entity and other entities resolve the UCI to fetch context information. UCI is a naming scheme similar to URIs [10]. One of the advantages of utilizing UCI is that an entity can register several UCIs using DCXP [11]. Current DCXP consists of five primitives, table I illustrates the primitives.
TABLE I. DCXP PRIMITIVES MESSAGES [10]
Message Description
REGISTER_UCI This message is used to register a particular UCI that holds context information in an entity
RESOLVE_UCI This message needs to be invoked to fetch context information assocaited with the UCI
GET Once the UCI is resolved at an entity, this message is used to get the context information
SUBSCRIBE
This enables an entity to subscribe to a particular context information and entity only gets updated when there is a new value
NOTIFY Notifies the entity subscribes to a particular context information with the latest information
The DCXP-capable entities that form a network are a Distributed Hash Table (DHT) overlay. All participating entities are located logically in a DHT ring. ID for each entity is usually created by hashing the IP address, but this is beyond the focus of this particular paper since the goal is to discover context entity which is identified by UCI. This means an entity with context information registers a UCI on the DCXP network by using the REGISTER_UCI; other entities resolve the UCI by using the RESOLVE_UCI. Depending on the need, entity can fetch instant context information or subscribe for future and continuous context information. The protocol is very simple to use but faces the challenge of discovering the entities registered as UCIs on the network. That means, currently when an entity wants to resolve a UCI, the resolving entity needs to know the UCI prior to resolving. This challenge was also raised in [11]. This paper will explore how this challenge can be addressed. The goal will be to extend the current DCXP protocol and introduce new primitive messages to enable context entity discovery.
B. MediaSense
MediaSense is an IoT platform aims at enabling scalable context information sharing. MediaSense employs the DCXP protocol to sharing the context information. Figure 1 gives an idea how MediaSense works with DCXP. The detail information about MediaSense can be found in [7]. MediaSense is a peer-to-peer (p2p) based context sharing IoT platform. As with most p2p system, MediaSense exploits a
rendezvous host i.e. bootstrapping node to enable communication between nodes. The rendezvous node or the bootstrapping node must be initialized before any entity can join or leave the MediaSense platform.
Fig. 1. MediaSense and DCXP
After registering a UCI, an entity needs to set the context information which other entities can get after resolving the UCI. MediaSense has its own primitive function so-called SET to set the data i.e. context information. Entity then notifies other entities about this newly set context information. Other entities depending on the need GET and/or SUBSCRIBE the context information. This is further shown in figure 2.
Fig. 2. MediaSense context information sharing
Therefore, MediaSense requires the following steps to register and resolve UCI, get and set data i.e. sharing context information:
- Initialize bootstrap/rendezvous node - Register UCI by entity A
- Resolve UCI by entities B & C
III. APPROACH
This section illustrates the approach to discovering distributed context entity in the MediaSense platform. To answer the research question outlined in section I, another question was asked i.e “Can Publish/Subscribe be used to discover context entity”? MediaSense already offers scalable Publish/Subscribe (PubSub) as shown in [11]. The goal of this paper is to discover the available UCIs within the MediaSense platform. That means a context entity should be able to discover other context entities so that each entity can resolve UCIs and enable swift context sharing. Figure 3 shows how the approach would work and MediaSense with extended DCXP.
To accomplish the above goal, publish/subscribe approach is employed. The idea is to have a UCI common to all entities and all the registered UCIs within MediaSense would be inserted as common UCI’s context information. This common UCI, tagged as global_UCI, will be inserted when the rendezvous node is initiated (see figure 3), and whenever a new entity joins the platform will be subscribed to this global_UCI by default (see figure 3). To achieve this, a new primitive function named joinUCI has been implemented. This is illustrated in figure 5. This joinUCI primitive function now embeds other two primitive functions namely REGISTER_UCI and GET.
Fig. 3. MediaSense with extended DCXP
The primitive function, joinUCI, will enable to discovering existing UCIs but in order to discover newly joined UCIs, a new primitive called DISCOVER has been implemented. DISCOVER will enable to fetching new UCIs after every t seconds. The interval, t, is implementation dependent. This primitive function is further explained in figure 6.
A. global_UCI
The algorithm first initiates the MediaSense rendezvous node. This node can be any entity that wants to join the MediaSense platform. The algorithms then checks if a global_uci exists or not; if global_uci does not exist then a global_uci is registered using MediaSense’s publisher algorithm. However, if global_uci already exists then algorithm just renews the global_uci. MediaSense rendezvous node is run which is followed by starting the p2p communication. The IP address and bootport need to be passed as parameters to start
the p2p communication. More on starting p2p communication is outlined in [7].
Fig. 4. Global_uci as publisher
Fig. 5. Algorithm joinUCI primitive function
Fig. 6. Algorithm DISCOVER primitive function
B. joinUCI primitive function
MediaSense platform offers a single API called MediaSensePlatform which implements all the primitive functions offered by the DCXP. A new primitive function
start P2P Communication on the rendezvous node IP address and bootport
end
begin
create an instance of MediaSensePlatform initialize platform with network settings
while MediaSense rendezvous is running
declare UCI (i.e. identity of the entity)
initialize MediaSensePlatform’s joinUCI
synchronizes with the existing UCIs after
every T seconds
endwhile
end
begin
resolve global_uci (based on MedaiSense’s
subscription algorithm)
fetch the subscribeable UCIs save the UCI to the global_uci update global_uci
merge or renew depending on the configuration
subscription is synchronized whenever this method is invoked (synchronizes with
the existing UCIs after every T seconds)
DCXP primitive functions (REGISTER_UCI and GET). The joinUCI algorithm first creates an instance of MediaSensePlatform and initializes with local network settings. The joinUCI is initialized and a UCI is declared for this context entity if the MediaSense rendezvous node is running. If this UCI is not listed on the global_UCI then the UCI is published on the global_UCI so that other entities can discover this UCI. If the UCI is already existent on the MediaSense platform’s global_UCI then the UCI is registered by invoking REGISTER_UCI function. The algorithm then calls the DISCOVER function to synchronize with the system. C. Discover
The joinUCI enables to put the UCI (trying to join) on the global_UCI and fetch existing (if any) UCIs. However, it does not cater for newly joined UCIs after this UCI has joined the system. To counter this, DISCOVER has been introduced. DISCOVER allows to synchronize with new UCIs after every t seconds. The algorithm first resolves the global_UCI based on the subscriber algorithm; the algorithm then fetches the subscribeable UCIs. The next step of this algorithm is to save the UCI (the UCI calling DISCOVER function) to the global_UCI and the algorithm then updates the global_UCI. Depending on the requirement global_UCI is either merged or renewed. The final step is to synchronize with the subscription.
IV. EVALUATION
Table II shows the new primitive functions introduced to DCXP protocol.
The earlier DCXP was evaluated for the time it needed to complete the primitive operations. Therefore, the extended DCXP has also been evaluated for the time requires completing the joinUCI and DISCOVER operations. Table III and IV illustrate these respectively. Average measurements for several simulations are shown.
TABLE II. DCXP NEW PRIMITIVES MESSAGES
Message Description
joinUCI
This new functions now combines the old REGISTER_UCI and GET primitive funcions, and enables context entity to join and retrieve context information at the same time
DISCOVER
This message needs to be invoked to discover existing UCIs and to synchronize with newly joined entities
From table III, it can be seen that joinUCI takes relatively more time compared to old DCXP. The extended DCXP’s joinUCI combines two operations and those operations are now called inside the MediaSensePlatform API. Furthermore, this function fetches existing UCIs at the time of UCI joining. These are responsible for the delay which is understandable. Nevertheless, this is still on par with the DCXP evaluation.
Table IV shows the time required for DISCOVER function. The operation took 293 and 450 milliseconds (ms) respectively for 100 and 200 UCIs. The time was measured after the UCIs were already registered. From the table, it can be observed that each UCI requires between 2.2 to 2.9 ms to be discovered. This is very significant in terms of fast discovery of context entity. However, joinUCI introduced a delay in the DCXP protocol. Nevertheless, discovering context entities has been a challenge
for long time in DCXP-enabled MediaSense and IoT in general. This paper successfully overcame this challenge and proposed new primitive operation for DCXP which now enables fast context entity discovery. The proposed algorithms can be extended to other p2p-based IoT platforms to enable entity discovery given that entity can be named and rendezvous node is available. discovery. The contribution of this paper begins with proposing algorithms that enable successful fast discovery of distributed context entity which has been a challenge for long time for DCXP. A scalable and versatile IoT platform such as MediaSense cannot disregard the challenge of discovering context entity. This challenges the fast and scalable provisioning of context information. In light of this, this paper extended the current DCXP protocol and introduced two new primitive functions namely joinUCI and DISCOVER. These new functions enable fast context entity discovery by employing a publish/subscribe approach. However, the proposed approach is not limited to only MediaSense and this can be integrated to any p2p-based platform especially to platforms which are DCXP-enabled.
It takes around 2.5 ms on average to discover a context entity in MediaSense IoT platform. This is fast in terms of discovering an entity in IoT landscape. However, the joinUCI introduced a delay in the platform, but this delay corresponds to fetching existing UCIs.
Overall evaluation of the extended DCXP is on par with the existing DCXP protocol. Current MediaSense platform supports any machine that runs JAVA. In future, the MediaSense platform can be extended to mobile platforms such as Android, iOS, etc. to create a mobile crowdsourcing platform. DCXP protocol can be evaluated on such mobile platforms and the cross-platform performance of DCXP can be investigated. Another prospect of DCXP is to enable autonomic management of DCXP. This could also be explored in future. than Location. In: Computers & Graphics Journal, Elsevier, Volume 23, No.6, December 1999, pp 893-902.
[2] P. Brown, J. Bovey, and X. Chen, “Context-Aware Applications: from
[3] A. Dey and G. Abowd, “Towards a Better Understanding of Context and Context-Awareness,” in CHI 2000 Workshop on The What, Who, Where, When, and How of Context-Awareness, 2000, pp. 304–307. [4] J. Walters, “Distributed Immersive Participation – Realising
Multi-Criteria ContextCentric Relationships on an Internet of Things”, PhD thesis, Department of Computer and Systems Sciences, Stockholm University, November 2014
[5] W. Grosky, A. Kansal, S. Nath, J. Liu, and F. Zhao, “Senseweb: An
infrastructure for shared sensing,” Multimedia, vol. vol. 14, pp. pp. 8–
13, 2007.
[6] C Gonzalo. 3G IP Multimedia Subsystem (IMS): Merging the Internet and the Cellular World. page 381, 2005
[7] T. Kanter et al.., “MediaSense – an Internet of Things Platform for
Scalable and Decentralized Context Sharing and Control,” In: ICDT
2012,, The Seventh International Conference on Digital Telecommunications, pp. 27-32, April 2012.
[8] R.A. Baloch and Noel Crespi. Addressing context dependency using profile context in overlay networks. In Consumer Communications and Networking Conference (CCNC), 2010 7th IEEE, pages 1–5. IEEE, January 2010.
[9] M. Swenson, “A Distributed Approach to Context-Aware Networks - Prototype System Design, Implementation, and Evaluation”, Royal
Institute of Technology, M.Sc thesis conducted at ERICSSON Research 2007
[10] Kanter, T.; Pettersson, S.; Forsstrom, S.; Kardeby, V.; Norling, R.; Walters, J.; Osterberg, P., "Distributed context support for ubiquitous mobile awareness services," Communications and Networking in China, 2009. ChinaCOM 2009. Fourth International Conference on , vol., no., pp.1,5, 26-28 Aug. 2009
[11] H. Rahman , R. Rahmani, and T. Kanter, “Enabling Scalable Publish/Subscribe for Logical-Clustering in Crowdsourcing via
MediaSense”, IEEE Science and Information (SAI) Conference 2014, August 27-29, 2014, London, UK
[12] Ericsson White paper: 5G Radio Access, Research and Vision: http://www.ericsson.com/res/docs/whitepapers/wp-5g.pdf [Last Accessed: 08-February-2014]
[13] Ruthbea Yesner Clarke, “Smart Cities and the Internet of Everything: The Foundation for Delivering Next-Generation Citizen Services”, white paper sponsored by Cisco, October 2013
[14] A. J. Jara, P. Lopez, D. Fernandez, J. F. Castillo, M. A. Zamora and A. F. Skarmeta, “Mobile digcovery: Discovering and interacting with the
world through the internet of things”, Personal Ubiquitous Comput., vol.
18, no. 2, pp. 323-338, Feb., 2014