Invention content
Based on this, it is necessary to which the technical issues of being directed to data access service underaction provides a kind of flexibly configurable
Integration across database interactive service platform.
A kind of interactive service platform of integration across database, including the data Layer of database data information is provided, carries RESTful
(Representational State Transfer, the transfer of performance layer state) API (Application Programming
Interface, application programming interface) service layer, carry lightweight service bus bus layer and application layer;
The data information is sent to the service layer by the data Layer, and the application layer receives access request signal,
And the access request signal is sent to the bus layer, the lightweight service bus of the bus layer, according to the access
Request signal, the data information received to the preset information on services of the bus layer and the service layer carry out layout management,
Obtain layout as a result, and the layout result is exported to the application layer, obtain access result.
The bus layer includes that service container module, Message routing module and flow are compiled in one of the embodiments,
Arrange module;
The service container module carries out sub-services registration, and the sub-services information of registration is sent to the message and is route
Module, the message routing determine the transfer route and rule of the data information obtained according to the sub-services information, and
According to the transfer route and the regular data information transfer by acquisition to the service container module, the flow layout
Module according to the access request signal, believe by the data of the sub-services and reception to the service container Module registers
Breath carries out layout, obtains layout result.
The service container module includes service list unit in one of the embodiments,;
The sub-services information registering carries out the sub-services in the service list unit, the service list unit
Management, when the corresponding access service of the access request signal occurs change or increases, by modifying to service list
Or addition registers the sub-services and completes to access.
The service container module includes accessing service registry unit, sub-services determination list in one of the embodiments,
Member and data information determination unit;
The access service registry unit is registered corresponding access according to the access request signal and is serviced, the sub-services
Determination unit is serviced according to the access, is searched sub-services and is selected, and determines that required sub-services, data information determine
Unit determines corresponding with required sub-services data information, the flow orchestration module to the required sub-services with
And the corresponding data information of the required sub-services carries out layout, obtains layout result.
The bus layer further includes message mechanism determining module in one of the embodiments,;
The message mechanism determining module determines data handler system, and according to the data handler system,
The layout result is exported to the application layer.
The data Layer provides multiple databases in one of the embodiments, and the multiple database is sealed respectively
Dress is the data cell that can independently call.
The RESTful API of the service layer include mark unit and access unit in one of the embodiments,;
The mark unit makes the data cell carry URI (Uniform Resource Identifier, unified money
Source identifies) it identifies, the access unit accesses the data cell for carrying URI marks, obtains according to the access request signal
To target data information.
The RESTful API of the service layer include operating unit in one of the embodiments,;
The operating unit at least one of is increased to the target data information, reads, changes and delete
Operation.
In one of the embodiments, the database include mysql, oracle, cache db, document db with
And at least one of mongo db types.
The application layer realizes data service in one of the embodiments, in application service and displaying service at least
A kind of service.
The interactive service platform of above-mentioned integration across database, the data information of database is provided by data Layer, and service layer uses
RESTful API realize the access to data information so that normalization, safety, flexibility are improved, and bus layer passes through profit
It can provide the loose coupling to system integrated feature with lightweight service bus, realize and the service procedure of service layer is believed with data
The layout management of breath so that the access more convenient and efficient between each serviced component and database avoids demand for services variation
When need overlapping development new data service use drawback, and access request signal is received by application layer and service is provided answers
With to realize, efficient, specification, safety data interaction accesses service between a variety of different types of databases, meets business
Rapid deployment and flexible configuration, have good applicability.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Since traditional SOAP (Simple Object Access protocol, Simple Object Access Protocol) method is wanted
Follow a large amount of agreement and standard, this complicated, the inefficiency and heavyweight service for being difficult to change has been unable to meet quick industry
The exploitation demand of the certain functions of business system.By further investigation, a kind of matching based on Restful API design theories is devised
Set formula integration across database interactive service platform, efficiently, specification, safely under complicated internet or distributed network environment, it is real
Data interaction accesses between existing a variety of different types of databases.
As shown in Figure 1, a kind of interactive service platform of integration across database, including the data Layer of database data information is provided
100, it carries the service layer 200 of RESTful API220, carry the bus layer 300 and application layer of lightweight service bus 310
400;
Data information is sent to service layer 200 by data Layer 100, and application layer 400 receives access request signal, and will access
Request signal is sent to bus layer 300, the lightweight service bus 310 of bus layer 300, according to access request signal, to bus
The data information that 300 preset information on services of layer and service layer 200 receive carries out layout management, obtains layout as a result, and will
Layout result is exported to application layer 400, obtains accessing result.
Interactive service platform architecture is divided into data Layer 100, service layer 200, bus layer 300 and application layer from bottom to top
400.Data Layer 100 is the underlying basis as entire platform architecture, provides the data information being scattered in each application subsystem.
Service layer 200 is realized using RESTful API220 to 100 distributed data source of data Layer by creating RESTful services
Access, wherein REST refers to the constraints and principle of one group of framework, meet these constraintss and principle application program or
Design is exactly RESTful, and RESTfulAPI220 is that the API design of internet application is theoretical, and RESTful services pass through mark
Accurate grammer carries out unified presentation to simplify system architecture to resource, is obtained to the abstract of resource of multi-source DYNAMIC DISTRIBUTION characteristic
It takes and is very suitable for.The lightweight service bus 310 of bus layer 300 refers to the service for having the characteristics that the loose coupling to system and integrating
Bus, is the key component for building database interactive service platform, and bus layer 300 is called according to access request signal by combining
It realizes the layout, management and monitoring to service procedure, the integrated demand in distributed environment can be met.Application layer as top layer
400 receive access request signal and according to the offer of bus layer 300 as a result, available data query, data displaying and intelligence
Using etc. be served by.
The interactive service platform of above-mentioned integration across database provides the data information of database, service layer by data Layer 100
200 realize the access to data information using RESTful API220 so that normalization, safety, flexibility are improved, always
Line layer 300 can provide the loose coupling to system integrated feature by using lightweight service bus 310, realize to service layer
200 service procedure and the layout management of data information so that the more convenient height of access between each serviced component and database
Effect, avoids the use drawback for the data service for needing overlapping development new when demand for services variation, and is received and visited by application layer 400
It asks request signal and provides and be served by, to realize efficient, specification, the data of safety between a variety of different types of databases
Interactive access service meets the rapid deployment and flexible configuration of business, has good applicability.
As shown in Fig. 2, the lightweight service bus 310 of bus layer 300 includes service container in one of the embodiments,
Module 320, Message routing module 340 and flow orchestration module 360, service container module 320 carry out sub-services registration, and will
The sub-services information of registration is sent to Message routing module 340, and Message routing module 340 determines acquisition according to sub-services information
The transfer route of data information and rule, and according to transfer route and the regular data information transfer by acquisition to service container mould
Block 320, flow orchestration module 360 is according to access request signal, to the number of sub-services and reception that service container module 320 is registered
It is believed that breath carries out layout, layout result is obtained.
As the core component of information integrated platform, bus layer 300 is formed a connecting link, and is the business processing of entire platform
Maincenter.Lightweight service bus 310 provide one group of abundant function with enable management and monitor application program between interaction,
It is integrated between the application layer and service layer of application system, is connected by various communications protocols and integrates the component in different system
It is mapped as servicing, completes the interoperability between service.Service container module 320 refers to that the container of offer building high performance and scalability is answered
With the module of management service, registration and management for carrying out sub-services, are one of important components of service bus, can encapsulate use
Family application software and own foundation service.Message routing module 340 refers to being directed to command messages, carries out transmission path selection and disappears
Cease the processing module sent.Flow orchestration module 360 refers to being carried out again according to access request to data information and application service
The module of layout.In interactive service platform, each sub-services are registered according to corresponding application of function in service container, when total
When line receives the access request from application layer 400, service container module 320 finds request and is selected according to list corresponding
Sub-services.Message routing module 340 receives the data information of data Layer 100, and the sub-services information analysis Service delivery registered
The step of and establish the transmission circuit and rule of data information, the final transmittance process for realizing message, flow orchestration module 360 is right
Combination, reuse and the layout of data and service etc., reach final business integration.
As shown in figure 3, in one embodiment, service container module 320 includes service list unit 322, sub-services letter
Breath is registered in service list unit 322, and service list unit 322 is managed sub-services, when access request signal is corresponding
When the service of access occurs change or increases, complete to access by modifying to service list or adding registration sub-services.
Service list unit 322 refers to the unit for the numerous sub-services for being integrated with registration, by establishing service list, is realized
Optimum management to sub-services.There are corresponding access to service for access request signal, when the corresponding access of access request signal
When service occurs change or increases, it can be completed by the way that registration sub-services are modified or added to service list, simplify behaviour
Make flow.The service logic of system, flow and advanced application is defined and decomposition is encapsulated as servicing, it is a certain specific realizing
In application, bus layer 300 excessively reaches the combination, reuse and layout of data service etc. final industry according to flow orchestration engine
Business is integrated, and the advanced application of application layer is realized, and realize the configuration management of Restful API, when the business of system becomes
When more or increasing, business demand can be met by changing service list or adding the new service of registration, system is flexible, can expand
Exhibition.
In one embodiment, service container module 320 includes accessing service registry unit 324, sub-services determination unit
326 and data information determination unit 328, it accesses service registry unit 324 and registers corresponding access according to access request signal
Service, sub-services determination unit 326 are searched sub-services and are selected, determine required sub-services according to service is accessed, number
Determine that data information corresponding with required sub-services, flow orchestration module 360 take required son according to information determination unit 328
Business and the corresponding data information of required sub-services carry out layout, obtain layout result.
It refers to working as to detect that current access request signal does not have corresponding information on services to access service registry unit 324
When, the unit of service registration is carried out to current access request signal, to complete current access service, and ought be next time
When there is same access request signal, the operating time can be saved, using more directly to getting corresponding information on services
It is convenient.Access request signal there are diversity, but complete to access and be realized generally by the combination of multiple sub-services, son
Service determination unit 326 can be serviced according to accessing, and the sub-services in service list are searched and selected, are determined required
Sub-services, sub-services by data information determination unit 328 in requisition for data information, being determined corresponding with required sub-services
Data information, flow orchestration module 360 can be by flow orchestration engines to required sub-services and required sub-services pair
The data information answered carries out layout, obtains layout result and is accessed to realize.
In one embodiment, the lightweight service bus 310 of bus layer 300 further includes message mechanism determining module 380,
Message mechanism determining module 380 determines data handler system, and according to data handler system, layout result is exported
To application layer 400.
Interactive access platform provides subscription or publication, and 2 groups of message processing facilities of request or reply, subscribes to or issues
Refer to being asked according to subscription, according to preset time or period, issue the treatment mechanism of corresponding message, there is regularity, ask
Ask or reply refer in the form of question-response, according to request service content, reply the treatment mechanism of corresponding message, have with
Machine.Message mechanism determining module 380 determines data handler system, and according to data handler system, by layout knot
Fruit exports to application layer 400, is shown to user and accesses result.
In one embodiment, data Layer 100 provides multiple databases, and multiple databases are encapsulated as respectively can be independent
The data cell of calling.
Since the treatment mechanism of data in different formats is different, to reduce the coupled relation between servicing and providing the calling of standard
Database business logic is encapsulated as functional unit that is discrete, can independently calling by interface by data Layer 100, to divide
The data service of loose couplings is built in cloth environment.
In one of the embodiments, database include mysql, oracle, cache db, document db and
At least one of mongo db types.
By different types of database, the range of interactive access is expanded, improves access convenient degree, is met a variety of
The interactive access of integration across database is optimized in requirements for access.
In one embodiment, the RESTful API220 of service layer 200 include identifying unit 222 and access unit 224,
Mark unit 222 makes data cell carry URI marks, and access unit 224 accesses according to access request signal and carries URI marks
Data cell, obtain target data information.
RESTful services will need the things operated, relationship and operation flow to be abstracted as money in 100 data cell of data Layer
Source, while unique resource identifier (URI) is assigned for each resource, it is handled and is transmitted by hypertext transfer protocol (HTTP)
Resource status.It identifies unit 222 and unified presentation is carried out to resource by the grammer of standard, then visited by access unit 224
It asks, simplifies system architecture, the abstract acquisition of the resource of multi-source DYNAMIC DISTRIBUTION characteristic is very suitable for, service layer 200 passes through wound
RESTful services are built to realize the access to bottom distributed data source, RESTful services are simple and direct flexibly, can directly know by URI
Other locating resource avoids response process cumbersome when accessing resource, more when needing to provide more multi-connection using finite bandwidth
Have efficiency, make system that there is addressability, connectivity, reduce the coupling with other distributed components, there is high scalability
And flexibility, it is suitble to the system of construction Loosely coupled, realizes quick response.
In one embodiment, the RESTful API220 of service layer 200 include operating unit 226, and operating unit 226 is right
Target data information at least one of is increased, reads, changes and delete operation.
According to the actual needs of access request, target data information is increased, is read, is changed or delete operation,
Data can further be screened, improves the accuracy of the service of access.Data are being increased, are being read, are being changed, are being deleted
When except equal operating, request data is placed in HTTP (HyperText Transfer Protocol, hypertext transfer protocol) document master
Body is sent to server by URI and is asked, after server is disposed according to method parameter, by result with hypertext markup language
It says the formats (JavaScript Object Notation, JS object tag) such as HTML or XML or JSON, is passed back and answered by URI
With layer.RestfulAPI services are simple and direct efficiently, lower coupling, particularly suitable in platform to the access of data, once data source occurs
Change or increase, simple modification need to be only carried out to URI can be, it can be achieved that the quick response serviced.
In one embodiment, application layer 400 realizes data service, at least one of application service and displaying service clothes
Business.
Data service refers to that the extraction to data is serviced with inquiry, and application service refers to the clothes operated to data information
Business, displaying service refers to the service that data information is presented.According to actual demand, different service types is selected, is met a variety of
Interactive access demand improves user's use feeling.
As shown in figure 4, in an application example, interactive access platform architecture is suitable for enterprise database, interactive access
Platform is divided into data Layer, service layer, bus layer and application layer from bottom to top, and data Layer provides enterprise database and includes
Mysql, oracle, cache db, document db, mongo db etc., and by each database be encapsulated as it is discrete, can be independent
The functional unit of calling carries out necessary parsing and data conversion, the clothes being connect with data Layer in database manipulation to data
Business layer is provided with Restful API, it is possible to provide Restful is serviced, it will be understood that SOAP/SWDL services can also be set simultaneously,
In conjunction with two kinds of service types, preferably realize interactive access, RESTful by the functional units of URI Direct Recognition positioning packages,
Bus layer includes lightweight service bus, and lightweight service bus is to build the key component of database interactive service platform, it
Message routing, coarseness application service and the interoperability between other assemblies are provided, the combination tune to each sub-services is passed through
With the layout, management and monitoring realized to service procedure, the integrated demand in distributed environment can be met.Stream is specifically provided
Thread management and bus service two classes, wherein workflow management include flow layout, flow engine, flow monitoring, service management and
Integrated functionality, bus service include dynamic routing, messenger service, access control, Event Service, message conversion and daily record clothes
Business.As shown in figure 5, specifically, subscription/publication or the processing of request/reply can be used by obtaining message mechanism determination
Mode, message routing can obtain the data information in database by Restful API, and service container is the structure of service bus
One of part can encapsulate user application software and own foundation service.Service list is noted in advance according to corresponding application of function
Volume is in service container, and when bus layer receives the access request signal from application layer, service container is according to access request
Signal inquires service list, can specifically be looked by discovery to the sub-services in service list and selection
It askes, when no corresponding service, can register to realize supplement, and each sub-services can be registered in advance in service list,
And service list can be managed sub-services, according to the sub-services that inquiry is selected, can correspond to and require to look up in database
Data information, message routing according to the sub-services of selection, can formulate the transfer route of data-message and rule, will be corresponding
The sub-services of selection and corresponding data information are compiled in data information transfer to service container, workflow management by visiting demand
Row and monitoring, and layout result is exported to application layer, realize access process.As shown in fig. 6, further, service layer can
Access request needs with the service requester got according to application layer, realize to the increase, reading, modification of data information with
And delete operation, when data increased, read, changed, deleted etc. with operations, request data is placed in HTTP (HyperText
Transfer Protocol, hypertext transfer protocol) document body, it is sent and is asked to server by URI, server foundation
After method parameter is disposed, by result with hypertext markup language HTML (HyperText Markup Language, it is super
Text mark up language) or the formats such as XML (Extensible Markup Language, extensible markup language) or JSON
(JavaScript Object Notation, JS object tag), and application layer is passed back by URI, realize access process.
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
Above example only expresses the several embodiments of the application, the description thereof is more specific and detailed, but can not
Therefore it is interpreted as the limitation to the scope of the claims.It should be pointed out that for those of ordinary skill in the art, not taking off
Under the premise of conceiving from the application, various modifications and improvements can be made, these belong to the protection domain of the application.Cause
This, the protection domain of the application patent should be determined by the appended claims.