International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

MEASURING OF WEBSERVICES USING COUPLING METRICS

Dr K Venkatesh Sharma, Asst Professor, Jimma University,[email protected]

Behailu Shewandagn, Asst Professor, school of ,jimma university, [email protected] Shankar Nayak Bhukya, Asst Professor, SVIT, Hyderabad, [email protected]

ABSTRACT-A service-oriented architecture (SOA) is Keywords- Service Oriented Architecture, Service a set of principles and methodologies for designing Reusability, Coupling, UML, Class Diagram, and developing software in the form of Dependencies. interoperable services. These services are well I.INTRODUCTION defined business functionalities built as software component that can be reused. Reusability is the Web services can implement a service- most demanding core principle of Service Oriented oriented architecture. Web services make Architecture (SOA). Service reusability is the functional building-blocks accessible over measure of ease with which one can use previously standard Internet protocols independent of developed services in the new applications. The platforms and programming languages.A Web Existing System tells about each research and publication focuses on different qualities of service service is a software application which is to propose a set of metrics for service reusability. identified by a URI, and whose interfaces and Many coupling metrics have already been proposed binding are capable of being defined, described but it is recognized that they considered for and discovered by XML artefacts and supports measuring coupling are insufficient. In all these the direct interactions with other software IO dependency factors, delayed dependency and applications using XML based messages via various indirect dependency are not considered. The internet-based protocols.Characteristics Of Web proposed system measures service coupling based Services are XML-based, Loosely coupled, on five metrics as follows: direct dependency, Coarse-grained. Loose coupling induces indirect dependency, IO dependency, delayed reusability of services. message dependency, state dependency .Since the metrics are going to be applied on each individual A.Characteristics of service service, coupling level of the service will be more appropriate. The evaluation of correct coupling reusability level of service will lead to better performance, reusability and efficiency of service. For making the service as a reusable one, the emphasis should be given to both design and quality characteristics (Fig.-1).

ISSN(Online) : 2456-5717 7 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

At the design stage the service should be  Statelessness: Statelessness adhere other design characteristics which encourages service enhance service reusability. reusability. Lesser the amount of state management B. Design Characteristics of Service responsibilities increases its Reusability and availability which are the required  Loose Coupling: Service qualities to enhance service loose coupling enhances the reusability. service reusability. The lower  Discoverability: Service the dependency with other discoverability promotes services, the more easily it service reusability. If and can be reused. only if the service consumer  Composability: Service can easily find the required composability is the key service, the service can be principle for reusability. The more reusable. composable service can  Granularity: The service easily aggregate with other granularity may be fine services. Therefore the grained or coarse grained. service composability offers Depending upon the type of higher degree of service service, the granularity level reusability. may vary. The correct  Abstraction: Service granularity level of the abstraction hides the service enhances the service unnecessary information re-use. from the service consumers. Also it reduces the needless C.Coupling: coupling between the service A principle characteristics of a consumer and service service is Loose Coupling .Coupling means provider thereby increases that the existent and the extent of the service reusability. dependency between modules, components,

ISSN(Online) : 2456-5717 8 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

or services. If dependencies are known and functional richness, easy understandability, few then the coupling is said to be loose good exception handling and portability, coupling. In contrast, the dependencies are independent of other services. The design more and unknown for tight coupling. If characteristics of service reusability are dependency, exist between services, then the loose coupling, comparability, autonomy, change in one service may cause changes in abstraction, statelessness, discoverability, dependent services which affect the granularity, etc[7]. flexibility of the system. The coupling is an important aspect Coupling is the extent to which the in the evaluation of reusability of various subcomponents interact. If they components or services. In this paper we highly interdependent then changes to one propose a suite of metrics for measuring the are likely to have significant effects on the degree of coupling in services at the design behavior of others [4]. Hence loose coupling phase and show how reusability can be between its subcomponents is desirable evaluated from those coupling metrics. The characteristics of a component. dependencies between services cause

coupling. Many coupling metrics have II.RELATED WORK already been proposed but it is recognized Reusability is the key paradigm for that the dependencies they considered for increasing in the software measuring coupling are insufficient. This development. Reusability was the core paper takes five kinds of dependencies viz. concept of object oriented systems which direct dependency, indirect dependency, IO there on evolved into component based dependency, and State dependency and systems and service oriented systems. Delayed Message dependency to evaluate Various metrics like Modularity, Mismatch, the degree of coupling in a service[5]. Service Granularity, Discoverability, III.PROPOSED SYSTEM Service Cohesion and Service Coupling were identified [6]. The Proposed system defines the coupling dependencies of the given service. A Study and Critical Survey on The service is represented based on the Service Reusability Metrics provides service standardized modeling languages UML. design attributes for reusability such as

ISSN(Online) : 2456-5717 9 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

First stage of the system is From the above five metrics the conversion of UML notation of the given coupling level of service have been service to meta data. The meta data is the evaluated. Since the metrics are going to be skeleton code of the UML notation of the applied on each individual service, coupling given service. The meta data is the code level of the service will be more appropriate. which contains the member variables and By using the Meta data information the member functions with its return type of the coupling of the service can be quantified. corresponding class of the given service Fourth stage of the system is design Second stage of the system is comparison and report generation. In this analysis of service from meta data. From the stage the report is generated for specifying meta data the following data are grouped. the coupling level of the given service. Total number of services in the system, 1) Direct Dependency number of services calls from the given The direct dependency is direct services to others and vice versa, number of connection between services. This kind of transitive connection between the services, dependency may exist between services state of the web service, number and type of directly when a service calls other services input parameters and return values, total or a service is called by other services. number of asynchronous messages, total Therefore the direct dependency measure number of messages. Those data is given as may be the summation of dependencies on input for next stage for evaluation of other services and dependencies of other coupling. services on this service and can be measured Third stage of the system is as, evaluation of coupling level from the analysis of the service from Meta data. For evaluating the coupling level of the service 푫푫 = [ ∑ the following parameters have been focused − ==,≠

 direct dependency  indirect dependency + ∑ ] ==,≠  IO dependency Where,  delayed message dependency  state dependency.

ISSN(Online) : 2456-5717 10 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

n is the total number of services in the The indirect dependency between system an Si ,j=1 when there is a connection services may occur at: between the service Si and Sj, otherwise 0. (a) When there is indirect Sj i=1 when there is a connection between connection or transitive the services Si and Sj , otherwise 0. connection between services and DD(S) value lies between 0 and 1, if the (b) When there is a sharing of value is 0 there is low direct dependency. If global data between services. the value is 1, the direct dependency is high . (a) When service A depends on service B which in turn depends on service C, transitively there is indirect dependence between service A and service C (Fig.-3). This kind of indirect dependency can be measured as Fig 3.1 Dependencies on other services

푰푫푫 = ∑ − =

Si = 1 whenSi is indirectly connected with service S, otherwise 0. Where,n is the total number of services.

Fig 3.2 Dependencies of other services on this service

Fig 3.3 Indirect Coupling 2) Indirect Dependency:

ISSN(Online) : 2456-5717 11 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

(b) Indirect dependence may also occur the state of service. The CRUD operations when there is a global data sharing between make the service to maintain its state. The the services. When global data in database is state dependency of service can be measured shared by many services, there exist as, coupling between the services. Therefore the indirect dependency due to shared database can be measured as, 푫 = ∑ = Where, fi is 1 when the function calls in S which 푰푫푫푫 = ∑ × = create or read or update or delete a database

otherwise 0. Where, TSiis total number of services shares Nfis total number of function calls in S and data in ith repository, SD(S) is the coupling due to service n is the total number of services and m is statefulness where value lies between 0 and total number of repositories. 1.

Hence the Indirect Dependency (IDD) can Lower the value the service is stateless and be measured using both equations we get, state dependency is less and higher the value the service is stateful and state dependency IDD (S) = ½ [IDDT(S) + IDDSD(S)] is more. Where, the value of IDD lies between 0 and 1. Lesser the value, low indirect 4) IO Dependency dependency, higher the value, there is high Service coupling also depends upon in direct dependency. both the number and type of input as well as 3) State Dependency output data items i.e., the number of input parameters and output data of the service. In The service should be as stateless as order to avoid unnecessary dependencies on possible. If any services maintain its state, the input format, a service should accept then the coupling arises. Therefore while required input data items to perform the measuring the coupling we have to measure service being requested. In the same way a

ISSN(Online) : 2456-5717 12 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

service should return a data that is related to After finding the dependency weight its internal operation. Exposing such data as value for each data item, the coupling due to part of the response data will create I/O dependency can be measured as, unnecessary dependencies on the internal

implementation of the service. 풅 For measuring the coupling due to this 푰푫 = ∑ 푾 풅 = cause, we considered the type of input and Where , output data items. For each type of data Wiis the weight value of each input and item, the coupling will be considered: void output data items of the service, as very low, primitive as low, built-in or ndis the total number of input and output user defined as medium and complex data data items of the service and type as high. For quantifying the coupling, IOD(S) is the coupling due to IO we can assign dependency weight value for dependency where value lies between 0 and each category of data items as given in the 1. Table-5.1. Lower the dependency value lower the IO dependency and higher the value, higher io dependency and coupling. For the given input and output data items of the service, with the help of above tables we can measure the coupling.

Data item type Dependency weight value 5) Delayed Dependency Void 0.0 It is not necessary that all service Primitive 0.33 requests need a immediate response. Often Built-in 0.66 the response may be delayed. This delayed Complex 1.00 message returning may cause unnecessary dependency between called and calling Table-5.1 -Dependency Weight Value services till there is a response. These synchronous messages may be used to

ISSN(Online) : 2456-5717 13 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

reduce this kind of dependencies. The going to be applied on each individual dependency due to delayed message can be service, coupling level of the service will be measured as, more appropriate. The evaluation of correct coupling level of service will lead to better performance, reusability and efficiency of

풔풚 service. 푫풔푫 = Other properties which affect service

reusability are cohesion and granularity. The Where, future enhancement is to include cohesion NMsynis total number of synchronous and granularity to evaluate reusability of messages and services. TNM is total number of messages in S.

DMsgD(S) value lies between 0 and 1. REFERENCES Lower the value service is loosely coupled.

[1] Peter Henderson and IV.CONCLUSION JingtaoYang(2004) ,“Reusable Web The Existing System focuses on Services”,Springer (ICSR 2004). different qualities of service to propose a set [2] SaadAlahmari , Ed of metrics for service reusability. Many Zaluska(2009),“Optimal Granularity coupling metrics have already been for Service-Oriented Systems”,The proposed but it is recognized that they are third Saudi International Conference insufficient. In all these the IO dependency (SIC09). factors, delayed dependency and various [3] George Feuerlicht and indirect dependency are not considered. JosipLozina(2007), “Understanding Thus the proposed system measures Service Reusability”,International service coupling based on the metrics that Conference. have not been considered. The five metrics [4] GuiGui and Paul D. Scott(2008), taken into consideration are direct “New Coupling and Cohesion dependency, indirect dependency, IO Metrics for Evaluation of Software dependency, delayed message dependency, Component Reusability”, IEEE state dependency. Since the metrics are

ISSN(Online) : 2456-5717 14 Vol. 3, Special Issue 30, March 2017 International Journal of Advanced Research in Basic Engineering Sciences and Technology (IJARBEST)

International Conference(ICYCS 2008). [5] T.Karthikeyan, J.Geetha(2012),”A Metrics Suite and Fuzzy Model for Measuring Coupling in Service Oriented Architecture”IEEE International Conference. [6] G.Shanmugasundaram, V. PrasannaVenkatesan and C. Punitha Devi(2011), ” Reusability metrics – An evolution based study on Object Oriented System, Component based System and Service Oriented System”,Journal of computing, Volume 3,Issue 9. [7] T.Karthikeyan, J.Geetha(2012), ”A Study and Critical Survey on Service Reusability Metrics”International Journal of Information Technology & Computer Science, Vol. 4, No.5.

ISSN(Online) : 2456-5717 15 Vol. 3, Special Issue 30, March 2017