Procedia Engineering
Available online at www.sciencedirect.com
Procedia Engineering 00 (2011) 000–000
Procedia Engineering 30 (2012) 591 – 597
www.elsevier.com/locate/procedia
International Conference on Communication Technology and System Design 2011
Automatic Service Graph Generation for Service Composition in Wireless Sensor Networks V.Vanithaa,.V.Palanisamyb, K.Baskaranc, a* a
CSE department, Kumaraguru College of Technology, Coimbatore , Tamilnadu, India b Info Institute of Engineering, Coimbatore, Tamilnadu, India c CSE department, Govt. College of Technology, Coimbatore, Tamilnadu, India
Abstract Service Oriented Architecture has gained significant attention as programming model for heterogeneous wireless sensor networks. Its key idea is to exploit the decoupling of service providers and consumers to enable platform independent applications that are dynamically bound to platform specific services. The promise of service oriented architecture is to enable the composition of new distributed applications/solutions: when no available service can satisfy a client request, available services can be composed in order to satisfy such a request. In this paper we explore a simple approach to create service graph on-demand for service composition in service oriented wireless sensor network based on input/output dependency between services. The proposed algorithm ASSG (Automatic Service Graph Generation) discovers abstract services that satisfies user constraints and identifies the relationship between these services. Based on this service graph is generated. The application of this method is discussed with an example. Simulation results prove that our proposed algorithm increases success ratio and reduces service composition time.
© 2011 Published by Elsevier Ltd. Selection and/or peer-review under responsibility of ICCTSD 2011 Open access under CC BY-NC-ND license. Keywords: wireless sensor networks; service oriented architecture; service composition; service graph;
1. Introduction A lot of effort was put into technical and algorithmical problems in wireless sensor networks (WSN) [1], yet implementing a WSN application is still a tedious task. Many parameters have to be considered like network density, traffic patterns, mobility models and environmental influences. Also WSN lie at the crossroads of software, network and embedded engineering. This field requires developers knowledgeable in all these areas, so that maximal benefit can be gained from the well established domains. Otherwise WSNs will inevitably suffer from the danger of re-inventing the things that are already well-known and widely used in the other areas. However, most of the best practice cannot be directly reused in WSNs and have to be adapted accordingly to the specifics of this domain. Therefore, besides profound programming abilities, a lot of expert knowledge and understanding is needed to design a functioning and robust sensor network application. This holds especially if we consider the fact that *V.Vanitha. Tel.: +91- 9944650728.
E-mail address:
[email protected]..
1877-7058 © 2011 Published by Elsevier Ltd. Open access under CC BY-NC-ND license. doi:10.1016/j.proeng.2012.01.903
592
V. VanithaProcedia et al. / Procedia Engineering 30 000–000 (2012) 591 – 597 v.vanitha/ Engineering 00 (2011)
actual users of sensor network technology are not usually experienced in the field of computer science. To enable users without WSN expertise to access WSN technology, abstraction for application development is necessary. An abstraction for application development makes the complexity of the sensor network application more transparent to the user. It must enable the user to develop different applications easily and in a minimum amount of time. In addition to this, wireless sensor networks generate large volumes of raw data which possess natural heterogeneity. WSNs are normally application specific with no sharing or reusability of sensor data among applications. In order for applications and services to be developed independently of particular WSNs, sensor data need to be represented in a way that is suitable for efficient sharing. A recent report from market research firm ONWorld predicts that the global market for wireless sensor and actuator networks (WSAN) will grow tenfold by 2011. However, the same report also identifies the ease of programming as the major barrier to the adoption of WSAN technology [5]. Service Oriented Architecture is the ideal architecture to ease the programming and to integrate WSNs. In service oriented wireless sensor network application, each activity is implemented as a separate service. When using SOA, the WSN plays the role of service provider, while the application is its client. Service oriented wireless sensor network provides interoperability, scalability and reusability of sensors [2]. Automatic service composition has the potential to dramatically change the way how SOAs are engineered: Given a rich set of base services and efficient reliable automatic service composition methods the vision of programming as specifying what a program is supposed to do and not how it is supposed to do it can become reality. The key contributions of the paper are as follows: 1.Discover candidate abstract services, 2.Identify dependency between the abstract services and generate the service graph automatically. Network architecture used in our work is similar the one used in [6], the service providers form a service provider overlay network. The rest of the paper is organized as follows. Related work on service composition is presented in section 2, and section 3 explains the proposed approach in detail. Performance is analyzed through simulations in section 4. Finally, section 5 concludes the paper. 2. Related work Wireless Sensor Networks (WSNs) are envisioned to become an integral part of the future Internet where they extend the Internet to the physical world. Service oriented architecture for wireless sensor networks has been active research area recently. In [3] the authors proposed service oriented architecture that executes efficiently in heterogeneous wireless sensor network. Its key idea was to present platform-specific functionalities as services that are dynamically bound to platform independent applications. In [4] Adaptive service binding strategies to automatically adjust the bindings between service providers and consumers in response to changes in the network topology is presented. In [6] the authors studied service composition design which minimizes the number of service composition solutions during the lifetime of a persistent query. In [7] the authors presented an approach to integrate WSNs seamlessly into business process environments using BPEL and Web Services while using only very few resources on the sensor nodes. But BPEL provides only static composition solution. In [8] the authors presented GWELS, a prototype that allow user to design workflows with a graphical user interface and transfer it automatically into a sensor network application as a sequence of service calls. In [9] the authors proposed global QoS aware service selection method to select the suitable service based on user’s non-functional requirements. Automatic service composition is well studied in web service paradigm. Papers [10] - [16] present survey on web service composition. In [17] the authors proposed a middleware called SLIM to support service oriented programming in mobile wireless sensor and actuator networks. In the literature there are some works that uses service graph, but to the best of our knowledge this is the first work to generate the service graph for wireless sensor networks.
V. Vanitha et al.Procedia / ProcediaEngineering Engineering0030(2011) (2012)000–000 591 – 597 v.vanitha/
593
3. Automatic service graph generation 3.1 Service Discovery The task of service discovery is to identify services based on matching of their input and output parameters with the corresponding ones in the service request. In an attempt to find an appropriate service providing a requested functionality it is a common situation to find a service that is able to generate the requested effects but some of its preconditions are not fulfilled. In these cases, chaining of services can be used to overcome that problem [18]. The most common approaches to service chaining include graph search, forward chaining and backward chaining. To reduce the search space and to improve the scalability the ASSG combines the forward and backward chaining. Suppose a service request SR (I, O) arrives the algorithm search the table for a service with output = O. From there on it follows a link and compare to find all the candidate services. Also the algorithm checks whether the cost of the composition of the services exceeds the user specified cost constraint, if it exceeds an appropriate message is sent back to the user. After discovery, the stack contains all the necessary services to answer the user request. The time complexity of this algorithm in the worst case is O (n).Where n is the number of services. 3.2 Service graph generation Service graph is wiring of group of services together describing application flow. While several proposals exist for service composition in the Internet, the most important one being BPEL [19]. BPEL is not suitable for wireless sensor networks because the process model generated by BPEL is static 3.2.1 Extracting dependency between the abstract services After discovery, candidate abstract services are represented in the form of dependency matrix (DM) that indicates all direct dependencies between services. As specified in [20] for component dependency, the matrix that models the dependency will be a square matrix (n*n) where n is the number of component services in the composite service. In the dependency matrix each service is represented by a column and a row. If a service S i in the ith column is dependent on service Sj in the jth row (i.e output of service Sj is the input of the service Si) then DM [i,j] = 1, otherwise DM[i,j] = 0. More formally, the values of all the elements in DM are defined as d ij = 1 if Si is dependent on Sj otherwise dij = 0.This dependency information is obtained for each candidate abstract services by traversing the link field in the SSI table. Direct dependency matrix for the above service composition example is shown in table 1. Table 1: Direct dependency matrix
S1 S2 S3 S4
S1 0 0 0 0
S2 1 0 0 0
S3 0 1 0 0
S4 0 0 1 0
Because of the transitivity of dependencies, it is possible to gather all indirect dependencies between the services by calculating the transitive closure. For example if service B has a direct dependency on service A and service C again has direct dependency on service B then service C will have indirect dependency on service A. Thus, one should traverse all possible explicit direct service dependency chain to extract indirect dependencies. This dependency chain is a linked list of services that starts from a service in focus and terminates with a service that doesn’t have direct dependency with any service. The link between individual services in a chain represents the direct dependency between services. For example one possible dependency chain for S4 is: S4-S3-S2S1-none. The Warshall’s algorithm is used to calculate the transitive closure. The indirect dependency matrix for the above matrix is shown in table 2.
v.vanitha/ Procedia Engineering 00 (2011) 000–000
594
V. Vanitha et al. / Procedia Engineering 30 (2012) 591 – 597
Table 2: Indirect dependency matrix
S1 S2 S3 S4
S1 0 0 0 0
S2 1 0 0 0
S3 1 1 0 0
S4 1 1 1 0
From the indirect dependency matrix the following observations can be made: 1. If the matrix is upper triangular dependency matrix, all dependency relationship between services is uni-direction. 2. If the dependency matrix is diagonal dependency matrix, then there is no any dependency relationship between services. 3. If the dependency matrix is sparse dependency matrix, the system is a loosely coupled system. 4. Cyclic dependency is the good indicator of bidirectional communication. It can be identified by comparing the symmetrical elements or by checking its diagonal elements value of dependency matrix. The cyclic dependency exists if symmetrical elements of the dependency matrix are equal to 1 or a diagonal element of dependency matrix is 1. 3.2.2 Ordering services To generate the process model the knowledge of which services are independent and which services are heavily dependent is essential. This information is obtained by calculating the dependency coefficient (DC) for each service. The dependency coefficient of a service Sk can be defined as in (1): DC (Sk) =
(1)
The dependency coefficient represents the degree of dependency between the service and the rest of the services. The bigger the value of the DC (Sk) is, the stronger the dependency between the service and the rest of the system. Now using simple sorting algorithm the services are ordered based on their dependency coefficient. If the dependency coefficient of the two services is same then these two services can be executed in parallel. If the dependency coefficient of a service is 0 then the service is an independent service and it can be executed in parallel with other services. For the above scenario DC (S1) = 0, DC (S2) = 1, DC (S3) =2, DC (S4) = 3. After finding relationship between services the necessary control structure should be attached to the respective services. 4. Performance evaluation We implemented the proposed algorithm and carried out a series of experiments on an Intel Pentium III machine. We have considered two metrics success rate and composition time to evaluate the performance of the algorithm and compared them with the performance of SLIM and naive. Here naïve denotes a system without any composition solution. 4.1 Success rate The success ratio is the ratio of the total number of successful attempts to the total number of service requests. Two scenarios were considered to demonstrate the success ratio. In the first scenario, success ratio is measured by increasing the number of services. The more the number of available services the higher is the success ratio. We used two different query sets consisting of 20 one time queries and at the maximum each query consists of five component services. The figure 1 shows the success ratio of the query set I and figure 2 shows the success ratio of query set II. For both the query sets, the performance ASSG is better than naïve and SLIM. The reason for this is more number of queries gets answered when service composition is available.
V. Vanitha et al. / Procedia Engineering 30 (2012) 591 – 597 v.vanitha/ Procedia Engineering 00 (2011) 000–000
595
Figure 1: Success ratio for the query set I
Figure 2: Success ratio for the query set II
In the second scenario number of services is kept constant and number of requests injected into network was varied from 10 to 100. Figure 3 shows the success ratio with increased number of service requests. Again ASSG performs better than the other two for the same reason as in the scenario 1.
Figure 3: Success ratio for varying number of services requests
4.2 Execution Time Figure 4 shows the time required to discover the components and generate the service graph with number of user requests. The performance of our algorithm is more or less similar to that of SLIM. Figure 5 shows composition time when number of components services is two, three, four and five.
596
V. Vanitha et al. / Procedia Engineering 30 (2012) 591 – 597 v.vanitha/ Procedia Engineering 00 (2011) 000–000
Figure 4: Composition execution time for varying number of services requests
Figure 5: Execution time for varying number of services requests (with 2,3,4,5 component solutions)
5. Conclusion In this paper we proposed input/output dependency based automated service graph generation method for the purpose of dynamic service composition. The sequence is generated based on straightforward analysis of input/output dependency. We have tested our method with different scenarios. For these scenarios the output process model was valid. Simulation results show that for proposed algorithm is better in terms of success ratio percentage and execution time. In the future we plan to extend our solution to support more complicated service composition environment and additional QoS parameters. References [1] [2] [3] [4] [5] [6] [7] [8] [9]
F. Akyildiz, W. Su, Y. Sankarsubramaniam, and E. Cayirci, “Wireless Sensor Networks: A Survey, Computer Networks”, vol. 38, Mar. 2002, pp. 422-393. A.Rezgui and M. Eltoweissy. “Service-oriented sensor actuator networks: Promises, challenges, and the road ahead”. Computer Communications, 30:2648-2627, 2007. Fok, C.-L., Roman, G.-C., and Lu, C., “Enhanced coordination in sensor networks through flexible service provisioning”, technical report WUCSE-2009-2, Washington University, Department of Computer Science and Engineering, 2009. Fok, C.-L., Roman, G.-C., and Lu, C., “Adaptive service provisioning for wireless Sensor Networks”, technical report WUCSE-200983, Washington University, Department of Computer Science and Engineering, 2009. Eduardo Canete, Jaime Chen, Manuel Diaz, Luis Llopis and BArtolome Rubio, “A service-oriented Middleware for Wireless Sensor and Actor Networks”, Proceedings of sixth IEEE International Conference on Inforamtion Technology: New Generations -2009. Xiumin Wang, Jianping wang, Zeyu Zheng, Yinlong Xu, Mej Yang, “Service composition in service oriented Wireless sensor networks with persistent queries”, Proceedings of the 6th IEEE Conference on Consumer Communications and Networking Conference, 2009, pp.372-368 . Nils Glombitza, Dennis Pfisterer, and Stefan Fischer, “Integrating Wireless Sensor Networks into Web Service-Based Business Processes”, Proceedings of the 4th ACM International Workshop on Middleware Tools, Services and Run-Time Support for Sensor Networks, 2009, pp: 30-25. Glombitza, N., Lipphardt, M., Werner,C., and Fischer, S. “Using graphical process modeling for realizing SOA programming paradigms in sensor networks”. In proceedings of the 6th ACM conference on networked embedded sensor systems (ACM sensys 2008), Raleigh, North Carolina, USA (Nov.2008), ACM,Ed., pp.422-421. V.Vanitha, Dr.V.Palanisamy, “A Global QoS-Aware Service Composition in Wireless Sensor Networks”, International Journal of computer Applications (0975-8887), volume 1-No.19, 2010.
V. Vanitha et al. / Procedia Engineering 30 (2012) 591 – 597 v.vanitha/ Procedia Engineering 00 (2011) 000–000
597
[10] J. Rao and X. Su., “A Survey of Automated Web Service Composition Methods”, in Proceedings of the First International Workshop on Semantic Web Services and Web Process Composition, SWSWPC 2004, San Diego, California, USA, July 6th, 2004. [11] Kalasapur, S., Kumar, M., Shirazi, B.A., “Dynamic Service Composition in Pervasive Computing”, IEEE Transactions on Parallel and Distributed Systems, Vol. 18(7): 918-907, 2007. [12] [Fluegge, Matthias, et al., “Challenges and techniques on the Road to dynamically compose web services”. Proceedings of the 6th international conference on Web engineering (ACM ICWE-06), 2007, pp: 47 - 40. [13] [Lian Li, Ma Jun, Chen ZhuMin, Song Ling, “An Efficient Algorithm for Web service Composition with a Chain data structure”, Proceedings of the IEEE Asia-Pacific conference on service computing (APSCC’06) – 2006. [14] Zhumin Chen, Jun Ma, Ling Song, Li Lian, “An Efficient Approach to web service Discovery and Composition when Large Scale Services are Available”, Proceedings of the IEEE Asia-Pacific conference on service computing(APSCC’06) – 2006. [15] Abrehet Mohammed Omer, Alexander Schill, “Web services Composition using Input/Output Dependency Matrix”, Proceedings of the 3rd workshop on Agent-oriented software engineering challenges for ubiquitous and pervasive computing (ACM AUPC) , 2009 , pp: 26-21. [16] LIU AnFeng,CHEN ZhiGang, HE Hui,GUI WeiHua, Treenet: “A web service composition Model based on spanning tree”, In Proceedings of the 2nd IEEE International Conference on Pervasive computing and applications(ICPA), 2007, pp:623-618. [17] Cugola, G. and Margara A, “SLIM: Service Location and Invocation Middleware for Mobile Wireless Sensor and Actuator Networks”. In Proceedings of International Journal of Systems and Service-Oriented Engineering (IJSSOE). 1(3), 74-60, JulySeptember 2010 [18] U. Kuster, M. Stern, B. Konig-Ries, “A Classification of Issues and Approaches in automatic Service Composition”, 1st Int. Workshop on Engineering Service Compositions (WESC05) at ICSOC,05, Amsterdam, Netherlands, 2005. [19] [] F.Curbera, Y. Goland, J. Klein, F. Leymann, D. Roller, S. Thatte, and S. Weerawarana, “Business Process Execution Language for Web Services”, Version 1.0, http://www-106.ibm.com/developerworks/webservices/library/ws-bpel/,July 2002. [20] B. Li. “Managing dependencies in component-based systems based on matrix model”. In Proc. Of Net.Object.Days 2003, pages 25– 22, 2003.