Towards a Decentralized p2pweb Service Oriented Architecture Rubén Mondéjar, Pedro García and Carles Pairot Universitat Rovira i Virgili Tarragona, Spain {ruben.mondejar, pedro.garcia, carles.pairot}@urv.net Abstract In this paper we present the p2pweb service oriented architecture (SOA). The p2pweb model offers decentralized solutions for service description, publication, discovery and availability, following the web services standards. The three innovative contributions in p2pweb SOA are: easy integration of web services into a p2pweb network, secure and decentralized web services deployment, and transparent location, load balancing and faulttolerance peer-to-peer mechanisms. We believe that all the features our p2pweb model offers can be of special interest for the creation of communities, and for the development of future collaborative decentralized applications. 1. Introduction In the last years, the service oriented architecture (SOA) and the web services model have evolved to standardisation and interpretability. Concurrently, in the peer-to-peer setting, a revolution has undergone with the introduction of Distributed Hash Tables (DHTs), also called structured peer-to-peer overlay networks. This form of organizing the peer-to-peer networks basically allows location and insertion of data in a deterministic and efficient way. In stark contrast, older peer-to-peer algorithms could not guarantee location of a specified resource in the network: it could be found or not, depending on the distance between the requester and the data source. Therefore, the structured peer-to-peer topology has emerged as a decentralized architecture that provides an appropriate substrate for distributed systems. Web services features (modular, self-contained, distributed, loosely coupled, interoperable) become intersection points that enable interesting possibilities when used together. Antonio F. Gómez Skármeta Universidad de Murcia Murcia, Spain skarmeta@dif.um.es One of the major drawbacks of web service architecture is the centralized approach to service discovery via UDDI registries. One interesting solution is to merge the web services mechanism with the peerto-peer benefits. The first step to this convergence can be found in some research works about UDDI s decentralization. A set of examples are federated UDDI [1], UDDI over the JXTA [http://www.jxta.org] project, and UDDI on top of a DHT with a search engine [2] as well. We consider those works an evolution towards decentralized peer-to-peer models and our proposal starts from this point. Nevertheless, we present a much more ambitious architecture not only including a decentralized UDDI registry, but also providing a high availability web service deployment infrastructure. The three innovative contributions of our work are: easy integration of web services into p2pweb network, secure and decentralized web services deployment, and transparent location, load balancing and fault-tolerance peer-to-peer mechanisms. Our infrastructure also offers a low learning curve because developers only need to create conventional web services and deploy them in our network. Our model permits decentralized management of web services and it allows client access in a standard and transparent way. The structure of the paper is as follows: in section 2 we describe the p2pweb concept and the peer-to-peer infrastructure. Sections 3 and 4 describe the p2pweb service-oriented architecture, the community service and also draw some ideas to construct the collaborative layer over this novel infrastructure. In section 5, we explore related work. Finally, we present some conclusions of our research and study future work in this setting.
2. Background In wide-area scenarios there is a trend towards decentralization, and peer-to-peer networks have gradually emerged as an alternative to traditional client-server systems for some application domains. Structured peer-to-peer overlay networks offer an efficient, scalable, fault-resilient, and self-organizing substrate for building many solutions. Following such approach, our research group started investigating possible uses of such technology, focusing on construction of novel peer-to-peer middleware. 2.1 p2pweb Concept We foresee promising cross-fertilizations of peer-topeer and Web models in the next years. Although both models are already influencing each other, there is still a lack of seamless integration between them in order to achieve constructive synergies. Our p2pweb model aims to bring all the benefits and unused resources of the edges of the Internet to the mature and standardized world of Web applications and services. In this line, our infrastructure envisages a decentralized structured peer-to-peer network in which every peer hosts a lightweight web server. Using standard web application models (like J2EE), we permit secure deployment of web applications and services in the network of peers. With this approach, existing web applications and services can make use of the resources of the network, but also obtain in a transparent way fault tolerance and load balancing services. Our concept goes farther than other approaches like peer-to-peer web hosting (YouServ [3]) or peer-to-peer content distribution networks (CORAL [4]). Our p2pweb approach offers true application deployment based on web standards on top of a peer-to-peer network. The main difference is that we offer a new substrate with innovative capabilities to the existing web development environment. In order to develop world wide scalable applications, developers do not need to reinvent the wheel creating overlay networks and services. We thus provide a smooth transition from web applications and services to the decentralized peer-topeer model. Furthermore, our p2pweb paradigm offers a number of key services like distributed naming systems, replicated data stores and databases, distributed hash tables, and scalable one-to-many communication channels (application-level multicast or BitTorrent [http://www.bittorrent.com]). In the following sections we present an open source implementation of the p2pweb concept that is in current validation over the PlanetLab network [http://www.planet-lab.org]. 2.2 Structured overlay Networks Application Platform Infrastructure (SNAP) In order to create a p2pweb platform, our group has worked in peer-to-peer middleware during the last years. We have developed the necessary middleware infrastructure to support peer-to-peer web application services. The natural evolution of our research work into peer-to-peer middleware has followed these steps: 1. Distributed Remote Objects (Dermi [5]) 2. A Component Model (p2pcm [6]) 3. Web Services Infrastructure (p2pweb SOA) On top of them, we have constructed the Snap p2pweb platform [http://snap.objectweb.org] (Structured overlay Networks Application Platform). Snap is a J2EE web application infrastructure over a structured overlay network. By using Snap, developers can easily deploy any kind of J2EE web application onto a worldwide structured peer-to-peer network. Furthermore, they can use the services the framework provides, which let developers concentrate on the real aspects of the web application development, thus forgetting about persistence, security, load balancing, failover, and others. The Snap platform allows development and deployment of J2EE compatible web applications over structured peer-to-peer networks. Since it follows the peer-to-peer philosophy by design, we consider network nodes as dynamic lightweight peers, which can join and leave the network at a rather high rate. Following such lightweight scheme, all nodes host a modified copy of a light webserver (Jetty [http://jetty.mortbay.org/jetty]), which acts both as a peer-to-peer network client and server simultaneously. Therefore, clients can connect through their favourite web browser to any node of the Snap infrastructure for accessing any deployed web applications. Snap constructs on top of the FreePastry [http://freepastry.org] structured overlay implementation. FreePastry offers us key services such as an efficient Key based routing infrastructure, application level multicast (Scribe), as well as network proximity algorithms and anycast service invocations.
These novel services are the substrate for our peer-topeer infrastructure. 3. p2pweb Architecture A distributed service-oriented model is a paradigm for defining services and their interactions. It must provide a packaging technology for deploying web services. We have designed a new decentralized service architecture (p2pweb Services) which runs on top of an overlay network. It is based on the Snap infrastructure. We have implemented the majority of the service model features, but adapted them to benefit from the structured p2p overlay mechanisms. These features are: Integration into the p2pweb architecture and deployment facility. A decentralized lightweight p2pweb service model which provides the following mechanisms for web services: o Location and Discovery o Addressing and Fault-tolerance o Load Balancing and Coordination For the rest of the section we are going to briefly describe each of these mechanisms. 3.1 Services Integration and Deployment The services integration into the p2pweb architecture mimics the J2EE model. However, it has two important differences. The first one is the J2EE web infrastructure provided by Snap. The second one is the use of peer-to-peer solutions like Dermi, for remote invocations, and p2pcm, as the component model, instead of RMI and EJB technologies. The benefits of these changes are reflected in a decentralized, scalable and lightweight model. We can see the relationship diagram in Figure 1. In secure web service deployment a J2EE application authentication mechanism is bundled. We have opted for centralizing the deployment phase, so as only the network s administrator can install, deploy, and monitor services on the network. As a consequence, the existent anarchy generally found in p2p networks is controlled, preventing other users to do whatever they want. Obviously, before deploying services, the administrator s signature must be present. Otherwise it will not be deployed, and therefore, users will be unable to use it. Public/private key and certificates are used to implement this functionality. 3.2 p2pweb Service Model Web services exist and cooperate within webservers. Any service provides interfaces described in the standardized definition language, WSDL (Web Services Description Language). Web services interoperate with other services or clients using SOAP (Simple Object Access Protocol). Taking into account these considerations, we have designed a decentralized lightweight p2pweb service model. This model provides support for the whole web services life cycle: description, publication, discovery, and availability. We stress out the availability feature because it benefits from our self-adjusting decentralized middleware. For this reason, in our model any service has high availability thanks to the fault-tolerance and load balancing mechanisms. Web Client Web Components Servlets DERMI p2pcm Components Stateless Snap Network SOAP over HTTP JSP Stateful Non-Web Client Apache-AXIS Services p2p://domain/service DERMI Persistence Layer DB-Cluster DHT p2pweb Services Access Figure 1. Diagram of p2pweb Services Integration
Next we are going to describe the features of our decentralized p2pweb model. 3.2.1 Location and Discovery For accessing any deployed web service, special URI-style addresses have to be used (p2p://myapplication.com/myservice). These peer-topeer locators create a uniform address space enabling service access regardless of its network location (IP address). Our p2p Naming service maps requests to these peer-to-peer locations to the responsible IP addresses (which may change over time). Following the structured overlay design, every node is responsible for a range of addresses, and if a node fails, another one replaces it in order to handle those addresses. Our decentralized registry (D-UDDI) follows the Java standard (JAX-R) and offers a similar service as other UDDI implementations. Moreover, our model is tag-oriented, keyword based, and not hierarchically structured. The behaviour of D-UDDI is explained as follows: 1. After a p2pweb service is deployed, a related p2puri is obtained. 2. This decentralized locator is used by the service provider so as it becomes published in the decentralized registry (D-UDDI). 3. The client interested in this p2pweb service searches it in the registry. 4. The decentralized registry retrieves the information to locate the service in the p2p network. Hence, the client obtains the p2puri of the service, and he will use the p2p naming service to resolve it. Note that peer-to-peer URIs may also be bound to existing HTTP URIs outside the overlay network. In this case, the overlay is only used for publishing and locating resources, but not for fault-tolerant and loadbalancing service deployment. 3.2.2 Addressing and Fault-Tolerance Combining the p2p naming service and the deployment manager we obtain a fault-tolerance solution to locate a specified web service using its p2p URI as a reference. We can locate services using the p2puris. The assignment of p2p URIs to deployed services is responsibility of the p2p network administrator. Using a default web service (p2p Naming Service), the administrator can thus assign p2p URIs and domains to requested services of users inside the network. Note that this is a controlled and secure p2p environment that can be managed by a company or online community. Only the private key of the administrator permits access to this p2p Naming Service. A deployed web service is not stored solely on one node. These services are replicated and stored in several network nodes (recall that the p2p network itself is organized in the form of a Distributed Hash Table), to guarantee fault-tolerance. 3.2.3 Load Balancing and Coordination To achieve load-balancing we use decentralized load-balancing management. It uses, in a transparent way to the user, the Dermi anycall and multicall primitives for this purpose. When the p2p naming service resolves a p2puri it invokes the anycall abstraction. Therefore, an anycall means sending an anycast notification to the group of services with a set of policies. By default, the policy finds the closest node offering a service (network proximity). Consequently, the closest instance is accessed, or a new one is activated locally, checking that the administrator s signature is present on the web service application archive. Furthermore, we use the p2p network persistence service and Dermi s multicall primitive in order to provide stateful services. For persistence, we can save or restore data directly to/from the DHT or using p2pcm s persistence layer. On the other hand, all service replicas listen to the same multicast group and update their state accordingly. Another good benefit of p2pcm components is the possibility of establishing coordinate policies. We can coordinate different instances of the same service or also a group of different services that collaborate between them. 4. Collaborative Layer The principal aim of this global solution is to construct an extensible collaborative framework on top of our p2pweb infrastructure. The overall idea is to offer an extensible workspace system similar to Groove, but avoiding proprietary technologies. We provide three standard plug-in extensions; the first two are J2EE Web Deployment, and Axis Web Services Deployment. The third option is to merge them both to create a hybrid web service application. We have already implemented a proof-of-concept application called dcalendar. This application is a hybrid web service application that includes the website and the web service interface. Following this
example we could also implement other hybrid applications like wikis, blogs or RSS feeds. Like OpenDHT [7] overlay services, we are undergoing deployment of a p2p service super-network over PlanetLab. Many applications can use the interfaces and services deployed in the PlanetLab network. Collaborative applications like instant messengers or full-fledged collaborative virtual environments may use the services offered from our p2pweb infrastructure. Furthermore, we will deploy a set of Community Services like a query engine over the information contained in the overlay. Using the information stored in the DHT by a user profile service and the tagged resources (with keywords), this community service allows advanced searches over the existing collaboration communities. We can thus search a community using keywords, and find users or services with similar interests. We believe that this service is very important for obtaining network introspection information, and we believe it will also boost user collaboration and the creation of communities around keywords. When a user, with his personal account, wishes to use the community service, he uses his personal details (name, address, phone number, e-mail address...) as well as keywords which describe its own interests. This information is inserted into the p2pweb network via web services, allowing other users to perform searches across these keywords. For example, a researcher wishes to know about other researchers who have the same interests as him. He will firstly join the community service, and then will search for p2p web services middleware keywords. The obtained results will be other researchers whose keywords coincide with these ones. All this information is stored in a decentralized way via the p2p Naming Service. We have extended this service to provide as well, a consistent API for performing semantic searches across the overlay network. User data is inserted using the e-mail address as its unique identifier. Each keyword is inserted in the p2p network with an index to all remaining keywords and the user identifier. When searching, the methodology to follow is to search through each keyword s indexes, and the result returned is a list of user identifiers ordered by number of matching keywords. As commented earlier, this is a first step in creating communities around the web application and web services deployed in the p2p network. We are planning development of a new collaborative workspace application which will enhance and strengthen the groupware system and the creation of communities. At this moment, we are now designing the p2pcm workspace components. These components benefit from the p2p persistence services and one-to-many communication channels for state propagation. 5. Related Work Both peer-to-peer and web models are slowly converging in a number of research projects. On the one hand, decentralized location of web services is a major goal of several initiatives. In this line, we outline the works of federated UDDI [1], UDDI over JXTA project, and also UDDI over a DHT with a search engine [2]. All these works only focus on the decentralized service publication and discovery, but omit service deployment in edge networks. Another interesting work proposes an adaptive migration of web services [8] in order to achieve bandwidth reduction and load balancing. The authors describe how to migrate services between web servers in a transparent way. They also provide a decentralized UDDI registry constructed on top of the JXTA infrastructure. Although it is a promising idea, they do not provide service fault tolerance and they do not offer true load balancing between several peers offering the same service. Other related projects like YouServ [3] offer web hosting and content sharing over a peer-to-peer network of personal web servers. Although they focus on static content publishing, they also provide lightweight plugin architecture for constructing small applications. This project has some analogies with our J2EE web deployment system over a network of lightweight web servers. They however provide a limited proprietary model for dynamic web applications since they are focused on static content distribution. POST [9] is a decentralized email system that substitutes the SMTP and IMAP traditional email services. They also construct on top of the FreePastry structured overlay and improve the security model of mail and asynchronous communications. While their system is an alternative to traditional mail systems, ours is more complementary to existing web deployments. Finally, the OpenDHT [7] project promotes the adoption of DHTs by providing a public hash table service interface to put and get string values, which are replicated and stored in a decentralized way on top of a structured p2p network. This is a very simple DHT which is deployed on approximately 200 PlanetLab nodes. OpenDHT and p2pweb SOA target different domains, but both of them rely on the same foundations
for providing services from a peer-to-peer supernetwork. 6. Conclusions and Future Work In this paper we present a novel infrastructure enabling the convergence of peer-to-peer and Web technologies. We bring the decentralization, faulttolerance, dynamic load-balancing and self-adjusting properties of peer-to-peer models to the standardized world of web applications and services. Our p2pweb overall model includes our more relevant work in peer-to-peer middleware including DERMI, p2pcm and Snap platforms. Furthermore, we present a novel web service integration and deployment over p2pweb service oriented architecture. We additionally provide an open source implementation of our p2pweb middleware under the umbrella of the ObjectWeb Consortium [http://snap.objectweb.org]. The major drawback of our overall platform is the Java-centric approach focused on the J2EE platform. We incorporated the p2p SOA in order to enable the deployment of web services in a p2p network. This would also permit interoperation with other technologies. As we can see, the convergence of peer computing and web service technology is yet another instance of developers using the right solutions, while companies benefit from increased efficiency and reduced handling costs. Our approach does not aim to replace existing web servers but instead, to offer a complementary solution for low-cost world-wide web applications. A lot of work remains to be done in the p2pweb platform. We are now performing strong validation tests on the PlanetLab testbed. More specifically, our goal is to considerably improve the adaptive, faulttolerant, load-balancing and self-adjusting features of our overall infrastructure. Another research line is focused in the construction of a Collaborative p2pweb Portal Framework. The Portlet concept is very important inside it and its interfaces (view, edit and help) have two access modes: via web inside the p2p portal and via web service from any non web application. The framework is workspaceoriented and the p2p portlets, distributed all around the network, are obviously the most important hotspots. Finally, we also want to further improve integration of BitTorrent channels (Azureus) in the overall platform. Now, bittorrent is used for efficient one-tomany large content distribution in p2pweb, but we are opening new research lines. Like OpenDHT, we expect to offer our p2pweb service infrastructure over the PlanetLab testbed in the next months for public tests and experiments. 7. Acknowledgements This work has been partially funded by the Spanish Ministry of Science and Technology through project TIC-2003-09288-C02-00. 8. References [1] K. Sivashanmugam, K. Verma, A. P. Sheth, Discovery of Web Services in a Federated Registry Environment, Proceedings of IEEE Second International Conference on Web Services, June, 2004, pp. 270-278 [2] C. Schmidt and M. Parashar, A Peer-to-Peer Approach to Web Service Discovery, World Wide Web Journal, Vol. 7, Issue 2, June 2004. [3] R.J. Bayardo, A. Crainiceanu, R. Agrawal, Peerto-Peer Sharing of Web Applications. Proceedings of the Twelfth World Wide Web Conference (WWW 2003). Budapest, Hungary, May 2003. [4] M. J. Freedman, D. Mazières. Sloppy Hashing and Self-Organizing Clusters, IPTPS 2003. [5] C. Pairot, P. García, and A. F. Gómez Skarmeta, Dermi: A New Distributed Hash Table-based Middleware Framework. IEEE Internet Computing. Vol 8, No. 3, pp. 74-84, May/June 2004. [6] C. Pairot, P. García, R. Mondéjar, et al., Building Wide-Area Collaborative Applications on top of Structured Peer-to-Peer Overlays, Proceedings of the 14 th IEEE International Workshops on Enabling Technologies: Infrastructures for Collaborative Enterprises, June 2005 [7] S. Rhea, B. Godfrey, B. Karp, et al., OpenDHT: A Public DHT Service and Its Uses, Proceedings of ACM SIGCOMM 2005, August 2005. [8] B. C. Hammerschmidt, V. Linnemann, Migrating stateful web services using Apache Axis and P2P, Proceedings of the IADIS 2005, 22.-25., Carvoeiro, Portugal. [9] A. Mislove, A. Post, C. Reis, et al. Post: A secure, resilient, cooperative messaging system. In Proceedings of the HotOS '03, Lihue, HI, 2003.