Establishing Service Communities in Peer-to-Peer Networks1 Carsten Jacob*, Heiko Pfeffer†, Lei Zhang††, and Stephan Steglich† * Fraunhofer Institute for Open Communication Systems (FOKUS), Kaiserin-Augusta-Allee 31, 10589 Berlin, Germany carsten.jacob@fokus.fraunhofer.de † Technische Universität Berlin, Sekr. FR 5-14, Franklinstraße 28/29, 10587 Berlin, Germany {heiko.pfeffer|stephan.steglich}@tu-berlin.de †† Wireless Technology Innovation (WTI) Institute Beijing University of Posts and Telecommunications Beijing, P.R.China zlscorpion@gmail.com the effort for defining complex descriptions, e.g., for service interfaces or user preferences. Our approach therefore focuses on so-called Universal Service Terminals that can be organized in communities that commonly fulfill semantically defined tasks and are able to exchange data in an autonomous, context-aware, and user-centric manner. Hereby, particular attention was put on the active information exchange and the utilization of semantics to reduce the usage complexity by minimizing the need for extensive service descriptions. Special emphasis is put on the integration of handheld devices also reducing the provided functionality to cover as many device types as possible. The remainder of this paper is organized as follows. Section II describes related work in terms of service composition approaches, semantic description languages, and P2P technologies. Section III defines the notion of Universal Service Terminals (USTs) also examining the basic architecture approach. UST Service Communities as we define them are discussed in Section IV. Here, the focus is put on the utilization of a distributed blackboard approach for information sharing. In Section V an initial realization approach is depicted. Finally, Section VI concludes the paper. Abstract—The increasing device heterogeneity and mobility in Peer-to-Peer (P2P) networks make flexible and context-aware middleware approaches necessary to enable the user to benefit from this trend. Current approaches regarding ad hoc service or device interworking basically focus on seamlessly connecting discovered device functionality that is normally defined in respective static descriptions. At the same time, Web 2.0 technologies exemplify the success of collaboration based work, whereas the considered community aspects and interworking remain on user and data level only. In this paper, we propose an approach that expands the integration of community aspects to the service layer to enable a seamless interworking of different devices and services by applying semantics and Web2.0 principles to P2P environments. The notion of Universal Service Terminals is presented being able to process semantic user requests by means of multiple cooperating devices. Regarding this, a distributed blackboard approach is utilized to facilitate an active information exchange enabling a best-effort treatment of the user’s goal and enhancing common functionality such as service discovery. Special emphasis is put on the support of handheld devices. Keywords—Universal Service Terminal; service communities; context-awareness; Peer-to-Peer networks I. INTRODUCTION II. BASICS AND RELATED WORK Current approaches regarding ad hoc service or device interworking basically focus on seamlessly connecting discovered device functionality that is normally defined in respective static descriptions. The increasing user mobility and information overload demand for approaches that are additionally able to intelligently manage and disseminate available data and provide services in P2P environments in a context-aware manner. Therefore, enhanced interaction and service models are needed that, above all, allow for minimizing As far as device and service interworking approaches are concerned, service discovery and composition are particular important aspects that determine the quality of the outcome. II.A. Service Discovery and Composition Typically, resources that can be potentially used over the network are modeled as services. The services are normally associated with metadata describing them and their usage pattern. Many services that are available within the environment are discovered, e.g., using a specific service discovery mechanism [1], [2], [3]. The descriptions of discovered services are stored in a centralized directory as in SLP [2] or in a distributed directory structure as in Jini [1]. 1 This work was supported by the German Federal Ministry of Education and Research within the “Universal Service Terminal Enhancement (UST+)” project. 1181 1-4244-1457-1/08/$25.00 © IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE CCNC 2008 proceedings. Applications may access the directory to locate one or more needed services. The directory performs a query on the registered services and returns a matching service, if found. In systems such as SpiderNet [6], Anamika [5], and the recent web services infrastructure [4], where service composition is supported, requesting applications are accommodated by locating complex combinations of simple services not having to discover multiple services on their own. idea of Universal Service Terminals (USTs) that basically addresses the vision of combining three important aspects on the service level. III.A. The UST vision First, service communication with regard to the use of interfaces, data exchange, and access is supposed to be realized in a simple and consistent manner. Second, based on the successful communication, service cooperation is enabled. Here, interface descriptions, a distributed use of services, composition, and resource management are of particular interest. Third, service cooperation should be take place in an organized manner, which is especially addressed by the use of semantics, the incorporation of context information, and effective recovery mechanisms. These three aspects, if regarded in a user-centric and target-oriented way, basically define the vision the UST approach aims at and introduce important benefits for the user. First, he or she addresses a desired functionality, task, or general goal instead of a particular service. Second, the user does not have to define complex descriptions before being able to use context-aware services. Because of the active information exchange and data dissemination in mobile UST environments, he or she is furthermore able to make use of information that would not be locally available otherwise. Third, the user does not have to care for particular aspects, e.g., recovery or security, but has one simplified GUI. In summary, the UST approach aims at a semantically enhanced solution for ad-hoc and infrastructure based environments facilitating a context-aware and autonomic inter-device communication and data exchange. Additionally, handheld devices are especially regarded to address mobile ad hoc environments. II.B. Semantic Description Languages and Frameworks Semantic description languages are utilized to define metadata that can be used to make information machine-interpretable and to infer additional implicit facts to benefit discovery and composition mechanisms. For example, the Web Ontology Language (OWL) [7] is a description language based on XML that can be used to semantically describe entities and properties. OWL-S [8] uses OWL to define semantic service descriptions, which can be grounded to the WSDL [9] of related Web Services. Besides OWL-S, semantic web frameworks such as WSMO [10] and SWSF [11] define their own ontologies and rule languages describing various aspects of services in the web. Regarding the composition of services, a number of middleware approaches have been proposed [12], [13], [14], [18] for web services that exploit the semantic information associated with service descriptions. II.C. Device Interoperability Approaches In the area of middleware technologies incorporating multiple different devices and communication technologies there are many promising approaches having distinct focal points. For home, for example, UPnP [15] facilitates data exchange among devices in local area networks defining respective mechanisms, e.g., for addressing, discovery, and description. JXTA [17] is a P2P technology developed at Sun Microsystems with the objective of providing interoperability in data sharing, platform independence (language/OS) in service sharing, and ubiquity across the range of devices covered. JXTA consists of the core, which provides security, monitoring, and group services among peers. The JXTA services layer provides a range of functionality such as indexing, searching, and sharing. The JXTA applications layer allows users to build P2P applications in the JXTA framework. Services and information are ‘advertised’ in XML descriptors. These descriptors are searched using a peer discovery protocol. Access to these services is provided by the JXTA services layer. In [16] the notion of Virtual Devices is introduced encapsulating and hiding multiple devices in the Personal Area Network (PAN) of the user to provide one interface. Furthermore, a middleware is proposed for the realization of Virtual Device. III.B. Basic Architecture Figure 1 depicts the basic architecture incorporating a Universal Service Layer with multiple modules for different tasks. Those modules are supported by enabler entities providing functionality used by some of the modules. Application GUI Application Logic Bootstrapping Universal Service Request Processing Description&Discovery Composition State Management Recovery Event Notification Security&Privacy Configuration Data Exchange Data Transport Interaction P&S SDS ... Invocation Style Transport Protocol Network Protocol Figure 1: Basic architecture approach III.B.1. Layered Approach III. UNIVERSAL SERVICE TERMINALS (USTS) The data exchange layer defines the style or protocol that is used to invoke methods and represent data in a proper way, e.g., REST or RPC. The interaction layer is used in addition to To allow for a seamless information exchange and use of distributed services in P2P environments we developed the 1182 This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE CCNC 2008 proceedings. the universal service layer to define interaction models services may stick to, e.g., publish-subscribe or Semantic Data Spaces [19]. This layer can be used to harmonize service interaction having a common representation and messaging paradigm. The universal service layer provides all the functionality that is needed for creating and administering Universal Service Terminals. Desired functionalities comprise state management, service composition and recovery, security and privacy, service discovery and descriptions, system configuration, request processing, and event notification. Bootstrapping is considered as the process initiating and preparing the UST device by properly loading and configuring needed modules. During this phase, the data exchange, interaction, and universal service layer are supposed to be setup. composition data managed by the composition module, usage policies utilized by the security module, and context information used by multiple modules, e.g., the request processing module. To address this aspect, the UST Distributed Blackboard (UDB) is introduced as one mediator enabler to facilitate a community-like communication among distinct devices. This blackboard is an optional building block in the UST layer of variable size that can be used by local or remote services for data exchange, i.e., a local or remote module can add or remove data as desired to/from the blackboard. This functionality can therefore be used to propagate a piece of information in highly dynamic networks of UST devices. To increase security aspects the blackboard is used as an information base, but is not intended for mobile code. To facilitate the later use of exchanged data, any added piece of information is expected to be semantically tagged. Indeed, because of the open information sharing the usefulness of data is not guaranteed. The local description&discovery module is responsible for administering the blackboard, e.g., removing data that is not used for a long time. The security&privacy module may be used to restrict the UDB access for particular remote UST devices. The easiest way to realize the UDB idea is a cached semantic model that reasoning processes can interpret while also providing a simple interface to external nodes to add and remove concepts and properties, e.g., defined in OWL. III.B.2. Universal Service Layer (USL) Modules The Universal Service Layer defines a number of conceptual modules that are responsible for specific tasks, but are not necessarily separated in this manner as far as the actual implementation is concerned. The request processing module receives a user request stemming from the local device or a service request from another device and is responsible for processing it, i.e., calling the other modules accordingly and executing services. The description and discovery module administers service descriptions (its own description as well as discovered ones) and finds suitable services of other devices. The composition module is responsible for finding and composing services to form a proper community fulfilling a particular user request. The state management module is responsible for synchronization issues, e.g., if the current device is incorporated in a composition that requires the maintenance of a common state. The recovery module is closely connected to the composition module being responsible for finding and integrating a suitable service in case another service of a composition disappears. Event notification describes the process of informing other UST+ devices or being informed by them about state changes while a process is actually running. This event may cause the currently executed service or composition to be altered or stopped. Security and privacy ensures the proper use of the device services as intended by the developer, vendor, and user. The module is therefore responsible for configuring the services offered by the device according to defined policies. The configuration module is used by the user to configure the UST+ layer and related services according to his or her wishes. For example, in some cases it may be necessary to use a particular technology or service instead of those the UST middleware normally utilizes. Here, it is also possible to alter device, service, or user information. IV. UST SERVICE COMMUNITIES Special regard in our approach with respect to Universal Service Terminals is put on the community-like behavior of distinct UST devices in P2P networks enabled by the UDB. IV.A. Web 2.0 and mobile P2P environments We identified four aspects that are especially interesting and relevant in this context and that are often characteristic for user communities in the Web 2.0 domain. First, parties taking part in such kinds of communities work commonly with respect to a particular goal, which is often set by the domain or topic of the community, e.g., students or sports. Second, active and open information sharing is a very typical aspect, i.e., community members are allowed to contribute to a common knowledge base exchanging information with each other. Third, the participating parties normally possess complementary information or services relevant for others, which, in our case, may also be functionalities. Fourth, the data exchange is enabled by an ad hoc and loosely coupled grouping or interaction in terms of a simple way of addressing and being connected to other parties. With respect to Web 2.0 communities web portals are one common means of easily connecting people. Each one of these four aspects is supposed to be addressed by our approach to facilitate a community-like communication for UST services and devices. The use of semantics for describing data and services is also applied for the definition of a common goal that is automatically interpretable by each participating device. The idea of a sharable UDB aims at an III.B.3. USL Module Enablers Multiple modules described above rely on data that is provided by external services, but may be cached internally depending on the device capabilities. These data may comprise service descriptions administered by the discovery module, 1183 This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE CCNC 2008 proceedings. active and open way for sharing information. The Universal Service Layer enables the use of functionality provided by distinct and distributed devices. Here, the assumed device mobility increases the diversity, and semantics can be applied to reasonably combine available services and data. Finally, the loosely coupled way of communication is addressed by introducing suitable service interaction models such as the Semantic Data Space [19] based on REST [20] principles, but also by the Universal Service Layer that autonomously processes provided data. a new goal provided by the user, .e.g., achieving the semantic effect “bright” in the current location, a new task ti is generated by the request processing module and sent together with a pointer to its blackboard space by broadcast to all nodes. Descriptor Functionality serviceID Denotes the unique ID of the service, e.g. its REST URI. Identifies the ID of the Blackboard. Represents the number of parallel executions of the service still possible. For instance, a service that can be used in four service compositions in parallel at most and which is already involved in three, has an execState of 1. Holds a list of all IDs of Service Compositions the service is involved in. blackboardID execState IV.B. The UDB and handheld devices Regarding the realization of the UDB idea emphasis is put on supporting nodes with different and limited capabilities. Restrictions can be made according to a number of aspects, e.g.: • The kind of data stored in the blackboard and the respective lifetime to address limited storage capacity. • The reasoning complexity to address limited computing capabilities. To especially regard for handheld devices in our approach we decided to support three classes of nodes. Tiny nodes are normally sensors only providing services that can be used by other nodes, but have no interaction models or mediators installed. Basic nodes support restricted interaction models and mediators. Full nodes provide full support for available interaction models and mediators. We assigned most common handheld devices into the basic class because of limited storage, computing capabilities, and energy supply. The boundary between basic and full support is currently determined by Java CDC since we decided for Java ME as the implementation platform. With regard to the blackboard idea we defined four classes: • (0) no blackboard supported • (1) plain semantic model (RDFS) and simplified interface to add and retrieve data • (2) enhanced model (OWL Lite or DL) and basic operations supported (e.g., get the superclass of a concept) • (3) enhanced model and full reasoning support. Tiny nodes are supposed to support classes 0 or 1, basic nodes classes 1 or 2, and full nodes classes 2 or 3. Hence, the blackboard version for basic nodes does not provide extensive reasoning mechanisms as, for example, provided by Pellet [23] for OWL and supported by fully equipped nodes such as desktop PCs. Each service running on an UST device is able to access a particular part of the UDB. To identify the respective blackboard an ID is added to the service’s specific state that is administered by the State Management module. The four main descriptions of the service state are listed in Table 1. The state of a node is uniquely defined by a finite set of service states from the services it hosts and an ID nodeID. USTs are built dynamically when a user’s goal requires the collaboration of services from different nodes. The supporting use of the UDB can be illustrated by means of a simple service execution example. In case a node receives compState Table 1: Service State Descriptors In case a node receiving the task finds a service si matching the task ti based on semantic service descriptions, e.g., a lamp that can be switched on, the node sends a message and si is bound for solving ti. Every node that is not able to find an appropriate service si for ti scans the blackboards of the services it is hosting in order to search for knowledge related to this task. For instance, one service may be able to relate similar tasks ti to ti ’. This node uses the Blackboard pointer blackboardID from the requesting node in order to create a new Blackboard space for ti and inserting its according knowledge. In case the requesting node does not receive an appropriate service si matching ti within a certain timespan (decided by a timeout), the requesting node may check its blackboard whether knew knowledge on ti exists. After parsing the knowledge that ti may be similar to ti ’, it can decide to request a service matching ti’ instead, probably receiving a binding for service si ’, e.g., open the curtain if the sun is shining. Although the service may not be exactly the type of service striven, it can help to provide a best effort solution to the user. In case neither an appropriate service can be found for ti nor additional knowledge is available to modify the task, the composition attempt has failed. In summary, the blackboard is intended for supporting the other modules of the universal service layer such as the service discovery module. The provided additional information may be incomplete and most likely does not cover a complete domain, but only parts of it. Because of the semantic representation interested nodes are able to relate existing information and make use of it. Data exchange and node cooperation is enabled by suitable interaction and data evaluation models, e.g., as illustrated in [22]. In addition, gossiping algorithms [24] envision the random propagation of data in P2P environments being easily applied to the blackboard approach. V. REALIZATION Our implementation approach utilizes a REST-based [20] data exchange layer in the Java programming language providing interfaces for both the Universal Service Layer and 1184 This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE CCNC 2008 proceedings. the Interaction Layer. The Interaction Layer currently supports the Semantic Data Space, whereas the basic concepts are described in [19]. A simplified Service Discovery Mediator is implemented whereas participating nodes are able to synchronize administered service lists by means of UDP multicast messages. As far as semantics are concerned, we apply OWL for the description of requests and responses being processed with the help of the Jena Semantic Web Framework [21]. Further modules are under development. As mentioned in Section IV.B, we developed a thin client in J2ME for basic nodes based on the CDC framework and Foundation Profile to also support handhelds not being necessarily able to take part, for example, in expensive reasoning processes. The current size of the core framework’s jar file is about 100 kb containing 40 classes. Additional libraries are needed, e.g., to enable the REST-conform communication, resulting in an executable jar file. Challenges in the implementation process aiming at the support of basic nodes especially pertained to API restrictions such as, for example, limited functionality of available classes, e.g., the String class, the constricted class library, or type conversion constraints. We are currently enhancing our blackboard approach and also focus our work on a proper request processing module, whereas user preferences and context information are represented in OWL to ease the matching process. For the UDB implementation we plan to combine work done in [22] referring to data dissemination and evaluation with a more generic SDS approach not only being able to cope with service requests, but general data. [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] VI. CONCLUSION AND OUTLOOK In this paper we presented basic concepts regarding service communities for Universal Service Terminals. Based on an initial architecture definition, we described communication, cooperation, and organization aspects with regard to distributed service interworking. Hereby, the focus was put on the idea of a distributed blackboard for information exchange and service discovery support. In our ongoing work we advance our current implementation and combine it with aspects derived from data dissemination mechanisms. Special attendance is put on service composition and the mapping to other approaches, e.g., UPnP, and infrastructure-based environments. Further work comprises the introduction of trust principles in our approach to be able to apply data dissemination and access policies. [17] [18] [19] [20] [21] [22] REFERENCES [1] [2] [3] J. Waldo, “The jini architecture for network-centric computing,” Commun. ACM, vol. 42, no. 7, pp. 76–82, 1999. E. Guttman, “Service location protocol: Automatic service discovery of ip network services,” Internet Computing, IEEE, vol. 3, pp. 71–80, July - Aug 1999. B. A. Miller, T. Nixon, C. Tai, and M. Wood, “Home networking with universal plug and play,” Communications Magazine, IEEE, vol. 39, pp. 104–109, Dec 2001. [23] [24] P. Rompothong and T. Senivongse, “A query federation of uddi registries,” in ISICT ’03: Proceedings of the 1st international symposium on Information and communication technologies. Trinity College Dublin, 2003, pp. 561–566. D. Chakraborty, F. Perich, A. Joshi, T. W. Finin, and Y. Yesha, “A reactive service composition architecture for pervasive computing environments,” in PWC ’02: Proceedings of the IFIP TC6/WG6.8 Working Conference on Personal Wireless Communications, 2002, pp. 53–62. X. Gu, K. Nahrstedt, and B. Yu, “Spidernet: An integrated peer-to-peer service composition framework,” in HPDC 2004: Proceedings of the 13th IEEE International Symposium on High performance Distributed Computing, 2004, pp. 110–119. OWL Web Ontology Language Reference. 2004. [Online]. Available: http://www.w3.org/TR/owl-ref/. [Accessed: October 10, 2007]. DAML Service Homepage. [Online]. Available: http://www.daml.org/services/owl-s/. [Accessed: October 10, 2007]. Web Services Description Language. [Online]. Available: http://www.w3.org/TR/wsdl. [Accessed: October 10, 2007]. Web Service Modeling Ontology. [Online]. Available: http://www.wsmo.org/. [Accessed: October 10, 2007]. Semantic Web Services Framework (SWSF) Overview. [Online]. Available: http://www.w3.org/Submission/SWSF/. [Accessed: October 10, 2007]. B. Medjahed, A. Bouguettaya, and A. K. Elmagarmid, “Composing web services on the semantic web,” The VLDB Journal, vol. 12, no. 4, pp. 333–351, 2003. J. Lui, C. Fan, and N. Gu, “Web services automatic composition with minimal execution price,” in Web Services, 2005. ICWS 2005. Proceedings. 2005 IEEE International Conference on, July 2005, pp.11–15. Z. Lu, P. Hyland, A. K. Ghose, and Y. Guan, “Using assumptions in service composition context,” in SOSE ’06: Proceedings of the 2006 international workshop on Service-oriented software engineering, 2006, pp. 19–25. UPnP Forum: Understanding Universal Plug and Play White Paper. 2000. [Online]. Available: http://www.upnp.org. [Accessed: October 10, 2007]. T. E. Jønvik, P. Engelstad, and D. van Tanh, “Building a Virtual Device on Personal Area Network,” in Proceedings of the 2nd International Conference on Communications, Internet & Information Technology, Scottsdale, Arizona, Nov 17-19, 2003. JXTA™, “JXTA™ Technology Website”. [Online]. Available: http://www.jxta.org/. [Accessed: October 10, 2007]. K. Fujii and T. Suda, “Dynamic service composition using santic information,” in ICSOC ’04: Proceedings of the 2nd international conference on Service oriented computing. New York, NY, USA: ACM Press, 2004, pp. 39–48. D. Linner, I. Radusch, S. Steglich, and C. Jacob, "Loosely Coupled Service Provisioning in Dynamic Computing Environments," in Proceedings of ChinaCom 2006. First International Conference on Communications and Networking in China, Beijing, China, October 25-27, 2006, IEEE Catalog Number: 06EX1414C, ISBN: 1-4244-0463-0, Library of Congress: 2006926274. R. T. Fielding, R. N. Taylor, “Principled design of the modern Web architecture,” in Proceedings of the 22nd International Conference on Software Engineering, Limerick, Ireland, pp. 407-416, 2000. Jena - A Semantic Web Framework for Java. [Online]. Available: http://jena.sourceforge.net/. [Accessed: October 10, 2007]. Carsten Jacob, David Linner, Ilja Radusch, and Stephan Steglich, "Loosely Coupled and Context-aware Service Provision Incorporating the Quality of Rules," in Proceedings of the 2007 International Conference on Internet Computing, WORLDCOMP’07, June 25-28, 2007, Las Vegas, pp. 241-247, CSREA Press, Book ISBN: 1-60132-044-2, CD ISBN: 1-60132-019-1. Pellet OWL Reasoner. [Online]. Available: http://pellet.owldl.com/. [Accessed: October 10, 2007]. A. Datta, S. Quarteroni, and K. Aberer, “Autonomous Gossiping: A self-organizing epidemic algorithm for selective information dissemination in wireless mobile ad-hoc networks,” in Proceedings of the International Conference on Semantics of a Networked World (IC-SNW04), Paris, France, June, 2004. 1185 This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE CCNC 2008 proceedings.