How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion
1. Welcome QSIC 2011 Madrid, SpainJuly 13 - 14, 2011 An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion Ali Kazemi, Ali Rostampour, Amin Zamiri, PooyanJamshidi, Hassan Haghighi, Fereidoon Shams Automated Software Engineering Research Group PooyanJamshidi Lero- The Irish Software Engineering Research Centre, School of Computing, Dublin City University http://www.computing.dcu.ie/~pjamshidi/ pooyan.jamshidi@computing.dcu.ie
2. Agenda Background and Motivation What is “Service Cohesion” and “Conceptual Service Cohesion” Shortcomings of Existing Metrics The Contribution LSI Steps Applicability of LSI in Measuring Cohesion The Proposed Metric Example Evaluation Summary
13. Service Cohesion What is service cohesion? The strength of relationship between operations in a service.
14. Conceptual service cohesion What is conceptual service cohesion There is a meaningful semantic relationship between all operations of a service in terms of some identifiable domain-level concept: The focus of services on single business functionality
15. Why measuring service cohesion is important? High cohesion increases clarity and comprehension of the design :simplifies software maintenance by putting related operations in one service: reusability is improved, since it enables the service to focus on one single business functionality
16. Shortcoming of Previous Metrics They focus on structural aspect not conceptual aspect They consider only the number of shared entities that are used by service operations 𝑩𝑬𝟏 = A set of business entities that is processed by operation 1 𝑩𝑬𝟐= A set of business entities that is processed by operation 2 𝑩𝑬𝟏∩𝑩𝑬𝟐={Customer} Is there any relationship between BEs in 𝑩𝑬𝟏∪𝑩𝑬𝟐−𝑩𝑬𝟏∩𝑩𝑬𝟐?
17. The Contribution A metric namely SCD is proposed that measure the conceptual cohesion of services based on LSI technique This metric consider both service functionality and operation sequence to measure the conceptual cohesion We utilize business processes in order to measure service conceptual cohesion
18. Latent Semantic Indexing 1. A matrix is formed; each row of this matrix is corresponded to a term which occurs in the document. Each element (m, n) in the matrix is corresponded to number of times that term m occurs in document.
19. Latent Semantic Indexing 2. A weight is assigned to each term in a document 3. Using SVD (Singular Value Decomposition), the resulting term-document matrix is decomposed into three matrices T, S and D. T and D keeps information of terms and documents based on conceptual domains extracted by SVD. S is a singular value matrix having information about conceptual domains extracted by SVD 4. T, S and D matrices are truncated to k conceptual domains: BBR=T2S2T2S2T represents the term-term relationship
20. Applicability of LSI in Measuring Cohesion Similar to LSI, define Business Entity - Elementary Business Process (BE-EBP) matrix, where m is the number of business entities and n is the number of elementary business processes Business processes are placed in columns of BE-EBP matrix Business entities are placed in rows of the mentioned matrix
21. EVALUATION The CRUD Matrix for Sales Department Scenario P. Jamshidi, M. Sharifi and S. Mansour., "To Establish Enterprise Service Model from Enterprise Business Model.", "In 5th IEEE International Conference on Services Computing (SCC’08)", pp. 93-100, (2008).
22. Applicability of LSI in Measuring Cohesion The Functionality Aspect of Cohesion Two business entities are related if both are accessed or processed by at least one business process The relationship between business entities can be specified based on the type of the actions performed by processes on these entities Generally, we can consider priorities C>U>D>R Using this idea, we can propose a weighting model which explains the exact relationship between business entities
23. Applicability of LSI in Measuring Cohesion Two business entities which are processed by a business process have the highest relationship degree if this business process performs Create action on both Based on the degree of relationship, two business entities are placed in the second group if the business process performs action C on one of them and action U on the other one
24. Applicability of LSI in Measuring Cohesion The target weighting model must completely reflects these priorities
25. Applicability of LSI in Measuring Cohesion Fill the elements of BE-EBP matrix based on the amount of affinity between business entities and business processes Regarding the priorities of actions, give weights of 4, 3, 2 and 1 to C, U, D and R, respectively. This way of weighting perfectly reflects the categorization mentioned in previous table
26. Applicability of LSI in Measuring Cohesion The Operation Sequence Aspect of Cohesion Sequential dependency between the operations of a service causes a sequential control flow in service to satisfy specific business functionality A sequence flow is used to show the order of activities which are executed in a business process Using the information which exists in business process diagrams, the degree of sequential relation between activities could be obtained
27. Applicability of LSI in Measuring Cohesion In order to measure sequential aspect of cohesion, we first categorize the sequence flow between the activities of a business process and then give each category a weight Normal Flow
28. Applicability of LSI in Measuring Cohesion If there is normal sequence flow between two activities, sequence flow of them is at highest degree of relation If there is a parallel gateway between two activities, their sequential flow is in the second category of relation degree If there is an inclusive gateway between two activities, their sequential flow would be in the third category If there is an exclusive gateway between two activities the weight of their sequential flow is the least among other categories
30. The proposed metric To formulize our metric we use a graph-based approach Consider service S with a set of operations𝑂=𝑂1,𝑂2,…,𝑂𝑚 Each operation Oj of service S accesses a set of business entities that are shown as 𝐵𝐸𝑗=𝐵𝐸𝑗,1,𝐵𝐸𝑗,2,…,𝐵𝐸𝑗,𝑛 For each pair of operations Oi and Oj in service S a complete graph G= (V, E) is formed such that 𝑉=𝐵𝐸𝑖∪𝐵𝐸𝑗
31. The proposed metric The conceptual relationship between two operations i and j is calculated as follows: 𝑂𝑅𝐷(𝑖,𝑗)=∀ 𝑝∈𝑉∀ 𝑞∈𝑉𝑝>𝑞(𝐵𝐵𝑅𝑝,𝑞)𝑉×𝑉−12 Where: p and q are the identifying number for their corresponding business entities. 𝐵𝐵𝑅𝑝,𝑞is the degree of relationship between business entities BEp and BEq. V is the cardinality of set V The denominator of the fraction in this formula is the number of edges of complete graph G
32. The proposed metric The degree of cohesion of a service is consequentially defined as the degree of relationship between its operations as follows 𝑆𝐶𝐷𝑆=∀ 𝑖∈𝑂∀ 𝑗∈𝑂𝑖>𝑗𝑂𝑅𝐷𝑖,𝑗𝑚×𝑚−12 𝑚>11 𝑚=1 where, m is the number of operations in service S
37. EVALUATION This service has four operations: Add Customer, Add an Account receivable note, Check Credit and Receive Order O=O1,O2,O3,O4 𝐵𝐸1=Customer,Credit 𝐵𝐸2=Customer,Credit,Account receivable note 𝐵𝐸3=Customer,Credit,Order 𝐵𝐸4=𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟,𝑂𝑟𝑑𝑒𝑟
38. EVALUATION Business Entities Graph for Service O1 and O2 𝑂𝑅𝐷1,2=0.71+0.32+0.473=0.50 𝑆𝐶𝐷𝑆1=0.50+0.46+0.46+0.38+0.38+0.466=0.44
39. Analytical Validation Non-negativity and Normalization Null Value Monotonicity Cohesive Modules The proposed metric satisfies all of the cohesion properties and therefore it can be a valid measure of cohesion from the measurement theory point of view
41. Discussion We will provide a comparison of the assigned cohesion values with the output of the other proposed metrics in service-oriented architecture such as SIDC, VCOHES and our previous metric (SCV) The degree of cohesion between two groups of operations of this service using the mentioned metrics is provided in Table The metrics SIDC and VCOHES both give an equal value for the cohesion of the operations! The relation of these operations completely differs in conceptual point of view
43. Discussion The calculated values for the mentioned groups are 0.5 and 0.46 respectively, using the proposed metric why the cohesion value of G2 has been reduced although Order has three shared activities with Credit and Customer in its behavioral model? the type of actions is efficiently used in cohesion measurement The effect of actions sequence on service cohesion could be further evaluated with similar analyses
44. Future Work A real-world case study with a complete set of enterprise’s business processes would further elaborate on its effectiveness Validate SCD empirically Use this metric in service identification methods Evaluate the impact of SCD in reusability and maintainability of services
45. Our Publications on Software Measurement A. Khoshkbarforoushha, P. Jamshidi, A. Nikravesh, F. Shams, A Metric for Measuring BPEL Process Context-Independency, Service-Oriented Computing and Application (SOCA) Journal, Springer, 2011, DOI: 10.1007/s11761-011-0077-8. [WWW], [Online Appendix] A. Khoshkbarforoushha, P. Jamshidi, M. Fahmideh, F. Shams, A Metric for BPEL Process Reusability Analysis, Journal of Information and Software Technology, Second Revision Submitted A. Kazemi, A. Rostampour, P. Jamshidi, E. Nazemi, F. Shams, A. NasirzadehAzizkandi, A Genetic Algorithm Based Approach to Service Identification, IEEE World Congress on Service Computing (SERVICES'11), Washington DC, USA, July 4-9, 2011. A. Kazemi, A. NasirzadehAzizkandi, A. Rostampour, H. Haghighi, P. Jamshidi, F. Shams,Measuring the Conceptual Coupling of Services using Latent Semantic Indexing, the 8th International Conference on Service Computing (SCC'11), Washington DC, USA, July 4-9, 2011. A. Kazemi, A. Rostampour, F. Shams, P. Jamshidi, A. NasirzadehAzizkandi, Measuring Service Cohesion Using Latent Semantic Indexing, The 6th International Conference on Internet and Web Applications and Services (ICIW'11), 2011. A. Rostampour, A. Kazemi, F. Shams, P. Jamshidi, A. NasirzadehAzizkandi, Measures of Structural Complexity and Service Autonomy, IEEE The 13th International Conference on Advanced Communication Technology (ICACT'11), 2011. [PDF] A. Rostampour, A. Kazemi, F. Shams, A. Zamiri, P. Jamshidi, A Metric for Measuring the Degree of Cohesion in Entity-Centric Services, IEEE International Conference on Service-Oriented Computing and Applications (SOCA'10), 2010. [PDF] A. Khoshkbarforoushha, R. Tabein, P. Jamshidi, F. Shams, Towards a Metrics Suite for Measuring Composite Service Granularity Level Appropriateness, 6th World Congress on Services (SERVICES-I), 2010. [PDF] A. Khoshkbarforoushha, P. Jamshidi, A. Nikravesh, S. Khoshnevis, F. Shams, A Metric for Measuring BPEL Process Context-Independency, IEEE International Conference on Service-Oriented Computing and Applications (SOCA'09), 2009. invited to be extend for SOCA Journal. [PDF] A. Khoshkbarforoushha, P. Jamshidi, F. Shams, A Metric for BPEL Process Reusability Analysis, International Workshop on Emerging Trends in Software Metrics (WETSoM'10), ICSE 2010, Cape Town, South Africa. [PDF]
46. Thanks For your Attention! Please ask your questions now or send them in the following email address: pooyan.jamshidi@computing.dcu.ie
Notas do Editor
Throughout this presentation, firstlyAfterwardsFinally
Emerging software development paradigmService-Oriented (SO) systems are developed as aset of interacting software services, which are:– highly reusable (self-contained & stateless)– language/platform agnostic– business-aligned
Structural properties of service-oriented software design such as coupling and cohesion have a high correlation to maintainability factors of the products.Measuring structural properties of software allows prediction of maintainability early in the Software Development LifeCycle
The figure illustrates the design-level view of service-oriented system, where the design and implementation of the individual services is taken into consideration. For example, Design1 consists of three services, s1, s2, and s3, where each service consists of two distinct fundamental design artifacts: service interfaces and service implementation elements. As was described previously, services can be implemented using a range of different technologies and development paradigms. Similarly, there are no technological constraints on the languages and description formats used to describe service interfaces (although WSDL is commonly used to describe service interfaces in present implementations).
an example service-oriented system consisting of three services, which include different relationship types
A service encapsulates unrelated functionality insofar as there are no semantically meaningful relationships between any of the operations exposed in its service interface. Note that the Coincidental category of cohesion is entirely semantic in nature and is difficult to quantify by examining the structural properties of SO designs. An example Coincidental service (“Academic Management System‟ (AMS)) is shown below. This service exhibits Coincidental cohesion since none of the operations exposed in the AMS interface are related with one another in any semantically meaningful way.
The interface for the “Reporting‟ service shown below illustrates an example of Logical cohesion where the service interface operations are related only because they provide similar reporting functionality. The interface for the “Initializing‟ service shown below illustrates an example of Temporal cohesion where the operations are related only because they provide similar initializing functionality performed within the same time period (for example, during system start-up). The interface for the “Student Management‟ service shown below illustrates an example of Communicational cohesion where the operations are related to one another because they operate on the same data abstraction (they have a common input parameter type - Student).
Traditionally, cohesion was considered to be a property related to the internal structure of a software module. However, it has been suggested in a more recent studies that cohesion can also be interpreted as an externally observed property without regard for the internal structure of a module. As such, cohesion can also be determined by examining the similarity of a module's usage patterns from external clients. Therefore, the External cohesion category has been introduced in this research in order to capture the behavioral properties of service interfaces. The interface for the “Student Management‟ service shown below illustrates an example of External cohesion where all service interface operations are invoked from a given client (Student).
Service interface operations are implemented by the same implementation elements. The “Enrollment‟ service shown below exhibits Implementation cohesion since two operations exposed in its service interface are implemented by the same elements.
Service operations are sequentially related insofar as either the output or post-condition from one operation serves as the input or pre-condition for the next operation.
There is a meaningful semantic relationship between all operations of a service in terms of some identifiable domain level concept .More specifically, the operations of a service contribute to either single business functionality or some other semantically meaningful concept such as an abstraction or data entity in the problem domain. This category represents the strongest type of service cohesion, given that it covers both the Functional and Model categories of classical and OO cohesion, which are considered to be the strongest categories of cohesion in the Procedural and OO paradigms respectively. Note that although both types of cohesion (Functional/Model) are conceptually strong, OO or data entity type abstractions should arguably be avoided in pure SO designs since a service should expose some aspect of a business function, rather than operations related to a particular domain-level abstraction. The “Enroll Student‟ service shown below exhibits Conceptual cohesion since all the operations are related to a single domain-level concept, in this case a concrete business functionality (enrolling a student into a course).
Generally one could claim that metrics in previous researches have considered this quality attribute from the structual point of view. These measures could indicate that how one class (service) is created and how the instances are working together to address their design goal. Therefore, they cannot show that how a class (service) is coherent in conceptual point of view. In other words, what is the level of service concentration on a single business functionality can not derived based on the previous proposed metrics. It is cleare that measuring service cohesion in earliy stages of service based software development cycle reduces cost greatly. In addition, whenever a service implements one domain concept it could be easily reused and maintanied. In this paper, we propose a metric that measures the conceptual cohesion using the semantics hidden in business processes. We have utilized an information retrival approach to uncover the required semantics.
The LSI technique uses the term co-occurrence to obtain relationship between terms. Two terms a and b are co-occurring if there is at least one document which contains both of them. We say that, in this case, a and b have a first order co-occurrence. Similarly, a second order co-occurrence path between two terms a and b is made with a term c such that a co-occurs with c and b co-occurs with c too. The number of unique terms c is the number of second order co-occurrence paths between a and b. Higher order co-occurrences are defined in a similar form. SVD algorithm considers all information about co-occurrence of terms.
As you can see we have EBPs in rows and BEs in columns of a sample CRUD matrix. The business capabilities as services are the clusters of this matrix. We had introduced this structure in SCC 2008 in the paper namely, “To Establish Enterprise Service Model from Enterprise Business Model”
As it has been shown in the Figure, initially the required semantics are obtained from business processes. These semantics include information about co-occurrence of actions and their types. Then, BE-EBP matrix 𝐴m×n is created, where m is the number of enterprise business entities and n is the number of enterprise business processes. Then, by adopting the introduced weighting model, each element of A takes a weight. This weight describes the importance degree of ith business entity in jth business process. We apply SVD on A to obtain conceptual relationship between business entities. The outputs of this phase are three matrices consolidated as 𝐴=𝑇𝑆𝐷𝑇. The matrix 𝐵𝐵𝑅=𝑇2S2T2S2Tdescribes the conceptual relationship between business entities which must be used to measure the degree of service cohesion.To form the BE-EBP matrix 𝐴m×n , the weighting model mentioned earlier should be followed in order to fill the elements of the matrix. We consider both functional and sequential relationship between service operations. For the functional aspect one should first obtain the number of times that business process j access business entity i. The type of the action which is applied on the business entity is also important to weight the elements of matrix A. The sequential relationship of business entities is also taken into account, as discussed in previous chapter. Finally, by applying the SVD algorithm the output is consisted of three different matrices T, S and D where 𝐴=𝑇𝑆𝐷𝑇. As it has been shown in Figure 4, initially the required semantics are obtained from business processes. These semantics include information about co-occurrence of actions and their types. Then, BE-EBP matrix𝐴_(m×n) is created, where m is thenumber of enterprise business entities and n is the number of enterprise business processes. Then, by adopting the introduced weighting model, each element of A takes a weight. This weight describes the importance degree of ith business entity in jth business process. We apply SVD on A to obtain conceptual relationship between business entities. The outputs of this phase are three matrices consolidated as𝐴=𝑇𝑆𝐷^𝑇. The matrix 𝐵𝐵𝑅=𝑇_2S_2 (T_2S_2 )^Tdescribes the conceptual relationship between business entities which must be used to measure the degree of service cohesion.To form the BE-EBP matrix〖 𝐴〗_(m×n) , the weighting model mentioned earlier should be followed in order to fill the elements of the matrix. We consider both functional and sequential relationship between service operations. For the functional aspect one should first obtain the number of times that business process j access business entity i. The type of the action which is applied on the business entity is also important to weight the elements of matrix A. The sequential relationship of business entities is also taken into account, as discussed in previous chapter. Finally, by applying the SVD algorithm the output is consisted of three different matrices T, S and D where 𝐴=𝑇𝑆𝐷^𝑇.
A value is then assigned to each edge in set E that shows the degree of relationship between business entities that are represented as graph G nodes. This degree of relationship could be obtained from the BBR matrix. The conceptual relationship between two operations i and j is calculated as follows:
As you can see we have EBPs in rows and BEs in columns of a sample CRUD matrix. The business capabilities as services are the clusters of this matrix. We had introduced this structure in SCC 2008 in the paper namely, “To Establish Enterprise Service Model from Enterprise Business Model”
At this time, the BE-EBP matrix could be formed using the method described. The rows of this matrix represent business entities and the columns are elementary business processes. This matrix is shown in the Figure where its elements are filled using the weighting model. It is worth pointing out that the sequence flow between the actions of each EBP is a normal flow. In other words, the actions of CRUD, each of which are equivalent to an activity in business processes, are run sequentially (have a normal sequential flow). In this paper, for the sake of simplicity, we have considered the weight of 1 for normal sequence flow.
Once the BE-EBP matrix is formed, the SVD algorithm could be applied. In order to do this we implement the measuring process in Matlab version 7.6.0.324 software. The BE-BE matrix is then constructed using the formula 𝐵𝐵𝑅=𝑇2S2T2S2T. The resulting matrix is shown in the Figure. This matrix is normalized and its negative values are replaced by zero.Once the BE-EBP matrix is formed, the SVD algorithm could be applied. In order to do this we implement the measuring process in Matlab version 7.6.0.324 software. The BE-BE matrix is then constructed using the formula𝐵𝐵𝑅=𝑇_2 S_2 (T_2 S_2 )^T. The resulting matrix is shown in Figure 9. This matrix is normalized and its negative values are replaced by zero.
There are different methods for metric theoretical validation. Some of them have subjective nature whereas others have the basis of axiomatic or calculation theory. Among them, the property-based software engineering measurement framework [25] is widely used; hence, we make use of it to validate the introduced SCD metric. Non-negativity and Normalization is satisfied since the metric can only take values between 0 and 1.Null Value is satisfied since the metric SCD is 0 when the number of relationships between the business entities that are used by the operations of a service is 0.Monotonicity is satisfied because adding another related BE to a pair of EBP does not decrease the overall cohesion. In other words the overall cohesion is not decreased by adding a related BE to a set of BEs that are accessed by a specific pair of operations.Cohesive Modules is satisfied by joining together two unrelated service interface the resulting cohesion would not be bigger than the maximum of original relations. In other words, the degree of cohesion between the operations of two unrelated services is not greater than the cohesion of each of them, because their operations access unrelated business entities.
In both G1 and G2 business entities Customer and Credit are processedThe business entity Account Receivable Note is only related to Credit and Customer through EBP2G1 and G2 process the following entities separately: Account Receivable Note by G1 and Order by G2the business entity Order is related to business entities Credit and Customer three times through EBPs 3, 4 and 9