Top Banner
Lero© 2011 Welcome QSIC 2011 Madrid, Spain July 13 - 14, 2011 An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion Pooyan Jamshidi Lero - The Irish Software Engineering Research Centre, School of Computing, Dublin City University http://www.computing.dcu.ie/~pjamshidi/ [email protected] Ali Kazemi, Ali Rostampour, Amin Zamiri, Pooyan Jamshidi, Hassan Haghighi, Fereidoon Shams Automated Software Engineering Research Group
46

An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Jan 12, 2015

Download

Technology

Pooyan Jamshidi

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

WelcomeQSIC 2011Madrid, Spain

July 13 - 14, 2011

An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Pooyan JamshidiLero - The Irish Software Engineering Research Centre,

School of Computing, Dublin City University http://www.computing.dcu.ie/~pjamshidi/

[email protected]

Ali Kazemi, Ali Rostampour, Amin Zamiri, Pooyan Jamshidi, Hassan Haghighi, Fereidoon Shams

Automated Software Engineering Research Group

Page 2: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 3: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Service-Oriented Computing

[Mikhail Perepletchikov, PhD Thesis]

Page 4: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Motivation

[Mikhail Perepletchikov, PhD Thesis]

Can be used to predict/control maintainability and reliability

Page 5: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

MotivationCan support service identification, specification, and composition

[Mikhail Perepletchikov, PhD Thesis]

Page 6: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Example SO design including different relationship types

Page 7: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

COINCIDENTAL COHESION

[Mikhail Perepletchikov, PhD Thesis]

Page 8: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

LOGICAL, TEMPORAL, COMMUNICATIONAL COHESION

Page 9: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

External Cohesion

[Mikhail Perepletchikov, PhD Thesis]

Page 10: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

IMPLEMENTATION COHESION

[Mikhail Perepletchikov, PhD Thesis]

Page 11: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

SEQUENTIAL COHESION

[Mikhail Perepletchikov, PhD Thesis]

Page 12: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Conceptual Cohesion

[Mikhail Perepletchikov, PhD Thesis]

Page 13: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Service Cohesion

• What is service cohesion?– The strength of relationship between operations in a

service.

Page 14: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 15: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 16: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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 ?

Page 17: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 18: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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.

Page 19: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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: represents the term-term relationship

Page 20: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 21: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATION

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).

The CRUD Matrix for Sales Department Scenario

Page 22: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 23: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 24: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Applicability of LSI in Measuring Cohesion

The target weighting model must completely reflects these priorities

Action Create Update Delete Read

Create 1      

Update 2 3    

Delete 3 4 5  

Read 4 5 6 7

Page 25: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 26: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 27: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 28: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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 Flow elements category weight

Sequence Flow Normal 1 4

Parallel Gateway 2 3

Inclusive Gateway, Complex Gateway 3 2

Exclusive gateway, Event-Based Gateway 4 1

Page 29: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

The Proposed Method for Measuring Conceptual Cohesion of Services

Page 30: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

The proposed metric

• To formulize our metric we use a graph-based approach

• Consider service S with a set of operations

• Each operation Oj of service S accesses a set of business entities that are shown as

• For each pair of operations Oi and Oj in service S a complete graph G= (V, E) is formed such that

Page 31: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

The proposed metric

• The conceptual relationship between two operations i and j is calculated as follows:

Where:• p and q are the identifying number for their corresponding business

entities.

• is the degree of relationship between business entities BEp and BEq.

• is the cardinality of set V• The denominator of the fraction in this formula is the number of edges of

complete graph G

Page 32: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

The proposed metric

• The degree of cohesion of a service is consequentially defined as the degree of relationship between its operations as follows

where, m is the number of operations in service S

Page 33: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

The proposed metric

Page 34: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATIONThe CRUD Matrix for Sales Department Scenario

Page 35: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATIONThe BE-EBP Matrix

Page 36: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATIONThe BE-BE Matrix after decomposition and normalization

Page 37: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATION

• This service has four operations: Add Customer, Add an Account receivable note, Check Credit and Receive Order

Page 38: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

EVALUATION

• Business Entities Graph for Service O1 and O2

Oi, Oj

Metric

O1, O2 O1, O3 O1, O4 O2, O3 O2, O4 O3, O4

ORD 0.50 0.46 0.46 0.38 0.38 0.46Service

Proposed Cohesion Metric Value (SCD)

S1 0.4400S2 1.0000S3 0.1300S4 0.1800

Page 39: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 40: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Discussion

• Consider Service 1 ( Blue Cluster)

Operations

Page 41: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 42: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Discussion

G1={Add customer, Add Account Receivable Note }

G2={Add customer, Check credit }

Page 43: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 44: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

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

Page 45: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Our Publications on Software Measurement

1. 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]

2. A. Khoshkbarforoushha, P. Jamshidi, M. Fahmideh, F. Shams, A Metric for BPEL Process Reusability Analysis, Journal of Information and Software Technology, Second Revision Submitted

3. A. Kazemi, A. Rostampour, P. Jamshidi, E. Nazemi, F. Shams, A. Nasirzadeh Azizkandi, A Genetic Algorithm Based Approach to Service Identification, IEEE World Congress on Service Computing (SERVICES'11), Washington DC, USA, July 4-9, 2011.

4. A. Kazemi, A. Nasirzadeh Azizkandi, 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.

5. A. Kazemi, A. Rostampour, F. Shams, P. Jamshidi, A. Nasirzadeh Azizkandi, Measuring Service Cohesion Using Latent Semantic Indexing, The 6th International Conference on Internet and Web Applications and Services (ICIW'11), 2011.

6. A. Rostampour, A. Kazemi, F. Shams, P. Jamshidi, A. Nasirzadeh Azizkandi, Measures of Structural Complexity and Service Autonomy, IEEE The 13th International Conference on Advanced Communication Technology (ICACT'11), 2011. [ PDF]

7. 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]

8. 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]

9. 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]

10. 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]

Page 46: An Information Retrieval Based Approach for Measuring Service Conceptual Cohesion

Lero© 2011

Thanks For your Attention!Please ask your questions now or send them in the following email address:

[email protected]