Summary of the invention
Based on this, be necessary to provide a kind of PaaS cooperative system based on semantic association that can improve the co-development work efficiency.
A kind of PaaS cooperative system based on semantic association, comprise engine layers, service layer, key-course and resource layer, described engine layers receives and resolves the Soap request, described server layer triggers corresponding Web service according to the Soap request that receives, described key-course is resolved and is safeguarded semantic association and based on semantic association a plurality of developers' distributed asynchronous operation is carried out coordinated management, the PaaS Synergistic method that calls based on semantic association carries out resource subscription and notice, control developer's access rights simultaneously, described resource layer carry out based on the virtual resource of developer's space view safeguard and virtual resource to the mapping of physical resource.
Preferably, described engine layers comprises the Soap engine modules that is used to receive and resolve the Soap request.
Preferably, described service layer comprises service pool, comprises the Web service that is used to handle developer's code update and deployment in the described service pool.
Preferably, described key-course comprises operation control, related controller and drm controller, described operation control is used to handle developer's operational order, described related controller is used for resolving and safeguarding semantic association, detect resource updates, and the PaaS Synergistic method that calls based on semanteme carries out resource subscription and notice, the operation between the coordinated development personnel, and described drm controller is used to control developer's access rights.
Further preferred, described operation control comprises the resource deployment module of the resource management module of the resource operation instruction of shining upon the developer, the resource debugging module of finishing resource testing and function uniting and adjustment and supporting item issue.
Further preferred, described related controller comprises semantic association administration module and semantic association monitoring module, described semantic association administration module be used to resolve and maintenance resources between semantic association, structure and upgrading semantic association example, described semantic association monitoring module is used to detect resource updates, and the PaaS Synergistic method that described semantic association administration module and semantic association monitoring module call based on semantic association carries out resource subscription and notice.
Further preferred, described semantic association administration module defines the dependence structure and the upgrading semantic association example of resource according to the developer, described dependence is a unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of being constructed comprises all association tuple, each association tuple is defined as<x, y, R
X → y, wherein, x, y represent resource, R
X → yExpression x is to the semantic association R of y, and described semantic association is a unidirectional relationship, comprises that code revision semantic association, interface upgrade semantic association and module is disposed semantic association.
Preferably, described semantic association monitoring module is further used at described semantic association administration module structure or upgrades when finishing the semantic association example, call based on the resource subscription method of semantic association and carry out resource subscription, specifically: all association tuple in the traversal semantic association example, take out one of them association tuple Q:<x, y, R
X → y; judge whether R equals the code revision semantic association; if x is added to related subscription of code revision of y and concentrates, otherwise judge further whether R equals interface and upgrade semantic association; if; the interface that then x is added to y upgrades related the subscription to be concentrated, otherwise judges further whether R equals module and dispose semantic association, if; then x is added to related subscription of module deployment of y and concentrate, processed intact up to all association tuple.Wherein, code revision is related subscribes to set representations all has carried out the related resource of subscribing to of code revision to resource p; Interface upgrades related subscription set representations, and all have carried out the related resource of subscribing to of interface renewal to resource p; Module is disposed related subscription set representations, and all have carried out the related resource of subscribing to of module deployment to p.
Preferably, when described semantic association monitoring module is further used for detecting resource updates, call based on the resource notification method of semantic association and carry out resource notification, specifically: generate the resource updates operation set according to the resource updates operation that receives, take out the resource and the semantic association thereof of described resource updates operation set, judge that whether described semantic association is that the related collection of subscribing to of code revision of code revision semantic association and described resource is for empty, if, run time version is revised related notice, otherwise judge that further whether described semantic association is that the interface that interface upgrades semantic association and described resource upgrades the related collection of subscribing to for empty, if, then executive's interface upgrades related notice, otherwise judge that further whether described semantic association is that the module that module is disposed semantic association and described resource is disposed the related collection of subscribing to for empty, if, then execution module is disposed related notice, otherwise judge further whether the resource updates operation set exists untreated resource, if, then continue to take out the resource and the semantic association thereof of resource updates operation set and judge, otherwise finish.
Preferably, described drm controller comprises developer's login identity is discerned the number of the account administration module of checking and control developer's the safe access control module of access rights.
Preferably, described resource layer comprises explorer, described explorer comprises user's space administration module, virtual resource administration module and physical resource management module, described user's space administration module is used to safeguard developer's user's space view, described virtual resource administration module is used to safeguard the virtual resource view, and described physical resource management module is used to realize that virtual resource deposits strategy to the mapping of physical resource and the node of physical resource.
Further preferred, described physical resource management module comprises centralized control submodule and node control submodule; Described centralized control submodule adopts the Mapreduce parallel method to carry out mapping and the search location of virtual resource to physical resource, described virtual resource adopts the unique design of storage to the association migration to the mapping of physical resource, and the resource that has semantic association is left on the node of physical distance less than threshold value; Described node control submodule is stored in physical resource on a plurality of nodes of the inner distributed file system of cluster.
In addition, also be necessary to provide a kind of PaaS Synergistic method based on semantic association that can improve the co-development work efficiency.
A kind of PaaS Synergistic method based on semantic association, described method is applied in the key-course of described PaaS cooperative system based on semantic association, comprise: when key-course structure or upgrading finish the semantic association example, call based on the resource subscription method of semantic association and carry out resource subscription; When key-course detects resource updates, call based on the resource notification method of semantic association and carry out resource notification.
Preferably, resource subscription method and the resource notification method called based on semantic association also comprise before: the dependence structure and the upgrading semantic association example that define resource according to the developer, described dependence is a unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of being constructed comprises all association tuple, each association tuple is defined as<x, y, R
X → y, wherein, x, y represent resource, R
X → yExpression x is to the semantic association R of y, and described semantic association is a unidirectional relationship, comprises that code revision relies on semantic association, interface upgrades semantic association and module is disposed semantic association.
Further preferred, described resource subscription method based on semantic association may further comprise the steps:
A1. travel through all association tuple in the semantic association example, take out one of them association tuple Q:<x, y, R
X → y;
A2. judge whether R equals the code revision semantic association, if then x is added to related subscription of code revision of y and concentrate, execution in step A5 then, otherwise carry out steps A 3, wherein, all have carried out the related resource of subscribing to of code revision to p the related subscription of code revision set representations;
A3. judge whether R equals interface and upgrade semantic association, if the interface that then x is added to y upgrades related the subscription and concentrates, execution in step A5 then, otherwise carry out steps A 4, wherein, interface upgrades related subscription set representations, and all have carried out the related resource of subscribing to of interface renewal to p;
A4. judge whether R equals module and dispose semantic association, if then x is added to related subscription of module deployment of y and concentrate, execution in step A5 then, otherwise carry out steps A 5, wherein, module is disposed related subscription set representations, and all have carried out the related resource of subscribing to of module deployment to p;
A5. judge whether current resource exists untreated semantic association, if then carry out steps A 1, otherwise finish.
Preferably, described resource notification method based on semantic association may further comprise the steps:
B1. generate the resource updates operation set according to received resource updates operation;
B2. take out the resource and the semantic association thereof of resource updates operation set;
B3. judge that whether described semantic association is that the related collection of subscribing to of code revision of code revision semantic association and described resource is for empty, if then run time version is revised related notice, and changes step B6 over to, otherwise carries out step B4;
B4. judge that whether described semantic association is that the interface that interface upgrades semantic association and described resource upgrades the related collection of subscribing to for empty, if then executive's interface upgrades related notice, and changes step B6 over to, otherwise carries out step B5;
B5. judge that whether described semantic association is that the module that module is disposed semantic association and described resource is disposed the related collection of subscribing to for empty, if then execution module is disposed related notice, otherwise carries out step B6;
B6. judge whether the resource updates operation set exists untreated resource, if then carry out B2, otherwise finish.
Above-mentioned PaaS cooperative system based on semantic association comprises engine layers, service layer, key-course and resource layer, can resolve and safeguard the multiple semantic association that a plurality of developer's collaborative works is had central role at key-course, and many developers' disparate modules and the multiple semantic association between the code analyzed, handle, and by the PaaS Synergistic method based on semantic association carries out the subscription of resource and notice has dependence accordingly when the code update of semantic association developer; Carry out carrying out the mapping of virtual resource at resource layer to physical resource based on the design that the virtual resource of developer's space view is safeguarded and the employing storage is moved to association.Have related development module thereby help the co-development personnel better to coordinate each intelligently, fundamentally improved the efficient and the quality of co-development work.
Embodiment
PaaS cooperative system based on semantic association provided by the invention can be divided into client and server two parts from developer's angle.The developer (is command terminal or visual user interface (Graphic User Interface by client, GUI)) login and access system, and, write item code then with its maintenance of mode according to the selected engineering project of bulleted list that system lists.Client regularly sends this developer's renewal operation (record) to server, server then will be realized the timely notice of resource updates, makes the coordination in the whole project maintenance association.
As shown in Figure 1, a kind of PaaS cooperative system based on semantic association, comprise engine layers, server, key-course and resource layer, described engine layers is used for receiving and resolving Soap (Simple Object AccessProtocol, Simple Object Access Protocol) request, described service layer triggers corresponding Web service according to the Soap request that receives, described key-course is resolved and is safeguarded semantic association and based on semantic association a plurality of developers' distributed asynchronous operation is carried out coordinated management, call the subscription and the notice of carrying out resource based on the PaaS Synergistic method of semantic association, control developer's access rights simultaneously, described resource layer carry out based on the virtual resource of developer's space view safeguard and virtual resource to the mapping of physical resource.
As shown in Figure 1, engine layers comprises the Soap engine modules that is used to receive and resolve the Soap request, this Soap engine modules comprises Soap request monitoring module, Soap request analysis module and multi-user conversation administration module (not shown), wherein, the Soap request monitoring module receives the Soap request that the user sends, and the Soap that transmits layer system generation down responds, Soap request analysis module is used for resolving the Soap request, and the Soap that the multi-user conversation administration module utilizes multi-thread mechanism to handle a large number of users asks and keep the connection of each user conversation.
Service layer has safeguarded a service pool, comprises the Web service that is used to handle developer's code update and deployment operation in a large number in the service pool.Each Web service is by WSDL (Web Service DescriptionLanguage, a kind ofly be used for describing the XML language how Web service and explanation communicate by letter with Web service) define and describe, and follow WSRF (Web Service Resource Framework, Web service resource framework) standard.
Key-course comprises operation control, related controller and drm controller, wherein:
Operation control is used to handle developer's operational order, comprise resource management module, resource debugging module and resource deployment module, wherein, resource management module is used to shine upon developer's resource operation instruction, comprises interpolation, deletion and the modification etc. of resource; The resource debugging module is used to finish the test and the function uniting and adjustment of various resources, as the test of function, multimode combined debugging etc.; The resource deployment module is used for supporting item issue etc.
Related controller is used for resolving and safeguarding semantic association, detect resource updates, and the PaaS Synergistic method that calls based on semantic association carries out resource subscription and notice, the operation between the co-development personnel.It comprises semantic association administration module and semantic association monitoring module, wherein: the semantic association administration module be used to resolve and maintenance resources between semantic association, structure and upgrading semantic association example; The semantic association monitoring module is used to detect resource updates, and semantic association administration module and semantic association monitoring module also are used to call the subscription and the notice of carrying out resource based on the PaaS Synergistic method of semantic association.
Concrete, the semantic association administration module is according to the dependence between the resource of developer's appointment, and the generative semantics associated instance is also stored.Dependence is a unidirectional relationship, is divided into code revision dependence, interface renewal dependence and module and disposes dependence, and semantic association also is a unidirectional relationship, is divided into code revision semantic association, interface renewal semantic association and module deployment semantic association equally.The semantic association example of being constructed comprises all association tuple, and each association tuple is defined as<x, y, R
X → y, wherein, x, y represent resource, R
X → yExpression x establishes to the semantic association R of y
(x wherein, y represents two resources, " → " expression semantic association, R is a type of semantic association), then
(the related y of x code revision) is meant: resource x depends on any modification that the developer is done resource y;
(the x interface upgrades related y) is meant: resource x depends on the renewal that the developer does the interface of the function of resource y and intermodule;
(the x module is disposed related y) is meant: resource x depends on the complete module issue of resource y place module, and the issue of a complete module shows a more complete stage renewal, and each issue all is furnished with a version number to assist historical record.The semantic association case representation is a figure who is made up of resource node and related directed edge, and its building method is by traveling through each resource node, generates corresponding association tuple and is stored in the semantic database according to its dependence R to other resources.
The semantic association monitoring module is responsible for the monitoring of resource updates, and it has safeguarded two Class Queue: notification queue and renewal operation queue.Wherein notification queue leaves on each different physical node at resource place, and corresponding three notification queue of resource are respectively code revision notification queue, the formation of interface update notification and module and dispose notification queue; Upgrade operation queue and leave on each different physical node at resource place, corresponding one of a plurality of resources are upgraded operation queue.
In one embodiment, when the semantic association administration module of the related controller in key-course structure or upgrading finish the semantic association example, the semantic association monitoring module calls based on the resource subscription method of semantic association and carries out resource subscription, specifically: all association tuple in the traversal semantic association example, take out one of them association tuple Q:<x, y, R
X → y, promptly take out a record of semantic database, judge whether R equals the code revision semantic association, if, on the code revision notification queue of resource y, add object x,, otherwise judge further whether R equals interface and upgrade semantic association, if, in the interface update notification formation of resource y, add object x, otherwise judge further whether R equals module and dispose semantic association, if, dispose interpolation object x on the notification queue in the module of resource y, processed intact up to all association tuple.
In another embodiment, when the semantic association monitoring module is further used for detecting resource updates, call based on the resource notification method of semantic association and carry out resource notification, specifically: generate the resource updates operation set according to the resource updates operation that receives, promptly take out all objects that upgrade operation queue and generate the resource updates operation set, take out the resource p and the semantic association M thereof of described resource updates operation set then, judge whether M equals the code revision notification queue of code revision semantic association and p not for empty, if, all objects that then take out the code revision notification queue of p carry out the related notice of code revision, otherwise judge further whether M equals interface and upgrade the interface update notification formation of semantic association and p not for empty, if, all objects that then take out the interface update notification formation of p carry out interface and upgrade related notice, otherwise judge further whether M equals module and dispose the module deployment notification queue of semantic association and p for empty, if, all objects that then take out the module deployment notification queue of p carry out module and dispose related notice, otherwise judge further whether the resource updates operation set exists for the resource of processing, if, the resource p and the semantic association M thereof that then continue to take out the resource updates operation set judge, otherwise finish.
Drm controller is used to control developer's access rights, specifically comprise number of the account administration module and safe access control module, wherein, the number of the account administration module utilizes PKI mechanism, and (Public Key Infrastructure, PKI) user key that sends of client public key by checking server end storage and client comes developer's login identity is discerned checking.In addition, client is all encrypted all Soap requests that send, and the safe access control module of server end is handled after it is deciphered again, thereby guarantees the safe and secret transmission of message.The safe access control module stipulates that also all developers of same project have " read right " of each resource, but " write permission " of each resource only belongs to unique developer.
Resource layer has comprised explorer, this explorer provides unified virtual resource view (being single mirror image resources) to high-rise module, thereby convenient operation to distributed resource by distributed file system management bottom physical resource, is guaranteed resource storage and the reliability of using simultaneously.Resource layer also by " storage to association migration " thus strategy reduce communication-cost and improve collaborative work efficient, and periodically realize the check point record of data and resume work.
As shown in Figure 2, explorer comprises user's space administration module, virtual resource administration module and physical resource management module, wherein: the user's space administration module is used to safeguard developer's user's space view, the metadata information that mainly comprises user's space, for example the sign ID of user's space, total disk space size, free space size etc.; The virtual resource administration module is used to safeguard the virtual resource view, the view of user's virtual resource is done unified planning and processing, the metadata information that mainly comprises virtual resource, for example semantic association of the authority owner of the sign ID of virtual resource, virtual resource, virtual resource etc.; The physical resource management module is used to realize that virtual resource deposits strategy to the mapping of physical resource and the node of physical resource.
As shown in Figure 3, the physical resource management module mainly comprises centralized control submodule and node control submodule, wherein: the centralized control submodule adopts Mapreduce (a kind of programming model) parallel method to carry out mapping and the search location of virtual resource to physical resource, this mapping resources adopts the design of " storage is to the association migration ", the resource that has semantic association is left on the node of physical distance less than threshold value, thereby improve the efficiency of management of physical resource under distributed environment.Particularly, should leave in as far as possible on the same node based on the resource of code revision association, thereby avoid frequent Network Transmission expense; Based on interface upgrade semantic association and module dispose the resource of semantic association should leave on the same node or different nodes in the same frame on; Do not exist the module of any semantic association then to recommend to leave on the node of different frames.The node control submodule is stored in physical resource on a plurality of nodes of the inner distributed file system of cluster, to realize highly reliable resource memory module, promptly when any resource is damaged or lost, can recover by the copy that is stored on other nodes.
The present invention also provides a kind of PaaS Synergistic method based on semantic association, this method is applied in the key-course of above-mentioned PaaS cooperative system based on semantic association, comprise: when key-course structure or upgrading finish the semantic association example, call based on the resource subscription method of semantic association and carry out resource subscription; When key-course detects resource updates, call based on the resource notification method of semantic association and carry out resource notification.
Key-course in above-mentioned PaaS cooperative system based on semantic association, define the dependence structure and the upgrading semantic association example of resource according to the developer, described dependence is a unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of being constructed comprises all association tuple, comprises that code revision relies on semantic association, interface upgrades semantic association and module is disposed semantic association, and each association tuple is defined as<x, y, R
X → y, wherein, x, y represent resource, R
X → yExpression x is to the semantic association R of y.
In one embodiment, as shown in Figure 4, be specially based on the resource subscription procedure of semantic association:
Step S101, all association tuple in the traversal semantic association example are taken out one of them association tuple Q:<x, y, R
X → y.
Step S102 judges whether R equals the code revision semantic association, if, execution in step S103 then, otherwise enter step S104.
Step S103 adds x to related subscription of code revision of y and concentrates, and promptly adds object x on the code revision notification queue of resource y.
Step S104 judges whether R equals interface and upgrade semantic association, if, then enter step S105, otherwise execution in step S106.
Step S105 adds x to related subscription of interface renewal of y and concentrates, and promptly adds object x in the interface update notification formation of resource y.
Step S106 judges whether R equals module and dispose semantic association, if then enter step S107, otherwise enter step S108.
Step S107 adds x to the module of y and disposes the related collection of subscribing to, and promptly disposes in the module of resource y and adds object x on the notification queue.
Step S108 judges whether current resource exists untreated semantic association, if then return step S101, otherwise finish.
In another embodiment, as shown in Figure 5, as follows based on the resource notification method detailed process of semantic association:
Step S201 generates the resource updates operation set according to received resource updates operation, promptly takes out all objects that upgrade operation queue and generates the resource updates operation set.
Step S202 takes out the resource p and the semantic association M thereof of resource updates operation set.
Step S203, judge M whether be the related collection of subscribing to of code revision of code revision semantic association and p for empty, promptly judge code revision notification queue that whether M equal code revision semantic association and p for empty, if, then enter step S204, otherwise enter step S205.
Step S204, run time version revise related notice, and all objects that promptly take out the code revision notification queue of p carry out the related notice of code revision.
Step S205, judge that whether M is that the interface that interface upgrades semantic association and p upgrades the related collection of subscribing to for empty, judge promptly whether M equals interface update notification formation that interface upgrades semantic association and p for empty, if, then enter step S206, otherwise enter step S207.
Step S206, executive's interface upgrade related notice, and all objects that promptly take out the interface update notification formation of p carry out interface and upgrade related notice.
Step S207, judge that whether M is that the module that module is disposed semantic association and p is disposed the related collection of subscribing to for empty, judge promptly whether M equals module and dispose the module of semantic association and p and dispose notification queue for empty, if, execution in step S208 then, otherwise enter step S209.
Step S208, execution module dispose related notice, and all objects that the module of promptly taking out p is disposed related notification queue carry out module and dispose related notice.
Step S209 judges whether the resource updates operation set exists untreated resource, if then return step S202, otherwise finish.
Above-mentioned PaaS cooperative system based on semantic association comprises engine layers, service layer, key-course and resource layer, can resolve and safeguard the multiple semantic association that a plurality of developer's collaborative works is had central role at key-course, and many developers' disparate modules and the multiple semantic association between the code analyzed, handle, and by the PaaS Synergistic method based on semantic association carries out the subscription of resource and notice has dependence accordingly when the code update of semantic association developer; Carry out carrying out the mapping of virtual resource at resource layer to physical resource based on the design that the virtual resource of developer's space view is safeguarded and the employing storage is moved to association.Have related development module thereby help the co-development personnel better to coordinate each intelligently, fundamentally improved the efficient and the quality of co-development work.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.