Summary of the invention
Based on this, be necessary to provide a kind of PaaS cooperative system that can improve the semantic-based association of co-development work efficiency.
A kind of PaaS cooperative system of semantic-based 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 that the related distributed asynchronous operation to a plurality of developers of semantic association and semantic-based carries out coordinated management, the PaaS Synergistic method that calls the semantic-based association carries out resource subscription and notice, control simultaneously developer's access rights, 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 for the Soap engine modules that receives and resolve the Soap request.
Preferably, described service layer comprises service pool, comprises the Web service for the treatment of 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 for the treatment of 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 semantic-based carries out resource subscription and notice, the operation between the coordinated development personnel, and described drm controller is used for 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 is used for the semantic association between parsing and the maintenance resources, structure and upgrading semantic association example, described semantic association monitoring module is for detection of resource updates, and described semantic association administration module calls the related PaaS Synergistic method of semantic-based with the semantic association monitoring module and carries out resource subscription and notice.
Further preferred, described semantic association administration module defines dependence structure and the upgrading semantic association example of resource according to the developer, described dependence is unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of constructing 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 unidirectional relationship, comprises code revision semantic association, the association of interface update semantics and module deployment semantic association.
Preferably, described semantic association monitoring module is further used for when described semantic association administration module is constructed or upgraded complete semantic association example, call the resource subscription method of semantic-based 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 concentrate, otherwise it is related to judge further whether R equals the interface update semantics; 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, until all association tuple are processed complete.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 the resource notification method of semantic-based association and carry out resource notification, specifically: generate the resource updates operation set according to the resource updates operation that receives, take out 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 further whether described semantic association is that interface update semantics interface related and described resource upgrades the related collection of subscribing to not 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 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 identified the account management 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 for Maintenance Development personnel's user's space view, described virtual resource administration module is used for safeguarding the virtual resource view, and described physical resource management module is used for the realization virtual resource and 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 virtual resource to the mapping of physical resource and search location, described virtual resource adopts storage to the unique design of 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 that can improve the semantic-based association of co-development work efficiency.
A kind of PaaS Synergistic method of semantic-based association, described method is applied in the key-course of PaaS cooperative system of described semantic-based association, comprise: when key-course is constructed or upgraded complete semantic association example, call the resource subscription method of semantic-based association and carry out resource subscription; When key-course detects resource updates, call the resource notification method of semantic-based association and carry out resource notification.
Preferably, resource subscription method and the resource notification method of calling the semantic-based association also comprise before: the dependence structure and the upgrading semantic association example that define resource according to the developer, described dependence is unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of constructing 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 unidirectional relationship, comprises that code revision relies on semantic association, the association of interface update semantics and module and disposes semantic association.
Further preferred, the resource subscription method of described semantic-based 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, then execution in step A5, 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 the interface update semantics related, if the interface that then x is added to y upgrades related the subscription and concentrates, then execution in step A5, 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, then execution in step A5, 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, the resource notification method of described semantic-based association may further comprise the steps:
B1. generate the resource updates operation set according to received resource updates operation;
B2. take out 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 whether described semantic association is that interface update semantics interface related and described resource upgrades the related collection of subscribing to not 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.
The PaaS cooperative system of above-mentioned semantic-based 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, process, and the developer that the PaaS Synergistic method carries out the subscription of resource and notice has dependence accordingly when the code update of semantic association is arranged by the semantic-based association; Carry out carrying out virtual resource to the mapping of 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 at resource layer.Thereby help intelligently the co-development personnel better to coordinate the related development module of each tool, fundamentally improved efficient and the quality of co-development work.
Embodiment
The PaaS cooperative system of semantic-based association provided by the invention can be divided into client and server two parts from developer's angle.The developer (is command terminal or Visualized User Interface (Graphic User Interface by client, GUI)) login and access system, and according to the selected engineering project of bulleted list that system lists, then write the item code with its maintenance of mode.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 of semantic-based 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 that the related distributed asynchronous operation to a plurality of developers of semantic association and semantic-based carries out coordinated management, the PaaS Synergistic method that calls the semantic-based association carries out subscription and the notice of resource, control simultaneously developer's access rights, 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 for the Soap engine modules that receives 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 lower layer system generation 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 process a large number of users asks and keep the connection of each user conversation.
Service layer has safeguarded a service pool, comprises a large amount of Web services for the treatment of developer's code update and deployment operation 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 for the treatment of developer's operational order, comprise resource management module, resource debugging module and resource deployment module, wherein, resource management module is used for mapping developer's resource operation instruction, comprises interpolation, deletion and the modification etc. of resource; The resource debugging module is used for finishing test and the function uniting and adjustment of various resources, such 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, detects resource updates, and the PaaS Synergistic method that calls the semantic-based 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, and wherein: the semantic association administration module is used for the semantic association between parsing and the maintenance resources, structure and upgrading semantic association example; The semantic association monitoring module is for detection of resource updates, and the semantic association administration module also is used for calling subscription and the notice that the related PaaS Synergistic method of semantic-based carries out resource with the semantic association monitoring module.
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 unidirectional relationship, is divided into code revision dependence, interface renewal dependence and module and disposes dependence, and semantic association also is unidirectional relationship, is divided into equally code revision semantic association, the association of interface update semantics and module and disposes semantic association.The semantic association example of constructing 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) refers to: resource x depends on any modification that the developer does resource y;
(the x interface upgrades related y) refers to: 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) refers to: 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 is furnished with a version number to assist historical record.The semantic association case representation is a figure who is comprised 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 the key-course is constructed or is upgraded complete semantic association example, the semantic association monitoring module calls the resource subscription method of semantic-based 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, namely take out a record of semantic database, judge whether R equals the code revision semantic association, if, code revision notification queue at resource y is added object x,, otherwise it is related to judge further whether R equals the interface update semantics, if, object x is added in interface update notification formation at resource y, otherwise judges further whether R equals module and dispose semantic association, if, dispose notification queue in the module of resource y and add object x, until all association tuple are processed complete.
In another embodiment, when the semantic association monitoring module is further used for detecting resource updates, call the resource notification method of semantic-based association and carry out resource notification, specifically: generate the resource updates operation set according to the resource updates operation that receives, namely take out all objects that upgrade operation queue and generate the resource updates operation set, then take out resource p and the semantic association M thereof of described resource updates operation set, 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 the interface update notification formation of the association of interface update semantics 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 for control developer's access rights, specifically comprise account management module and safe access control module, wherein, the account management module utilizes client public key and the client user key that send of public-key mechanism (Public Key Infrastructure, PKI) by checking server end storage to come developer's login identity is identified checking.In addition, client all is encrypted all Soap requests that send, and the safe access control module of server end is processed 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, guarantee 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 for Maintenance Development personnel's user's space view, the metadata information that mainly comprises user's space, big or small etc. such as the sign ID of user's space, total disk space size, free space; The virtual resource administration module is used for safeguarding 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, such as the sign ID of virtual resource, the authority owner of virtual resource, the semantic association of virtual resource etc.; The physical resource management module is used for the realization virtual resource and 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 virtual resource to the mapping of physical resource and search location, this resource mapping 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 frequently Internet Transmission expense; Resource related based on the interface update semantics and module deployment semantic association should leave on the same node or the 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, namely 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 of semantic-based association, the method is applied in the key-course of PaaS cooperative system of above-mentioned semantic-based association, comprise: when key-course is constructed or upgraded complete semantic association example, call the resource subscription method of semantic-based association and carry out resource subscription; When key-course detects resource updates, call the resource notification method of semantic-based association and carry out resource notification.
Key-course in the PaaS of above-mentioned semantic-based association cooperative system, define dependence structure and the upgrading semantic association example of resource according to the developer, described dependence is unidirectional relationship, be divided into code revision dependence, interface renewal dependence and module and dispose dependence, the semantic association example of constructing comprises all association tuple, comprises that code revision relies on semantic association, the association of interface update semantics and module and disposes 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, the resource subscription procedure of semantic-based association is specially:
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 namely adds object x in the code revision notification queue of resource y.
Step S104 judges whether R equals the interface update semantics related, 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 namely 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 namely disposes notification queue in the module of resource y and adds object x.
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, the resource notification method detailed process of semantic-based association is as follows:
Step S201 generates the resource updates operation set according to received resource updates operation, namely takes out all objects that upgrade operation queue and generates the resource updates operation set.
Step S202 takes out 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, namely 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 namely 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 of the association of interface update semantics and p upgrades the related collection of subscribing to for empty, namely judge interface update notification formation that whether M equal the association of interface update semantics 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 namely 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 namely 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 namely 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.
The PaaS cooperative system of above-mentioned semantic-based 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, process, and the developer that the PaaS Synergistic method carries out the subscription of resource and notice has dependence accordingly when the code update of semantic association is arranged by the semantic-based association; Carry out carrying out virtual resource to the mapping of 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 at resource layer.Thereby help intelligently the co-development personnel better to coordinate the related development module of each tool, fundamentally improved efficient and the quality of co-development work.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing 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.