3
Research on The Method of Concurrency Control in Collaborative Design Base on Tentative Hold Protocol Haolu Hou School of Automation and Information Engineering Xi’an University of Technology Xi’an 710048, China e-mail: [email protected] Yinzhao Lin, Zuomin Luo School of Computer Science and Engineering Xi’an University of Technology Xi’an 710048, China e-mail: [email protected], [email protected] Abstract—To solve the problem that collaborative design concurrency control cannot adopt optimistic locking mechanism or traditional pessimistic locking mode, THP(Tentative Hold Protocol) is introduced into collaborative design concurrency control method on the basis of studying on it and its transaction model. And then, a conflict prevention method is proposed based on THP. The method avoids deadlock and ensures operational priority for customers with higher privilege through object resource request, resource book, operation broadcast and real-time perception. Finally, closed single-stage worm drive is set as an example to illustrate the validity of this method. Keywords-Tentative Hold Protocol; Transaction Model; Collaborative Design; Concurrency Control; Conflict Prevention I. INTRODUCTION Concurrency control is one of the key technologies of collaborative design system, and the design and selection of an efficient and practical method for concurrency control is essential for a collaborative design system. Traditional concurrency control methods can be divided into "pessimistic" and "optimistic" methods. Using a concurrent conflict prevention method, its main technology is the blockade, that is to say that the user can only have a synergistic resource of a shared object access at the same time, so as to achieve the effect of preventing the conflict. However, taking into account the real-time performance, optimistic lock mechanism law cannot be adopted, because the premise of this approach is to assume that it’s less likely to produce different transaction conflict, which is clearly inappropriate in the collaborative design system. In addition, pessimistic locking traditional way should not also be applied, because in the pessimistic locking, when the highly privileged user A needs to access an object resource, which has been locked by a lowly privilege user B, the user A can lock the object resources only after user B’s operation is completed. This wastes most of the time and reduces the efficiency of collaborative design, as well as causes a deadlock to make collaborative design process unable to proceed with next step[1-6]. To solve these problems, this paper introduces THP into collaborative design and control methods and proposes a concurrency conflict prevention method, on the basis of studying demand of collaborative design to concurrency control and on the basis of THP and its transaction model. II. THP MODEL THP protocol is the abbreviation of Tentative Hold Protocol, which is created by W3C(World Wide Web Consortium) [7] .THP transaction model allows transaction participants to preset or consume transaction resource required through a tentative, non-blocking manner . THP’s idea is an appointment. THP transaction model has been changed in terms of resources lock, which has been shifted from traditionally fully lock mode to a shared lock mode, thus further easing the isolation requirements between transactions and improving the use of resources efficiency. All resources coordinators are located at both ends of the customer and resource owners, and THP is responsible for protocol communication between the two sides. After scheduled resource and reservation is successful, commercial matters are launched. THP transaction model is mainly composed of the client coordinator, coordinator of resource side, the rules engine several components, as shown in the figure 1 [8,9].THP consumption of resources, cancellation of Figure 1. Tentative Hold Protocol Overview. preset resources and acquisition of the current status, etc. are completed by the client coordinator. Resource owners, as plenipotentiary resources, decide whether to accept scheduled / consumer requests of the client resource coordinator. Rules engine is a resource to provide policy support, and resource providers can freely define the predetermined policy of resources and the corresponding business logic through the rules engine. 2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA) 849 978-1-4799-2716-6/13/$31.00 ©2013 IEEE

[IEEE 2013 2nd International Symposium on Instrumentation & Measurement, Sensor Network and Automation (IMSNA) - Toronto, ON, Canada (2013.12.23-2013.12.24)] 2013 2nd International

  • Upload
    zuomin

  • View
    213

  • Download
    1

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 2nd International Symposium on Instrumentation & Measurement, Sensor Network and Automation (IMSNA) - Toronto, ON, Canada (2013.12.23-2013.12.24)] 2013 2nd International

Research on The Method of Concurrency Control in Collaborative Design Base on Tentative Hold Protocol

Haolu Hou School of Automation and Information Engineering

Xi’an University of Technology Xi’an 710048, China

e-mail: [email protected]

Yinzhao Lin, Zuomin Luo School of Computer Science and Engineering

Xi’an University of Technology Xi’an 710048, China

e-mail:[email protected], [email protected]

Abstract—To solve the problem that collaborative design concurrency control cannot adopt optimistic locking mechanism or traditional pessimistic locking mode, THP(Tentative Hold Protocol) is introduced into collaborative design concurrency control method on the basis of studying on it and its transaction model. And then, a conflict prevention method is proposed based on THP. The method avoids deadlock and ensures operational priority for customers with higher privilege through object resource request, resource book, operation broadcast and real-time perception. Finally, closed single-stage worm drive is set as an example to illustrate the validity of this method.

Keywords-Tentative Hold Protocol; Transaction Model; Collaborative Design; Concurrency Control; Conflict Prevention

I. INTRODUCTION

Concurrency control is one of the key technologies of collaborative design system, and the design and selection of an efficient and practical method for concurrency control is essential for a collaborative design system.

Traditional concurrency control methods can be divided into "pessimistic" and "optimistic" methods. Using a concurrent conflict prevention method, its main technology is the blockade, that is to say that the user can only have a synergistic resource of a shared object access at the same time, so as to achieve the effect of preventing the conflict. However, taking into account the real-time performance, optimistic lock mechanism law cannot be adopted, because the premise of this approach is to assume that it’s less likely to produce different transaction conflict, which is clearly inappropriate in the collaborative design system. In addition, pessimistic locking traditional way should not also be applied, because in the pessimistic locking, when the highly privileged user A needs to access an object resource, which has been locked by a lowly privilege user B, the user A can lock the object resources only after user B’s operation is completed. This wastes most of the time and reduces the efficiency of collaborative design, as well as causes a deadlock to make collaborative design process unable to proceed with next step[1-6].

To solve these problems, this paper introduces THP into collaborative design and control methods and proposes a concurrency conflict prevention method, on the basis of

studying demand of collaborative design to concurrency control and on the basis of THP and its transaction model.

II. THP MODEL

THP protocol is the abbreviation of Tentative Hold Protocol, which is created by W3C(World Wide Web Consortium)[7].THP transaction model allows transaction participants to preset or consume transaction resource required through a tentative, non-blocking manner . THP’s idea is an appointment. THP transaction model has been changed in terms of resources lock, which has been shifted from traditionally fully lock mode to a shared lock mode, thus further easing the isolation requirements between transactions and improving the use of resources efficiency. All resources coordinators are located at both ends of the customer and resource owners, and THP is responsible for protocol communication between the two sides. After scheduled resource and reservation is successful, commercial matters are launched. THP transaction model is mainly composed of the client coordinator, coordinator of resource side, the rules engine several components, as shown in the figure 1 [8,9].THP consumption of resources, cancellation of

Figure 1. Tentative Hold Protocol Overview.

preset resources and acquisition of the current status, etc. are completed by the client coordinator. Resource owners, as plenipotentiary resources, decide whether to accept scheduled / consumer requests of the client resource coordinator. Rules engine is a resource to provide policy support, and resource providers can freely define the predetermined policy of resources and the corresponding business logic through the rules engine.

2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)

849978-1-4799-2716-6/13/$31.00 ©2013 IEEE

Page 2: [IEEE 2013 2nd International Symposium on Instrumentation & Measurement, Sensor Network and Automation (IMSNA) - Toronto, ON, Canada (2013.12.23-2013.12.24)] 2013 2nd International

III. CONCURRENCY CONTROL METHOD BASED ON THP

A. Concurrency Control Architecture Based on THP Figure 2 shows the concurrency control architecture

based on THP. In Figure 2, when granting the object resources the authorization right, the rules engine module will provide a valid license. Thus, the license for each of the target resource will have a valid time range. If some unpredictable factors are not completed, the object resources will be automatically released to other sites in order to enable other users to lock, thus preventing from deadlock situation.

Figure 2. Concurrency Control Architecture Based on THP.

Usage of each object resource is monitored by rules engine module on the real-time basis, when a locked state of the object resource changes, other collaborative users will be informed. Therefore, the users can perceive collaborative design process of other users on the real-time basis. Server is liable t manage the shared object resources and save the latest version of design results. The clients broadcast their respective operations. When each operation is consistent with each collaborative site, the version updating will be carried out by the server. When a collaborative operation is required to be broadcasted to other sites, the object resources of the operation shall be locked. When a site needs to request an object resource, the site will firstly send the request to the client coordinator via client application and the client coordinator will send request message to the server resource coordinator. When the server resource coordinator receives this request, it will transfer the request message into the rules engine module for query to see whether to authorize the object resource to the site. After query, the server resource coordinator will send a message back to indicate the authorization information. If the role of low-priority users does not agree with the role of high-priority users in one step, the two sides can reach an agreement through negotiation.

B. Collaborative Design Resource Application Process Based on THP

Collaborative users of two sites operate on the same object resource, and the resource request for the object is shown in Figure 3[8,10].

Figure 3 depicts the two collaborative users A and B while operating on an object. The user role permissions of site A is lower than that of site B. Site A firstly requests the

object resources to the server, followed by site B. See below for details:

Figure 3. Sequence diagram of apply resources.

Step 1: Client application of site A firstly creates a request of the object in client coordinator and then applies the object resources via the request.

Step 2: Client coordinator of site A sends the request message to the server and the object resource coordinator requests the resource.

Step 3: When the server resource coordinator for the request message is received, the resource coordinator will firstly deal with the request message in the rule engine module, and then return the information about application success or failure to the client coordinator. The rules engine module:

1) Check whether the request is successful (by querying the server object resource table).

2) If the request is successfully applied, the client sends a notification message to the coordinator of the other collaborative sites and adds a time when the request is valid. Then the rules engine module will add a trigger on the resource control. If other permissions are higher than that of site A and are applying for this object resource that site A has successfully applied for, the trigger will send the information about locking of the object resources to the site A via resources coordinator after the user with high privilege obtains the object.

Step 4: Client coordinator of the site A, after receiving server resource coordinator’s information, will notify the client application of the requests situation (success or failure), and the expiration time of the request and other relevant information.

Step 5: If site B applies for the same object resources, repeat steps 1-4. Because the user role permission of site B is higher than that of site A, the target resource is authorized to site B’s collaborative users.

Step 6: As rules engine control module trigger realizes this change, it will notify the resource coordinator of releasing of the target resource locking.

2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)

850

Page 3: [IEEE 2013 2nd International Symposium on Instrumentation & Measurement, Sensor Network and Automation (IMSNA) - Toronto, ON, Canada (2013.12.23-2013.12.24)] 2013 2nd International

Step 7: Resource coordinator sent object resource release message to site A.

Step 8: After site A’s client coordinator receives resource release message, it postpones the request to the target resource. Upon completion of the operation of site B, resource coordinator will send the locking release of the object resources to other collaborative site.

If the object resource applied by site A and site B has been locked and both site A and site B have lower permission than other site, the resource coordinator will return the information that the resources have been locked. When the two sites’ coordinators receive this message, they will return it back to the client application and notify the user and postpone the target resource request.

IV. CONCLUSIONS

Worm drive requires collaboration of strength design engineers, design engineers tribolog, structural design engineer and other multi-disciplinary experts . Application of concurrency conflict prevention method based on THP to the collaborative design platform we established[11] can achieve good results in terms of a single-stage closed worm drive collaborative design, and ensure the consistency of shared data, while ensuring the timely response of the network server and improving the efficiency of the staff. Concurrency conflict prevention method based on THP solves some problems of traditional concurrency conflicts:

1) Completely shift from the traditionally fully lock mode to a shared lock mode, thus further easing the transaction between the isolation requirements and improving the efficiency of resource use.

2) As each object resource has limited authorization period, after the effective time lapses, the user will be forced to release the lock on the object resources for use of other collaborative users, thus preventing from deadlock.

3) Rules engine module notify the collaborative user on the real-time basis of other users locking the object resource, minimizing the time wasted, resources and network bandwidth due to application of multiple sites for the same object resource at the same time, system and improving collaborative design efficiency.

4) The operation of each collaborative user will not be submitted to the server for updating, but sent to other sites to see whether to conflict with other cooperative users. In case of a conflict, such parties can reach agreement through

negotiation. In case of no conflict, the operation will be submitted to the server for latest version updating, thus better keeping data consistency and intention of operators and avoiding the frequent change of file version in the server.

ACKNOWLEDGMENTS

The paper is supported by Natural Science Basic Research Plan in Shaanxi Province of China ( Program No. 2012JM8047 ) and the Scientific and Technological Bureau Innovate Plan of Xian city ( Program No. CX1262 ,CXY1339(4), CXY1341(2) ).

REFERENCES

[1] S. Greenberg, D. Marwood. Real-time groupware as a distributed system:Concurrency control and its effect on the interface[J]. Proceedings of ACM Conference on Computer Supported Cooperative Work, Chapel Hill,USA,1994:207-217.

[2] R. Bidarra, D. B. E. Van, W. F. Bronsvoort. Interactive facilities for collaborative feature modeling on the web[C]. Proceedings of the Tenth Portuguese Conference on Computer Graphics. Lisbon, Portugal Oversea Publishing House. 2001:43-52.

[3] C. A. Ellis, S. J. Gibbs, G. L. Rein. Groupware some issues and experiences[J].Communications of the ACM, 1991,34(1):38-58.

[4] TONG En-dong,NIU Wen-jia,TAN Hong-yan,ZHAO Zhi-jun,and TANG Hui. Service Building and Concurrency Control in Wireless Sensor Network[J]. Journal of University of Electronic Science and Technology of China, 2011,40(3):188-191.

[5] LI Xiu-hua,XIE Qiang,DING Qiu-lin. Concurrent Control Method Based on Subdivision Lock in Ontology Construction [J].Computer Engineering,2011,37(13):68-71.

[6] Xia Jia-li,Han Zeng-bo,Chen Hui.Conflict-free Concurrency Control Protocol Based on Function Alternative Model [J].Computer Engineering,2010(15):22-27.

[7] J. Roberts and K. Srinivasan.Tentative Hold Protocol Part 1: White Paper[EB/OL].(2001-11-28).http://www.w3.org/TR/tenthold-1.

[8] J. Roberts, T. Collier, P. Malu, K. Srinivasan. Tentative hold protocol part 2: Technical specification[EB/OL].(2001-11-28). http://www.w3.org/TR/tenthold-2.

[9] Xu Wei, Cheng Wen-qing, Li Bing. taTHP: an Improved Transaction Model Based on THP [J]. Mini-Micro Systems,2007,28(1):97-101.

[10] Yuan Min,Huang Zhi-Qiu,Hu Jun. Modeling and Verification of Cross-Organizational Multi-Business Transaction [J]. Journal of Software. 2012, 23(3):517-538.

[11] Luo Zuomin, Gao Junfeng, Zhang Jing, Yang Biao. Integrated Conflict Resolution for Collaborative Design based on Grid Services[J] Mechanical Science and Technology for Aerospace Engineering,2010,29(4):493-497.

2013 2nd International Symposium on Instrumentation and Measurement, Sensor Network and Automation (IMSNA)

851