CN102325153B - Service development method and system - Google Patents

Service development method and system Download PDF

Info

Publication number
CN102325153B
CN102325153B CN201110194201.6A CN201110194201A CN102325153B CN 102325153 B CN102325153 B CN 102325153B CN 201110194201 A CN201110194201 A CN 201110194201A CN 102325153 B CN102325153 B CN 102325153B
Authority
CN
China
Prior art keywords
service
shared library
information
version
jdk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110194201.6A
Other languages
Chinese (zh)
Other versions
CN102325153A (en
Inventor
陈春松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201110194201.6A priority Critical patent/CN102325153B/en
Publication of CN102325153A publication Critical patent/CN102325153A/en
Application granted granted Critical
Publication of CN102325153B publication Critical patent/CN102325153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a service development method and a system. The method comprises the steps of: defining the basic information of service, wherein the basic information of the service comprises service class information, service class attribute information, service information, service attribute information, service method information and service dependence information; defining the boundary of the service, and specifically, defining the boundary for classes, configuration files and attribute files contained in the service; defining the client marks of the service, wherein the client marks of the service are used for marking the classes used by clients; and verifying the dependence of the service. By adopting the technical scheme, the rapid development and the rapid reuse of the service can be realized and the compatibility of the system can be guaranteed.

Description

A kind of service development method and system
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of service development method and system.
Background technology
Internet era, consumer improves day by day to the demand of Virtual Service, service provider is to attract consumer to the capability of fast response of new service, improves the important indicator of customer loyalty.
Therefore fast Development, rapid deployment service are the essential condition of enhancing competitiveness.Along with the quantity of service is more and more, dependence (between service and service, serving between third party library) can become increasingly complex, and its complexity can exceed the category that a people can control.How the amendment each time of degree of guaranteeing service and third party library can not cause the incompatibility of system, thereby causes the unavailable of service, is service development, disposes the matter of utmost importance facing.
Summary of the invention
The invention provides a kind of service development method, the method can realize the fast Development of service, and can ensure the compatibility of system.
The present invention also provides a kind of service development system, and this system can realize the fast Development of service, and can ensure the compatibility of system.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of service development method, the method comprises:
The essential information of definition service; Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
The border of definition service, is specially: the boundary definition of serving as service segmentation strategy using JAVA bag, specifically realize class by providing, define a service boundaries interface, for service comprise-class, configuration file and property file define border;
The client of definition service indicates; The mode that the client of service indicates for utilizing java to explain indicates the class of being used by client;
Dependence to service is verified;
Wherein, the border of described definition service comprises:
Leave the source code of all services and test code in identical position;
Each service has an independent JAVA bag, this JAVA bag with and the attached bag all source codes and the test code that comprise this service;
Between the JAVA bag of each service, walk abreast, do not have nest relation;
The test data of each service, resource and configuration file are existed in different subdirectories.
The invention also discloses a kind of service development system, this system comprises: service development center, version control server, information database, wherein:
Service development center, indicates for the essential information, the border of service and the client of service that define service, and the dependence of service is verified;
Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
The border of definition service, is specially: the boundary definition of serving as service segmentation strategy using JAVA bag, specifically realize class by providing, and define a service boundaries interface, for serving the class, configuration file and the property file definition border that comprise;
The mode that the client of service indicates for utilizing java to explain indicates the class of being used by client;
Version control server, for the code of the service of preserving and the issue bag of service;
Information database, for the essential information of the service of preserving;
Wherein, service development center, for leaving the source code of all services and test code in the identical position of version control server; Be used to each service to have to set up an independent JAVA bag, this JAVA bag with and the attached bag all source codes and the test code that comprise this service, between the JAVA bag of each service, walk abreast, there is not nest relation; The test data of each service, resource and configuration file are kept at respectively in the different subdirectory in version control server.
From above-mentioned, the client of the essential information of this definition service of the present invention, the boundary definition service of definition service indicates, and the technical scheme that the dependence of service is verified, owing to having provided the service description information of definition, therefore can realize the fast Development of service, and serve the scheme that relies on checking and can ensure the compatibility of system.
Brief description of the drawings
Fig. 1 is the service development framework schematic diagram in the embodiment of the present invention;
Fig. 2 is the schematic diagram of the concrete dependence in the embodiment of the present invention;
Fig. 3 is the flow chart of a kind of shared library management method in the embodiment of the present invention;
Fig. 4 is the flow chart of a kind of service development method in the embodiment of the present invention;
Fig. 5 is the structural representation of a kind of service development system in the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the drawings and specific embodiments.
In the solution of the present invention, all exploitations are taking service as basis, and developer will be absorbed in the exploitation of service logic, and the state of less other related service of concern.
In the solution of the present invention, service development will be followed following rule:
Service is as minimum exploitation granularity, and different services is isolated with reasonable manner under development.
Serve as minimum compiling granularity, the dependence of Reference Services, service should compile separately.
Service, as minimum packing granularity, is upgraded with the heat that really realizes seeervice level.
Service is as minimum deployment granularity.
Fig. 1 is the service development framework schematic diagram in the embodiment of the present invention.In Fig. 1, being described below of various piece:
Developer
Be used for developing and serve
Administrative staff
Be used for checking, the various information of Monitoring Service.
Service development environment
Be used for fast Development service
Create service, and produce service description information.
Produce service code framework, application service coding rule.
Inquire about existing service
Compiling, packing, issuing service
Service for checking credentials consistency
Browser
Administrative staff are used for by web server browsing service information.
Services package
Jar bag, is used for issuing service
Version control server
Be used for preserving service code, bag is issued in service
Application server
Be used for operation service
Service information data storehouse
Preserve service description information
Preserve service Dependency Specification
Preserve service operation daily record
Web server
Realize inquiry, the monitoring of service.
Service will normally move, and must rely on other resources, and generally, its dependence can have following a few class:
JDK relies on
Shared library relies on
Third party wraps dependence
Share service relies on
Public service relies on
Instrument service relies on
Business service relies on
Brother's service relies on
What the normal operation of visible service may rely on is surrounded by JDK and shared library, and wherein, shared library comprises: third party's bag and share service; Described share service comprises again: public service, instrument service, business service.
Except the dependence to bag, service also has the dependence to agreement, standard.But generally, can finally convert the dependence to agreement, standard implementation bag to the dependence of agreement, standard, because agreement, the standard of the agreement of particular version, the certain corresponding certain version of standard implementation bag, therefore just can the secondary indication dependence of bag in pairs to the dependence of agreement, standard
Fig. 2 is the schematic diagram of the concrete dependence in the embodiment of the present invention.JDK does not rely on other any bags as seen from Figure 2.
If next to the JDK and the shared library that are relied on of management in the present invention, so as other services can be fast, as one man quote and describe.
Fig. 3 is the flow chart of a kind of shared library management method in the embodiment of the present invention.As shown in Figure 3, comprising:
301, the file of JDK is uploaded to the assigned address of version control server, the file of shared library is uploaded under the deposit position of the corresponding shared library classification in version control server.
302, the descriptor of JDK is saved in information database.
Wherein, the descriptor of JDK comprises: the sign of JDK and the JDK deposit position on version control server;
303, shared library descriptor and shared library Dependency Specification are saved in information database.
Wherein, the descriptor of described shared library comprises: the fileinfo that the shared library information of the classification information of shared library, shared library information, concrete version, the shared library of concrete version comprise, the attribute information of concrete version shared library; Wherein in the classification information of shared library, comprise the positional information of shared library in version control server;
The Dependency Specification of described shared library comprises: the storehouse of the shared library that the storehouse of shared library indicates and relied on indicates;
304, in the time that needs obtain appointment JDK, arrive first in information database and search corresponding descriptor, obtain the file of this appointment JDK from version control server according to descriptor.
305, in the time that needs obtain appointment shared library, arrive first and in information database, search corresponding shared library descriptor and shared library Dependency Specification, obtain the file of this appointment shared library according to shared library descriptor from version control server, obtain the file of other bag being relied on by this appointment shared library according to shared library Dependency Specification.
To the reasonable management for realizing JDK and shared library, the data structure adopting preserve these information on information database time describes below:
1.JDK
For the JDK version that company need to support is set up a storehouse, all third party bag, share service bag, and the service that belongs to a product all must show its minimum JDK version relying on of appointment.
Description (jdk_version) information of a JDK is as shown in table 1:
Field name Explanation of field Data type Major key Could be empty Default value and remarks
JdkVersionId Jdk version indicates Int PK N Self-propagation field
JdkVersion Jdk version Varchar(10) N
Repository Deposit position Nvarchar(256) N
Table 1
Remarks: set up unique index on JdkVersionId.
In table 1, deposit position refers to the deposit position of JDK on version control server.
2. shared library
Shared library is in global scope, to share the bag using, and comprising:
Third party wraps dependence
Share service relies on
Public service relies on
Instrument service relies on
Business service relies on
Once a bag enters shared platform, other developers just can promptly find and use this service, thereby effectively avoid the problem of overlapping development, unordered use
All shared library will be got up by a set of identical data structure managing.In the present invention, shared library category is distinguished.Classification (lib_id_mask, the shared_lib_category) information of shared library is as shown in table 2 and table 3.
Table 2
Remarks:
CategoryId produces storehouse type designation by the mode of zonal coding
xxx xxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Sign storehouse, Level1 Level2 Level3 Level4 Level5 Level6 storehouse version
Generally speaking:
Level1: can define three major types: system-level, third party, our company
Later classification, can carry out classification separately according to different large classes, although show that the coded format of each classification is the same above in the coding providing, in practice, can, according to different situations, carry out different zonal codings to different classifications.
In an embodiment of the present invention visible, classification indicates and is made up of 64 bits, and wherein 1-3 bit represents that first order classification, 4-8 bit represent that second level classification, 9-16 bit represent that third level classification, 17-24 bit represent that fourth stage classification, 25-32 bit represent that level V classification, 33-48 bit represent that the 6th grade of classification, 49-56 bit library representation indicate, 57-64 bit indicates storehouse version.
Table 3
Remarks:
On Parent, set up external bond, reference field is: lib_category.CategoryId
CategoryId produces storehouse type designation by the mode of zonal coding
xxx xxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Sign storehouse, Level1 Level2 Level3 Level4 Level5 Level6 storehouse version
Generally speaking:
Level1: can define three major types: system-level, third party, our company
Later classification, can carry out classification separately according to different large classes, although show that the coded format of each classification is the same above in the coding providing, in practice, can, according to different situations, carry out different zonal codings to different classifications.
Repository: point to the deposit position of this shared library classification in version control server.
Shared library (share_lib) information is as shown in table 4:
Table 4
Remarks:
LibName: must use English alphabet, numeral, underscore, line character etc.
The deposit position of this shared library in version control server is the subdirectory under the deposit position of classification under this shared library, and subdirectory name is called " LibName ".
Shared library (share_versioned_lib) information of concrete version is as shown in table 5:
Table 5
Remarks:
LibName: must use English alphabet, numeral, underscore, line character etc.
The deposit position of this shared library in version control server is the subdirectory under the deposit position of classification under this shared library, and subdirectory name is called " LibName ".All versions of this shared vision all leave under a subdirectory of this position.Subdirectory title directly adopts version number.
File (share_versioned_lib_file) information that the shared library of concrete version comprises is as shown in table 6:
Table 6
Attribute (share_versioned_lib_property) information of concrete version shared library is as shown in table 7:
Table 7
Remarks:
Seq: in the time that property value is too large, a property value may need multirow to carry out save data, and this is that standby Seq carrys out order of representation.Most of situation, property value can be used a line display, and in this case, Seq is always 1.
Dependence (share_versioned_lib_depedency) information of shared library is as shown in table 8:
Table 8
In an embodiment of the present invention, the concrete dependence of third party's bag can be divided into again two large classes: system-level and third party.
System-level some bags that belong to java standard that show as, such as j2ee etc.
The classification that system-level bag is corresponding indicates and will adopt following rule:
xxx xxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Sign storehouse, Level1 Level2 Level3 Level4 Level5 Level6 storehouse version
level1:001 represents system library
leve2: represent field corresponding to system library, such as
■00001:http
■00010:ejb
■00011:xml
■00100:jms
■00101:jdbc
level3: need not
level4: need not
level5: need not
level6: need not
storehouse indicates: library name
storehouse version: the storehouse of concrete version
Third party wraps corresponding classification sign will adopt following rule:
xxx xxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
Sign storehouse, Level1 Level2 Level3 Level4 Level5 Level6 storehouse version
level1:010 represents that third party wraps
level2: represent that third party wraps corresponding field, such as
00001:http
00010:xml
00011:jdbc
00100:rpc
level3: segmentation field
level4: further segment field
level5: more smart her cloth segments field
level6: realize type
storehouse indicates: library name
storehouse version: the storehouse of concrete version
In an embodiment of the present invention,
Share service relies on dependence company service exploitation and that be published to shared platform that refers to.
Share service has three types
public service: do not support warm connection function.
instrument service: support warm connection function, there is service interface and multiple method of servicing.
business service: support warm connection function, there is service interface and multiple method of servicing.
To instrument service, business service, provide the detailed description of method of servicing, to facilitate sharing of client.
The descriptor that is to say instrument service and business service also comprises: method information.
The method information of a concrete version shared library (instrument service or business service) is as shown in table 9:
Table 9
The data structure of the information of preserving in the information database of introducing above.Based on operations such as above-mentioned data structure can increase newly shared library, discard, delete, shows and obtain.Be specifically described as follows.
The solution of the present invention realizes the coherency management to enterprise's shared library, and this shared library comprises the share service of third-party shared library and company oneself exploitation; Concrete function comprises:
increase shared library classification.
increase shared library
upload the shared library of particular version
the shared library of discarded particular version
delete the shared library of particular version
the shared library dependence of checking particular version
show the shared library dependence of particular version
1. increase shared library classification
In shared library classification, increase a record; When increase, must specify following information: item name, classification are described, parent class
2. increase shared library
In shared library classification, increase a record; When increase, must follow following steps:
1) find the classification of this shared library, if there is no, create it.
2) create this shared library,
A) library name
B) storehouse is described
C) storehouse type
D) storehouse provider
E) official website in storehouse
F) introduce reason
3) the particular version shared library of needs being uploaded, and following information is provided
A) bag version
B) the compliant Version this shop of this version
C) description of this version
D) the jdk version needing
E) upload reason
F) service indicates (if this service is the share service of company oneself exploitation, needing to indicate)
G) license type
4) upload shared library file to version control server, provide following information to each file simultaneously
A) file type
B) filename
5) if there are some specific properties in this storehouse, need specific properties to configure one by one; Particularly the share service to enterprises exploitation, often needs some attributes to simplify exploitation.
A) Property Name
B) attribute type
C) property value
6) if this storehouse has relied on other shared library, check each shared library, if the shared library version of this shared library and dependence exists, do not need to process this shared library; Otherwise
If a) shared library does not exist, must increase according to the logic that increases shared library shared library and the shared library version of this dependence;
If b) shared library exists, but the version relying on do not exist, and must increase according to the logic that increases shared library version the shared library version of this dependence.
3. increase the shared library of concrete version
For shared library increases a shared library version, when increase, follow following steps:
1) find this shared library
2) the particular version shared library of needs being uploaded, provides following information:
A) bag version
B) the compliant Version this shop of this version
C) description of this version
D) the jdk version needing
E) upload reason
F) service indicates (if this service is the share service of company oneself exploitation, needing to indicate)
G) License type
3) upload shared library file to version control server, provide following information to each file simultaneously:
A) file type
B) filename
4) if there are some specific properties in this storehouse, need specific properties to configure one by one; Particularly the share service to enterprises exploitation, often needs some attributes to simplify exploitation.
A) Property Name
B) attribute type
C) property value
5) if this storehouse has relied on other shared library, check each shared library, if the shared library version of this shared library and dependence exists, do not need to process this shared library; Otherwise
If a) shared library does not exist, must increase according to the logic that increases shared library shared library and the shared library version of this dependence;
If b) shared library exists, but the version relying on do not exist, and must increase according to the logic that increases shared library version the shared library version of this dependence.
4. the shared library of discarded particular version
The shared library that indicates a particular version is discarded state; After sign, later service can not be quoted this storehouse again.But quoting of having existed can continue to quote.
Discarded step is very simple:
1) find the particular version that needs discarded shared library.
2) click " confirmation ".
3) system will be found out other shared library (third party's shared library, share service) of this shared library of dependence (directly with indirect); If shared library is managed together with service-oriented shared exploitation and used, find out other services of developing that rely on this shared library simultaneously.And they are shown.
4) after user checks, can click " cancellation ", cancel this operation; Also can select " confirmation ", continue discarded this version.
5. delete the shared library of particular version
Delete the shared library of a particular version; After deletion, this version will no longer exist.
The shared library that indicates a particular version is discarded state; After sign, later service can not be quoted this storehouse again.But quoting of having existed can continue to quote.
Discarded step is very simple:
1) find the particular version that needs discarded shared library.
2) click " confirmation ".
3) system will be found out other shared library (third party's shared library, share service) of this shared library of dependence (directly with indirect); If shared library is managed together with service-oriented shared exploitation and used, find out other services of developing that rely on this shared library simultaneously.And they are shown.
4) if other shared library of Existence dependency and the service of developing are directly exited; Otherwise, show " cancellation " button, allow user cancel this operation; Show " confirmation " button, allow user continue to delete.
6. show the shared library dependence of particular version
To the shared library of a particular version, show by graphics mode the dependence that they are all, be included in upstream and downstream dependency chain the complete dependence of all services, shared library.
7. obtain a shared library
In the time that a service need to be obtained third party's bag or share service from shared library, follow following steps:
1) find the specific category of this third party bag or share service.
2) system shows all shared library under this classification, and relevant information.
3) if this system is used together with service-oriented exploitation, brother's service of this service of inquiry has been relied on the shared library in identical shared library classification by whether system, if relied on, the shared library of dependence is chosen, as shared library and the shared library version of current dependence.Skip the 4th), 5) step, directly move the 6th) step;
4) if the shared library of not choosing in advance and version thereof are selected a shared library.Then, system is listed all versions in the shared library of selection, and user further selects shared library version.
5) user clicks " confirmation ", and whether the particular version of shared library that system is selected checking and the dependence of service be compatible, as incompatible, points out error message, then returns to the 4th step.
6) system, by the path of finding shared library in version control server, is downloaded these files automatically from version control server.If certainly cooperated with maven, can, in pom file, generate the dependence of the shared library to this version.
Introduce the management of shared library and shared library above, next on the basis based on aforesaid shared library, introduced the process of the service development in the present invention.
Development process in the present invention and specification are based upon on the basis of service, therefore how to define, differentiate that a service is the foundation stone of this development process and specification.
Can define from two aspects as the service under this development process and specification:
That serves can be descriptive.
The statement of service dependence; An every other assembly that service relies on, comprises that the class libraries of jdk, third party's assembly, company oneself exploitation and other services all must statements.
Service-oriented exploitation theory in the present invention, carrys out design system by service-oriented mode, and a system can be built as playing with building blocks.But on stream, developer's environment that but neither one is suitable is developed service, just as not having specific factory, mould, workman produces building blocks, the service of producing by pure manual mode, high production, high standard, the high-quality of service be cannot guarantee, and then stability and the robustness of the system of being built by this service affected.
Fig. 4 is the flow chart of a kind of service development method in the embodiment of the present invention.As shown in Figure 4, the method comprises:
401, the essential information of definition service; Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
402, the border of definition service, is specially: tired, the configuration file and the property file definition border that comprise for service;
403, the client of definition service indicates; The client of service indicates for indicating the class of being used by client;
404, the dependence of service is verified.
If the description to the definition service of mentioning in method shown in Fig. 4 below, i.e. essential information, the border of service and the client of service of definition service indicate and illustrate one by one.
1. the essential information of service
The essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification; In development process in the present invention and specification by the essential information of following data structure service.
The data structure of service type information (service_category) is as shown in table 10:
Table 10
Remarks:
● CategoryId adopts the mode of segment encoding to define COS and indicates, and is by the benefit of which, just can know that by a CategoryId such other parent class identifies.
Its specific rules is as follows:
CategoryId adopts 64 longs, and each bit distributes position as follows
xxxx xxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx000000000000000000000000
1 service type 2 services of product line product item item code line service type indicate
There is following constraint
Only support 6 grades of classifications, be respectively
Product line: support 15 product lines
Product: support 15 products
Project: support 255 projects
Item code line: support 255 item code lines
Service type 1: support 255 sub-service types
Service type 2: support 255 sub-service types
Under each classification, support 16,777,215 services.
On field Parent, set up outside being good for, the field of quoting is
service_category.CategoryId
The data structure of service type attribute (service_category_property) information is as shown in table 11:
Field name Explanation of field Data type Major key Could be empty Default value and remarks
CategoryId COS indicates long PK N
PropertyName Property Name varchar(30) PK N
Seq COS sequence number Int PK Y
PropertyType Attribute type Varchar(128) N The type of attribute
PropertyValue Property value nvarchar(256) N
Table 11
Remarks:
Reserved attribute-name has at present
Interface: corresponding to such other interface, this interface must be inherited or realize to the service under this classification
InterfaceMetaData: the note of interface, parent, parameter.
Workspace: corresponding operating room
Project: corresponding project
VcsPath: indicate the position of respective file in version control server.
Seq: in the time that property value is too large, a property value may need multirow to carry out save data, and this is that standby Seq carrys out order of representation.Most of situation, property value can be used a line display, and in this case, Seq is always 1.
The data structure of service (service) information is as shown in table 12:
Table 12
Remarks:
ServiceCategory, ServiceName can service of unique sign.
On ServiceCategory, set up external bond, reference field is:
service_category.CategoryId
The producing method of ServiceId is: in utilization table, service_category field sequence produces a service sign that belongs to this service type, then adds that service type indicates formation ServiceId.
ServiceId adopts the mode of segment encoding to define COS and indicates, and is by the benefit of which, just can know that by a CategoryId such other parent class identifies.
Its specific rules is as follows:
CategoryId adopts 64 longs, and each bit distributes position as follows
xxxx xxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx000000000000000000000000
1 service type 2 services of product line product item item code line service type indicate
There is following constraint
Only support 6 grades of classifications, be respectively
Product line: support 15 product lines
Product: support 15 products
Project: support 255 projects
Item code line: support 255 item code lines
Service type 1: support 255 sub-service types
Service type 2: support 255 sub-service types
Under each classification, support 16,777,215 services.
Version, the version number of service, the version number of service is made up of three parts: version number: 3; Inferior version number: 3: micro-version number: 3; In performance, the form of version number is: 2.01.12; But in storage, version number is become to an integer, object is in order to facilitate the comparison between version.Relevant computing formula is as follows:
Version number is to 1000000+ micro-version number of * 1000+ of version number of shaping: major version number *;
Be shaped into version number:
Major version number=version number/1000000
Inferior version number=(this Hao of Ban – major version number * 1000000)/1000
Micro-this Hao of version number=Ban – major version number * 1000000 – * of version number 1000
Format logic is: major version number+". "+inferior version number/(float) 1000+ ". "+micro-version number/(float) 1000
The data structure of Service Properties (service_property) information is as shown in table 13:
Table 13
Remarks:
On ServiceId, set up external bond, reference field is: the data structure of service.ServiceId method of servicing (service_method) information is as shown in table 14:
Table 14
Comprising of described service Dependency Specification: the shared library Dependency Specification of service and the Dependency Specification of service to other service;
The data structure of the shared library Dependency Specification (service_share_lib_depedency) of service is as shown in Table 15:
Table 15
Remarks:
On ServiceId, set up external bond, reference field is: service.ServiceId
On DependentVerLibId, set up external bond, reference field is
share_versioned_lib.VersionedLibId
The data structure of the Dependency Specification (service_service_depedency) of service to other service is shown in table 16:
Remarks:
On ServiceId, set up external bond, reference field is: service.ServiceId
On DependentServiceId, set up external bond, reference field is service.ServiceId
2. the boundary definition of service
Service boundaries definition is used for as the class that service comprises, configuration file, property file etc. define a border clearly, and this boundary definition must have two features:
Readable; Developer or other staff can orient according to this definition all information that this services package contains clearly.
Computability; The border of service be can judge with programmed logic, thereby service-oriented exploitation view and service-oriented compiling, packing realized.
For this reason, define a service boundaries interface and help development environment and find out all information that services package contains, in the time of specific implementation, can, according to different user's scenes, provide and specifically realize class.
In one embodiment of the invention, wrap the boundary definition of serving as segmentation strategy using java, this can finely meet the demands, and this strategy has following characteristics
The source code of all services and test code are placed on identical position.
Each service has an independent java bag, this bag with and attached bag will comprise all source codes and the test code of this service;
Each service has an independent java bag, this bag with and attached bag will comprise all test codes of this service;
The service java bag corresponding with service must walk abreast, and can not have any nest relation.
The test data of each service, resource and configuration file are existed in different subdirectories:
In the subdirectory of the test data of each service under the test data root of java project, subdirectory name is called the title of service;
In the subdirectory of the resource of each service under the resource root of java project, subdirectory name is called the title of service;
In the subdirectory of the configuration file of each service under the config directory of java project, subdirectory name is called the title of service.
3. the client of service indicates
Which class is service client sign be used for indicating and need to be used by client.The bag that meets various demands for service creation accessed by packaged instrument by this information:
Client stub bag
Service interface, and the integrated class of interface and realize class
Service is abnormal, that serviced interface is dished out, need client process abnormal
Import parameter class into.
Result is returned to class.
Class is selected in service mutation
Service end bag
Service javadoc
In one embodiment of the invention, the mode of utilizing java to explain marks the class which class is client:
package com.feinno.soa.devenv.annotation;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public@interface StubClass{}
This note is one and indicates note, without any attribute.
In the present invention, the dependence of service is verified as: to service with and whether the version of all other services, shared library and the JDK that are relied on consistent or compatibility is verified;
The dependence of service is verified specifically and comprised: the checking of JDK version conflict, service release conflict checking, the checking of shared library version conflict.
Fig. 5 is the structural representation of a kind of service development system in the embodiment of the present invention.As shown in Figure 5, this system comprises: service development center 501, version control server 502, information database 503, wherein:
Service development center 501, indicates for the essential information, the border of service and the client of service that define service, and the dependence of service is verified;
Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
The border of definition service, is specially: tired, the configuration file and the property file definition border that comprise for service;
The client of service indicates for indicating the class of being used by client;
Version control server device 502, for the code of the service of preserving and the issue bag of service;
Information database 503, for the essential information of the service of preserving.
In the system shown in Fig. 5, service development center 501, for leaving the source code of all services and test code in the identical position of version control server 502; Be used to each service to have to set up an independent JAVA bag, this JAVA bag with and the attached bag all source codes and the test code that comprise this service, between the JAVA bag of each service, walk abreast, there is not nest relation; The test data of each service, resource and configuration file are kept at respectively in the different subdirectory in version control server 502.
System shown in Fig. 5 further comprises: Access Management Access center 504;
Version control server 502, is further used for preserving JDK in the assigned address of self, and in the assigned address of self, category is preserved shared library;
Information database 503, the descriptor that is further used for preserving JDK, and the descriptor of shared library and the Dependency Specification of shared library;
Wherein, the descriptor of JDK comprises: the sign of JDK and the JDK deposit position on version control server; The descriptor of described shared library comprises: the fileinfo that the shared library information of the classification information of shared library, shared library information, concrete version, the shared library of concrete version comprise, the attribute information of concrete version shared library; Wherein in the classification information of shared library, comprise the positional information of shared library in version control server; The Dependency Specification of described shared library comprises: the storehouse of the shared library that the storehouse of shared library indicates and relied on indicates;
Access Management Access center 504, while specifying JDK, arrives first in information database 503 and searches corresponding descriptor for obtaining at needs, obtains the file of this appointment JDK according to descriptor from version control server 502; While specifying shared library for obtaining at needs, arrive first and in information database 503, search corresponding shared library descriptor and shared library Dependency Specification, obtain the file of this appointment shared library according to shared library descriptor from version control server 502, obtain the file of other bag being relied on by this appointment shared library according to shared library Dependency Specification;
Described service development center 501, specifies JDK or specifies shared library for obtaining from Access Management Access center 504.
In the system shown in Fig. 5, described service development center 501, verify for or compatibility whether consistent to the version of all other services, shared library and the JDK that serve with and relied on, specifically comprise: the checking of JDK version conflict, service release conflict checking, the checking of shared library version conflict.
In the system shown in Fig. 5, described service development center 501 and Access Management Access center 504 are two parts in the service development environment shown in Fig. 1.
Enumerating a specific embodiment below describes the service-oriented shared development plan in the present invention.
The service of being based on enterprise-level is shared in service-oriented exploitation.Each environment at service development is introduced the detection and the checking that rely on, and simultaneously for the issue of service, provides comprehensive support.
Former, with developing instrument exploitation code (taking Eclipse as example), developing instrument will wrap with operating room, project, JAVA, and three layers provide exploitation view; In the environment with service-oriented, between project and bag, will add a service, form the exploitation view of four layers: operating room, project, service, JAVA.
Environment configurations
1. service boundaries defining interface is realized:
In configuration file, specify the realization of a service boundaries defining interface " ServiceBoundary "; This interface will be developed environment and be used for carrying out aspect depositing at exploitation view and file operation associated.
2. database configuration:
All information, comprises that shared library information, information on services, dependence etc. all will deposit in database, is accessed by full company.
This database configuration comprises following configuration: database connects string, user name, password.
3. version control server configuration:
All source codes, shared library etc. all will allow as in version control server, be accessed by full company personnel.Privilege feature is by concrete version control server control.Version control server comprises following configuration: version server connects string, user name, password.
The configuration of 4.Web server:
Inquiry, management function that development environment can be accessed web server to be provided are carried out fast Development service.
Web server comprises following configuration: Web service entry address, user name, password.
5. operating room
Operating room generally can correspond to a software product line or certain one deck in multilayer system train of mechanism.
An operating room has following characteristics conventionally:
Operating room is self-contained, and the software that operating room comprises can isolated operation.
Code corresponding to operating room is Uniting, exploitation, deployment.
In version control system, the resource that operating room comprises generally can be placed in some catalogues.
In shared environment, the configuration file of operating room is to be submitted to version control server, and all developers share; only need configuration once, all developers share.
Except the corresponding function of former environment, this programme will be given other functions of operating room (conventionally with menu mode).
Maintenance parameters
Building work chamber
Open operating room
Compiling operating room
Packing operating room
Submit operating room to
Synchronous working chamber
Checking dependence
Check dependence
6. building work chamber
The general corresponding large product in operating room or platform, once after operating room's establishment, all relevant developers will share this operating room, develop.
Following parameters need to be specified in building work chamber:
Operating room's title
The jdk version that operating room needs
The path of operating room's correspondence in version control system.
Bag output format.
Bag output directory.
Building work chamber comprises the following steps:
A. under large product line, for this operating room generates a record, represent the service type that this operating room is corresponding; And be the following attribute of this service type generation.
·jdk_version
·vcs_path
·out_dir
·package_format
B. generate the file of an operating room, deposit relevant information, object is to allow operating room under the environment of offline, can open equally.
7. open operating room
Opening operating room is exactly that the content structure of operating room is shown with tree-like;
This function comprises following steps:
A. access services definition database, if accessed unsuccessfully, directly with local operating room's configuration file; If accessed successfully, refresh local operating room configuration file with the configuration of database;
B. must arrive all items that operating room comprises.
C. each project is called to " opening " function.
D. the other guide of temporary transient operating room.
8. maintenance parameters
Show and maintenance work chamber parameter by the mode of the attribute page; The parameter information of operating room is shared, so developer does not change parameter value easily.
Basic parameter comprises: the jdk version of operating room's title, operating room's needs, the path of operating room's correspondence in version control system, bag output format, bag output directory.
Maintenance parameters comprises following steps: upgrade the data in service definition database; Upgrade the data in operating room's configuration file.
9. compiling operating room
This function will comprise the following steps: find out all items that operating room comprises; According to the dependence of project, project is sorted; From the project of the bottom, the compilation facility of sequence call project, compiles.
10. packing operating room
This function will comprise the following steps: call " compiling " function, operating room is compiled, if compiled unsuccessfully, exit.Call " dependence checking " function, services all in operating room is carried out to dependence checking, if inconsistent, exit.Find out all items that operating room comprises; According to the dependence of project, project is sorted; From the project of the bottom, the packing function of sequence call project (project packing function should not called " compiling " and " dependence checking " function of project again), packs.Tactful according to packing, all bags are carried out to induction-arrangement, finally, in the mode of tar bag or zip bag, all bags are packed according to rational structure, rational form.
11. submit operating room to
This function will comprise the following steps: first call compilation facility, operating room is compiled, to guarantee that all amendments all can compile; If compiling is not passed through, can not submit to; Find out all items that operating room comprises; The submission function (project submits to function should not call " compiling " function of project again) of sequence call project, is submitted to version control server by up-to-date service amendment, and revises development management database simultaneously; After submission completes, will call " dependence checking " function, and point out this amendment whether can cause dependence problem of inconsistency, if any, show by graphics mode.
12. synchronous working chambers
This function is synchronized to the definition that realizes all services in operating room in the service definition storehouse of database.
This function will comprise the following steps: find out all items that operating room comprises; According to the dependence of project, project is sorted; From the project of the bottom, " synchronously " function of sequence call project is carried out synchronously.
13. checking operating rooms
This function is used for verifying whether the dependence of all services in operating room meets.
This function will comprise the following steps: find out all items that operating room comprises; According to the dependence of project, project is sorted; From the project of the bottom, " checking relies on " function of sequence call project is carried out dependence checking.
14. check dependence
This function by service with serve between dependence, show by the mode of figure.
This function will comprise the following steps: from service definition database, find out all services corresponding to operating room.All services are reasonably distributed in painting canvas, and link up with line having between the service of dependence and service.
Project
Project is the set of service, and a project can comprise multiple services; Generally, designer can, by service residing position in whole architecture, add between service and service whether have cohesion, and service is concluded to processing, puts into a suitable project.
The configuration file of project is shared equally, only needs configuration once, and all developers share.
Developer need to provide following information: project name; The path of project correspondence in version control system; The packing strategy of project: be service-oriented packing, or facing project packing; Project dependence: to the dependence of sundry item in operating room.
Project support following functions: establishment project, maintenance parameters, open project, delete items, compiling project, packed items, submission project.
1. establishment project
Establishment project, by current operating room, creates a new project.Project is shared, once create, all developers can access.
In guide, need to specify following parameter: project name, must be unique in operating room; In version control system, the path that project is corresponding; The dependence of project to sundry item in operating room; The packing strategy of project: be entirety packing, or by service packing.
Establishment project guide comprises following steps: whether inspection item title is unique, not uniquely exits; Under service type corresponding to operating room, for generating a new service type, this project represents this project; For this service type is added following attribute: vcs_path and project_dependency; Generate a project profile, this file can be used for realizing the project operation of offline; In operating room, add this project node.
2. maintenance parameters
Show and the parameter of Maintenance Significant Items by the mode of property pages: project name, must be unique in operating room; In version control system, the path that project is corresponding; The dependence of project to sundry item in operating room; The packing strategy of project: be entirety packing, or by service packing.
Maintenance parameters comprises following steps: upgrade the data in service definition database; Data in renewal item configuration file.
3. open project
The project of opening is exactly that the content structure of project is displayed with tree-like.
The project of opening comprises following steps: access services definition database; If accessed unsuccessfully, directly by local project profile; If accessed successfully, refresh local project profile with the configuration of database; Must arrive all services that operating room comprises; Each service call " is opened " to function; The other guide of displaying project.
4. delete items
Delete items is used for deleting a unwanted project.
Delete items comprises following steps: the service in this project of checking does not have is quoted by the service in sundry item, if had, exits; From database, delete the attribute of service type corresponding to this project; From database, delete service row corresponding to this project not; Delete items configuration file from version control server; From the view of operating room, delete this project; If delete items, does not need delete items content, exit; From version control server, delete the content of all items; From local file system, delete content.
5. compiling project
Compiling project is used for all services in compiling project.
This function comprises following steps: all services of finding this project to comprise; According to the dependence of service, service is sorted; From the service of the dependence bottom, successively service is compiled.
6. packing
Packing is that the service for project is comprised is packed, to issue.
This function comprises following steps: find the corresponding service type in service area, project place; Find service type attribute " out_dir "; Under out_dir, lookup names is the subdirectory of " entry name ", if there is no, creates, if existed, empties this subdirectory; Find all services under project; To each service, call successively the packing function of service.
7. submission project
Submission project to version server, revises service definition database to all service commitments of revising in project simultaneously, and the state of service is made into issued state.
This function comprises following functions: from service definition database, find all services of revising in this project.To each service of revising, call " submitting service to " function, submit service to.
Service
Service is self-contained development block minimum in this scheme, i.e. a service can be developed separately, compile and pack according to the configuration of service.
Service support following functions: create service, open service, maintenance service, deletion service, compiling service, packaged service, submission service, issuing service.
1. create service
The service of establishment is used for creating a service in a project.
In service-oriented development environment, all classes all belong to a service, different according to the object of service, service can be divided into following a few class
Public service: this service is to comprise following public class in fact, such as the base class of Java Bean class, exception class, COS, mark class, enumerate class etc.This service is most basic, does not support warm connection function.
Instrument service: what this service comprised in fact is some tool-class, such as StringUtil, IntegerUtil, DateUtil etc.; In order to realize the warm connection function of service, these services all need to realize with Singleton substantially.Generally, in instrument service, can comprise multiple services;
Business service: this is service truly, generally need to be deployed in a container, waits for the access of client.This service must realize warm connection function.
1.1. create public service
Create public service guide and need parameter below: parameter, service dependence that service name, service describing, service boundaries Interface realization class need.
Create public service guide and can comprise step below: check that whether service name is unique, if not unique, exit.Check service dependence, if there is incompatibility, exit.In service definition database, under service type corresponding to project, increase a service.And be the necessary attribute of service creation.In service definition database, increase service dependence.In project profile, increase service listings information, comprise service dependence.Generate corresponding service profiles.Amendment exploitation is attempted, and increases this information on services.
To public service, except basic function, need to increase following functions:
A. amendment service dependence, need to follow following steps: check service dependence, if there is incompatibility or imperfect, exit.In service definition database, amendment service dependence.
B. the java class of Strong Jet's service type, need to follow following steps: specify such title, such parent class; Generate the source code of the class of specifying; In service definition database, under the parent class of specifying, for this service type increases a subclass, represent this service type; And fill in corresponding information; In service definition database, for this classification generates corresponding Service Properties information; Call Version Control module, such is added in version control server, but do not submit to; Refresh exploitation and attempt, show newly-built service type.
C. delete service type: need to follow following steps: check whether this classification has subclass; If exited; Check whether this classification serves, if any exiting; From service definition database, delete category attribute and classification information; Call Version Control module, from version control server, delete such, but do not submit to; From local directory, delete such; From development environment view, delete this service type.
1.2. establishment instrument service
Instrument service has following characteristics: comprise multiple services; Support hot plug.
In realization, instrument service has following requirement:
Instrument is served, and has the service interface of a top level, and this interface is actually the factory mode of a service;
The service interface of Top level just returns to concrete instrument service, so that user calls.In order to support hot plug, the agency that the instrument Service Instance returning is actually particular service instance, realizes a proxy mode;
Top level service and concrete service are all single-instances, realize a Singleton pattern;
All services comprise top level, all must realize separating of interface and realization, realize loose binding pattern.
The service interface of Top level is realized, and will utilize the function of service container, and function is registered, refreshes, nullified in the concrete instrument service of management, thereby realizes the warm connection function of concrete instrument service.
This function does not belong to the content of this programme.
Establishment instrument service guide needs parameter below: interface, the service dependence of the parameter that service name, service describing, service boundaries Interface realization class need, the class of service top level.
Establishment instrument service guide can be followed following steps: check that whether service name is unique, if not unique, exit.Check that whether service dependence is compatible, as incompatible, exits.In service definition database, under service type corresponding to project, increase a service.And be the necessary attribute of service creation.In service definition database, increase service dependence.The interface and the simple Interface realization that generate corresponding top level class, this realization is by Singleton pattern.Call Version Control module, the class of generation is added to version control server, but do not submit to.Generate corresponding service profiles.Refresh exploitation and attempt, show newly-built instrument service.
To instrument service, except basic function, need to increase following functions:
Increase instrument service: need to follow following steps: specify instrument service class title; Formulation instrument service class class name; Check whether this instrument service class exists, as existed, exit; Core Generator service class interface and Interface realization, Interface realization is with the pattern of Singleton; Call Version Control module, from version control server, the service interface of top level, service interface are realized to class check out; Revise the service interface of top level, be called a part for method name with the name of instrument service class, generate a specific interface method, return to the example of instrument service class; The service interface of amendment top level is realized class, and newly-increased instrument service class is realized to registration, cancellation, the refresh function to container; The service interface of amendment top level is realized class, realizes the just method of newly-increased this tool-class of access; Call Version Control module, newly-increased instrument service interface, instrument service interface are realized and being added in version control server, but do not submit to; Amendment service definition database, adds newly-increased method of servicing in database, and generates corresponding attribute; Amendment service profiles, adds newly-increased tool-class service.Refresh exploitation view, show newly-increased instrument service class information.
Deletion instrument service: need to follow following steps: check the instrument service class that needs deletion, if Existence dependency relationship exits; From service profiles, find the interface class of this instrument service, and realize class; Call Version Control module, from version control server, the service interface of top level, service interface are realized to class check out; The service interface of amendment top level is deleted corresponding method from service class; The service interface of amendment top level is realized class, deletes instrument service class to deleting and realizes to the code of the registration of container, cancellation, refresh function; The service interface of amendment top level is realized class, deletes the method for this tool-class of access; Call Version Control module, instrument service interface, the instrument service interface that will delete are realized and being deleted from version control server, but do not submit to; Amendment service definition database, the instrument method of servicing that will delete is deleted from database, and deletes corresponding attribute; Amendment service profiles, deletes tool-class information on services; Refresh exploitation view, delete corresponding instrument service class information.
1.3. create business service
Business service is most important service, is for realizing certain business demand.
In realization, business service has following demand: business service has warm connection function; Business service is generally embodied as Singleton pattern.
Create business service guide and need parameter below: service type under service name, service describing, service, parameter, the interface of service class, service dependence that service boundaries Interface realization class needs.
Establishment instrument service guide can be followed following steps: check that whether service name is unique, if not unique, exit; Check that whether service dependence is compatible, as incompatible, exits; In service definition database, under service type corresponding to project, increase a service.And be the necessary attribute of service creation; In service definition database, increase service dependence; The interface and the simple Interface realization that generate corresponding service class, this realization will adopt Singleton pattern; Call Version Control module, the class of generation is added to version control server, but do not submit to; Generate corresponding service profiles; Refresh exploitation and attempt, show newly-built business service.
2. open service
The service of opening is exactly that the content structure of service is shown with tree-like;
This function comprises following steps: access services definition database; If accessed unsuccessfully, directly by local service profiles; If accessed successfully, use the configuration refreshing service configuration file of database; Find all resources of this service by service boundaries Interface realization class; Reference Services configuration information, shows all resources of service by tree structure.
3. maintenance service
Maintenance service is exactly that service to having existed changes edit pattern into.
Under this pattern: developer can be from version server checkout file; Developer can be submitted to version server by amendment; Use the developer of this service will know that this service, in the middle of amendment, can check whether oneself will do corresponding modify in advance.
This function comprises following steps: if this service has gone out in edit pattern, exit; In service definition database, this service of mark is editing mode; In service profiles, this service of mark is editing mode; Enable the operation of Version Control module to this service.
4. delete service
The service of deletion is exactly to delete the service having existed.
This function comprises following steps: check whether this service is relied on by other services, if any, exit; From service definition database, delete all information of this service; From version control server, delete the All Files of this service correspondence, but do not submit to; From local file, delete the All Files of this service correspondence; Amendment project profile, deletes this information on services; Refresh exploitation view, service is deleted from view.
5. compiling service
Compiling service is exactly all classes corresponding to compiling service.
This function comprises following steps: whether all dependences of service meet; Check all shared library that rely on, whether Already in local, if there is no, from shared library, obtain corresponding information, and download corresponding shared library; By other services of shared library, dependence, be added in the classpath of compiling all classes that compiling services package contains.
6. submit service to
Submit to service exactly the amendment of service to be submitted to version control server.
This function comprises following steps: check that whether this service is in edit pattern, if not, exit; Call " compiling " service, check whether this service can compile, as can not, exit; Call Version Control module, amendment information is submitted to version control server; In service definition database, change service release, service state and amendment are described; In service definition database, the amendment sequence number that corresponding version control server is generated, as Service Properties " changelist_ "+version number, puts into Service Properties table.
7. packaged service
Packaged service breaks into service related resource jar bag exactly, issues.
This function comprises following steps: call " compiling " service, check whether this service can compile, as can not, exit; By all classes after compiling, service profiles, property file, other configuration files break into jar bag; The class that client is needed, breaks into a client jar bag, for client; The class that client is needed, calls javadoc instrument, generates javadoc, and breaks into zip bag.
8. issuing service
Issuing service is published to shared library to service as share service exactly, so that the people of other departments calls.
This function comprises following steps: checks the every other service that this service relies on, whether all issues, if not, exit; Shared library classification under finding: if issue for the first time, require user to select a shared library classification, and this information is saved in Service Properties table, if not issuing for the first time,, from Service Properties table, find this shared library classification; By the relevant all bags of service, be put in shared library warehouse; Amendment shared library, react this service: if issue for the first time,, under the shared library classification of specifying, add a service library, and under service library, add a version, and fill in relevant attribute, if not issuing for the first time, in the service library of specifying, add this redaction, and fill in relevant attribute.
The web administration of service
This module is inquired about the service that enterprise is developed.
Code line creates
Inquiry service
Service for checking credentials dependence
Show service dependence
Service compilation and packing
Service is issued
1. code line creates
In the time that project is issued, need to set up separately a code line to the version of issuing, after setting up, the service in this code line can independently be safeguarded, and issue.And the establishment of code line is in order to create a set of different service based on code line.
Its step is as follows: a selected code line.Specify a new code line: the name of code line, the position of code line in version control server.Click " confirmation ", system will be done following work: for new code line creates a new classification; The all categories that old code line is comprised copies portion according to new code line, and the attribute of classification copies equally simultaneously, but will carry out correspondence amendment according to new code line in the process copying; All services that old code line is comprised copy portion according to the new code line classification of correspondence, meanwhile, the attribute of service, the data such as method all will copy; Call Version Control service, for example svn takes out all codes from old code line; All Code copyings are arrived to new code line position; Revise all configuration files: service area configuration file, project profile, service profiles, by file to service type, service quote service type and the service pointed under new code line; Call Version Control service, for example svn, is submitted to version control server by new code line.
2. inquiry service
According to certain condition, inquire about corresponding service, and the relevant information of service.
3. service for checking credentials dependence
To a service or one group of service, verify that whether its dependence is complete, consistency whether.Dependence comprises that jdk relies on, shared library relies on, other serve dependence.
4. show service dependence
To the service of an appointment, in the mode of figure, show a complete dependence graph, be included in upstream and downstream dependency chain the complete dependence of all services, shared library.
5. service compilation and packing
To the service of an appointment, realize compiling packing function.
This function comprises following steps: from service definition database, obtain the relation between this service and version control server.From version control server, obtain up-to-date code.From service definition database, obtain the dependence of this service to shared library.From version control server, obtain the shared library needing.From service definition database, obtain the dependence of this service to other services.Whether the service that checks this dependence packs, if not packing, to this service recursive call compiling, packing function.The services package of shared library, dependence is put into classpath, the source code of this service is compiled.By the class after compiling, be packaged into different bags, such as client bag, javadoc bag, service realize bag etc.
6. service is issued
Complete at service development, and after its dependence of empirical tests.If this service can be accessed by other products in company, can select to issue this and serve to shared library.
The issue of three kinds of COS is issued in service:
A. public service is issued: public service is passive service, and client needs all codes could realize sharing of public service.
B. instrument service is issued: instrument service is passive service, and client needs sharing of all code ability implementation tool services.
C. business service is issued: business service is to take the initiative in offering a hand, and client only needs the bag that client is relevant just can realize sharing of business service.
Public service is issued and is comprised following steps:
1) check whether other services that this public service directly relies on issue, if do not issued, must first issue other services that public service relies on, and exit issuing process.
2) check whether this public service issued before;
If issued, identify as the shared library of this public service in order to the shared library mark having;
If do not issued, in shared library, select the shared library classification under this service, if this classification exists, directly select it.Otherwise, create it
In the shared library classification of specifying, create a shared library mark, and identify as the shared library of this public service using this shared library mark.
3) under the shared library mark finding, the shared library that creates a concrete version for this public service identifies.
4) service of specifying is packed.
5) pass to concrete version shared library and be identified in version control server corresponding position wrapping.
6) by information reproduction relevant services package to service shared library in, comprise attribute information, method of servicing information, Dependency Specification etc.
Instrument service is issued and is comprised following steps:
1) check whether other services that this instrument service directly relies on issue, if do not issued, other services that necessary first publishing tool service relies on, and exit issuing process.
2) check whether this instrument service issued before;
If issued, identify as the shared library of this instrument service in order to the shared library mark having;
If do not issued, in shared library, select the shared library classification under this service, if this classification exists, directly select it.Otherwise, create it
In the shared library classification of specifying, create a shared library mark, and identify as the shared library of this public service using this shared library mark.
3), under the shared library mark finding, be the shared library mark of a concrete version of this instrument service-creation.
4) service of specifying is packed.
5) pass to concrete version shared library and be identified in version control server corresponding position wrapping.
6) by information reproduction relevant services package to service shared library in.
Business service is issued and is comprised following steps:
1) check whether this business service was issued before;
If issued, identify as the shared library of this business service in order to the shared library mark having;
If do not issued, in shared library, select the shared library classification under this service, if this classification exists, directly select it, otherwise, create it;
In the shared library classification of specifying, create a shared library mark, and identify as the shared library of this public service using this shared library mark.
2) under the shared library mark finding, the shared library that creates a concrete version for this business service identifies.
3) service of specifying is packed.
4) client associated packet is uploaded to concrete version shared library and be identified at position corresponding in version control server.
5) by information reproduction relevant services package to service shared library in.
From above-mentioned, the client of the essential information of this definition service of the present invention, the boundary definition service of definition service indicates, and the technical scheme that the dependence of service is verified, owing to having provided the service description information of definition, therefore can realize the fast Development of service, and serve the scheme that relies on checking and can ensure the compatibility of system.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (6)

1. a service development method, is characterized in that, the method comprises:
The essential information of definition service; Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
The border of definition service, is specially: the boundary definition of serving as service segmentation strategy using JAVA bag, specifically realize class by providing, and define a service boundaries interface, for serving the class, configuration file and the property file definition border that comprise;
The client of definition service indicates; The mode that the client of service indicates for utilizing java to explain indicates the class of being used by client;
Dependence to service is verified;
Wherein, the described dependence to service is verified as: to service with and whether the version of all other services, shared library and the JDK that are relied on consistent or compatibility is verified;
The dependence of service is verified specifically and comprised: the checking of JDK version conflict, service release conflict checking, the checking of shared library version conflict;
The border of described definition service comprises:
Leave the source code of all services and test code in identical position;
Each service has an independent JAVA bag, this JAVA bag with and the attached bag all source codes and the test code that comprise this service;
Between the JAVA bag of each service, walk abreast, do not have nest relation;
The test data of each service, resource and configuration file are existed in different subdirectories.
2. method according to claim 1, is characterized in that,
The data structure of described service type information is: service type sign, service class name, service type are described, father's service type indicates, service type sequence number;
The data structure of described service type attribute information is: service type sign, Property Name, service type sequence number, attribute type, property value;
The data structure of described information on services is: the compliant Version this shop of service sign, service type sign, service name, service describing, service interface metadata, service release, minimum, COS, service state, founder, creation-time, last issuing time;
The data structure of described Service Properties information is: service sign, Property Name, attribute type, property value;
The data structure of described method of servicing information is: service indicates, method of servicing is signed, method of servicing is described, whether service is out-of-date;
Described service Dependency Specification comprises: the shared library Dependency Specification of service and the Dependency Specification of service to other service; Wherein, the data structure of the shared library Dependency Specification of service is: the shared library of the particular version that the shared library that service indicates, relies on indicates, relies on indicates; The data structure of the Dependency Specification of service to other service is: the service that service indicates, relies on indicates, relies on the version number of service.
3. according to the method described in any one in claim 1 to 2, it is characterized in that, the method further comprises:
The file of JDK is uploaded to the assigned address of version control server, the file of shared library is uploaded under the deposit position of the corresponding shared library classification in version control server;
The descriptor of JDK is saved in information database; Wherein, the descriptor of JDK comprises: the sign of JDK and the JDK deposit position on version control server;
Shared library descriptor and shared library Dependency Specification are saved in information database;
The descriptor of described shared library comprises: the fileinfo that the shared library information of the classification information of shared library, shared library information, concrete version, the shared library of concrete version comprise, the attribute information of concrete version shared library; Wherein in the classification information of shared library, comprise the positional information of shared library in version control server;
The Dependency Specification of described shared library comprises: the storehouse of the shared library that the storehouse of concrete version shared library indicates and relied on indicates;
In the process of service development, in the time that needs obtain appointment JDK, arrive first in information database and search corresponding descriptor, obtain the file of this appointment JDK from version control server according to descriptor;
In the process of service development, in the time that needs obtain appointment shared library, arrive first and in information database, search corresponding shared library descriptor and shared library Dependency Specification, obtain the file of this appointment shared library according to shared library descriptor from version control server, obtain the file of other bag being relied on by this appointment shared library according to shared library Dependency Specification.
4. method according to claim 3, is characterized in that, in the process of this service development, and operating room, project, service, JAVA bag for developing instrument, four layers provide exploitation view.
5. a service development system, is characterized in that, this system comprises: service development center, version control server, information database, wherein:
Service development center, indicates for the essential information, the border of service and the client of service that define service, and the dependence of service is verified;
Wherein, the essential information of service comprises: service type information, service type attribute information, information on services, Service Properties information, method of servicing information, service Dependency Specification;
The border of definition service, is specially: the boundary definition of serving as service segmentation strategy using JAVA bag, specifically realize class by providing, and define a service boundaries interface, for serving the class, configuration file and the property file definition border that comprise;
The mode that the client of service indicates for utilizing java to explain indicates the class of being used by client;
Whether service development center, verify for or compatibility consistent to the version of all other services, shared library and the JDK that serve with and relied on, specifically comprises: the checking of JDK version conflict, service release conflict checking, the checking of shared library version conflict;
Version control server, for the code of the service of preserving and the issue bag of service;
Information database, for the essential information of the service of preserving;
Wherein, service development center, for leaving the source code of all services and test code in the identical position of version control server; Be used to each service to set up an independent JAVA bag, this JAVA bag with and the attached bag all source codes and the test code that comprise this service, between the JAVA bag of each service, walk abreast, there is not nest relation; The test data of each service, resource and configuration file are kept at respectively in the different subdirectory in version control server.
6. system according to claim 5, is characterized in that, this system further comprises: Access Management Access center;
Version control server, is further used for preserving JDK in the assigned address of self, and in the assigned address of self, category is preserved shared library;
Information database, the descriptor that is further used for preserving JDK, and the descriptor of shared library and the Dependency Specification of shared library;
Wherein, the descriptor of JDK comprises: the sign of JDK and the JDK deposit position on version control server; The descriptor of described shared library comprises: the fileinfo that the shared library information of the classification information of shared library, shared library information, concrete version, the shared library of concrete version comprise, the attribute information of concrete version shared library; Wherein in the classification information of shared library, comprise the positional information of shared library in version control server; The Dependency Specification of described shared library comprises: the storehouse of the shared library that the storehouse of shared library indicates and relied on indicates;
Access Management Access center, while specifying JDK, arrives first in information database and searches corresponding descriptor for obtaining at needs, obtains the file of this appointment JDK according to descriptor from version control server; While specifying shared library for obtaining at needs, arrive first and in information database, search corresponding shared library descriptor and shared library Dependency Specification, obtain the file of this appointment shared library according to shared library descriptor from version control server, obtain the file of other bag being relied on by this appointment shared library according to shared library Dependency Specification;
Described service development center, specifies JDK or specifies shared library for obtaining from Access Management Access center.
CN201110194201.6A 2011-07-12 2011-07-12 Service development method and system Active CN102325153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110194201.6A CN102325153B (en) 2011-07-12 2011-07-12 Service development method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110194201.6A CN102325153B (en) 2011-07-12 2011-07-12 Service development method and system

Publications (2)

Publication Number Publication Date
CN102325153A CN102325153A (en) 2012-01-18
CN102325153B true CN102325153B (en) 2014-08-06

Family

ID=45452822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110194201.6A Active CN102325153B (en) 2011-07-12 2011-07-12 Service development method and system

Country Status (1)

Country Link
CN (1) CN102325153B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708008B (en) * 2012-04-12 2014-05-21 福建联迪商用设备有限公司 Implementation method of linking download strategy
CN102929630A (en) * 2012-10-31 2013-02-13 中标软件有限公司 Method and system for code management based on distributed collaborative development environment
CN104519103B (en) * 2013-09-30 2018-10-26 腾讯科技(北京)有限公司 Synchronization processing method, server and the related system of network data
CN103679390B (en) * 2013-12-26 2018-02-13 北京奇虎科技有限公司 The background test method and device of configuration system
CN103761103A (en) * 2014-01-26 2014-04-30 曙光云计算技术有限公司 Method and system for defining and instantiating cloud computing platform service
CN103970899A (en) * 2014-05-27 2014-08-06 重庆大学 Service-oriented metadata relevance extraction management method and management system
CN106548331B (en) * 2015-09-21 2020-08-07 阿里巴巴集团控股有限公司 Method and device for determining release sequence
CN105867990A (en) * 2015-11-20 2016-08-17 乐视云计算有限公司 Software development integration method and device thereof
CN108228229B (en) * 2016-12-19 2021-04-13 深圳业拓讯通信科技有限公司 Method and system for managing Maven dependence
CN106909379B (en) * 2017-02-22 2019-11-12 南京国电南自电网自动化有限公司 The cutting and selection method of protective relaying device resource distribution file
CN107038036A (en) * 2017-05-02 2017-08-11 山东浪潮通软信息科技有限公司 A kind of implementation method of SaaS delivery of services platform
CN107707625A (en) * 2017-09-05 2018-02-16 江苏电力信息技术有限公司 Foreground resource based on Maven is packed and carries out version management and the method used
CN107769974B (en) * 2017-10-30 2020-08-21 浪潮通用软件有限公司 Service publishing method and device
CN109885290B (en) * 2019-01-09 2022-07-12 远光软件股份有限公司 Application program service description information generation and release method, device and storage medium
CN110865802A (en) * 2019-11-28 2020-03-06 山东浪潮商用系统有限公司 Tax interface rapid development method based on micro-service architecture
CN111177266B (en) * 2019-12-27 2024-03-22 广州米茄科技有限公司 Data synchronization system in CG production
CN112883344A (en) * 2021-02-03 2021-06-01 中国工商银行股份有限公司 Code operation authority control method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1678990A (en) * 2002-08-26 2005-10-05 计算机联合思想公司 Web services apparatus and methods
CN101331478A (en) * 2005-12-15 2008-12-24 微软公司 Conforming web services to an updated contract

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8160992B2 (en) * 2008-05-15 2012-04-17 Xerox Corporation System and method for selecting a package structural design

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1678990A (en) * 2002-08-26 2005-10-05 计算机联合思想公司 Web services apparatus and methods
CN101331478A (en) * 2005-12-15 2008-12-24 微软公司 Conforming web services to an updated contract

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
侯丽珊等.需求驱动的Web服务建模及其验证:一个基于本体的方法.《中国科学 E辑 信息科学》.2006,第36卷(第10期),第1189-1219页. *
李磊等.Web服务兼容性及其验证算法.《中国通信学会第六届学术年会论文集(上)》.2009, *

Also Published As

Publication number Publication date
CN102325153A (en) 2012-01-18

Similar Documents

Publication Publication Date Title
CN102325153B (en) Service development method and system
CN102253999B (en) Verification method for service dependency
US7673282B2 (en) Enterprise information unification
CN101563671B (en) Bridging human machine interface technologies in process automation and information management environment
US7984417B2 (en) Meta-model information associated with an enterprise portal
US7577934B2 (en) Framework for modeling and providing runtime behavior for business software applications
US9256413B2 (en) Automatic identification of services
US7730446B2 (en) Software business process model
Luján-Mora et al. Multidimensional modeling with UML package diagrams
CN101617292B (en) Producer graph oriented programming and execution
US5864875A (en) Data management system for problems, releases and parts
US8954480B2 (en) End-to-end interoperability and workflows from building architecture design to one or more simulations
US20100001834A1 (en) System and method for a message registry and message handling in a service -oriented business framework
US20030023450A1 (en) Modeling tool for electronic services and associated methods and business
US8762322B2 (en) Distributed order orchestration system with extensible flex field support
US20090006987A1 (en) Visual design tools for portal content creation
CN101329629B (en) Business level method, apparatus and system for managing service information
CN102222278A (en) Operation process customizing method and device
JP2004535021A (en) Managing reusable software assets
CN102341781A (en) Software test bed generation
Wally et al. Entwining plant engineering data and ERP information: Vertical integration with AutomationML and ISA-95
CN106022727B (en) Enterprise supply chain management method
CN102393845B (en) Shared library management method and system
JPWO2011118003A1 (en) Web application construction system, web application construction method, web application construction program, and recording medium recording web application construction program
CN103069382A (en) Migrating artifacts between service-oriented architecture repositories

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.