A kind of method and apparatus of supporting multi-tenant data and service customization operation
Technical field
The present invention relates to SaaS custom technology field, particularly a kind of method and apparatus of supporting multi-tenant data and service customization operation.
Background technology
At present under many tenants system architecture, be that a plurality of tenants share same application example, but since between the tenant because of the difference of business side emphasis, operation rule etc., the difference that has caused individual demand, this just need be according to tenant's individual demand to SaaS (Software-as-a-service, software is promptly served) to use and carry out personalized customization, this is comprising the customization of the page, data, service etc.PaaS (Platform as a Service, platform is promptly served) provide easily SaaS exploitation by the Internet to a plurality of independent software vendors based on the cloud computing technology, use, information-based service such as calculating, the SaaS application deployment is behind the PaaS platform, the PaaS platform need provide the customization capability of application for it, and the processing of self-defining data therein, the customize services response is a difficult point in the personalized customization technology, implementation in the past is the service of allocating field and field correspondence in advance, the preassignment field is exactly the field that expansion in advance distributes some in table, the preassignment service is exactly the service of handling these extended fields in the service-Engine deploy, when the tenant needs extended field, just can use these pre-assigned fields, growth data also can transmit by predetermined service when the user used, but problem is also following, preallocated field is represented any implication to current tenant, same preallocated field is represented any implication again to different tenants, if integer field of a preassignment in the table, does and what if the tenant need two shaping fields? if the Service Design of preassignment field and these fields of processing will cause the expansion of database and the coincidence of same function service too much, also may cause a large amount of insignificant fields, form the waste of memory space.Simultaneously in the process of the processing of in the past self-defining data, customize services response, so because field all is the preallocated things consistency that does not need to consider service response with service.
Summary of the invention
Purpose of the present invention provides a kind of method and apparatus of supporting multi-tenant data and service customization operation exactly for addressing the above problem, and to improve the customizability of whole software, makes consistent affairs better, thereby increases work efficiency.
For achieving the above object, the present invention adopts following technical scheme:
A kind of method of supporting multi-tenant data and service customization operation, it may further comprise the steps:
A. event source (comprising UI, other business service etc.) tissue SaaS business service call parameters;
B.SaaS business service engine is resolved the parameter of input, obtain transaction management information according to input parameter, judge whether it is once newly to call by transaction information, if not newly calling and the benchmark service services transaction is designated success and then jumps to step D and directly call the tenant customization business service; If for once new service call or benchmark service service identifiers for not successfully then continue step C and call the benchmark service service;
C. come organizational standard business service call parameters according to the service call parameter list in the steps A, simultaneously carry out business service according to context, WSDL address and operation and select, shine upon, call, calling after finishing is success by the transaction unit with benchmark service services transaction identification renewal;
D. from database, obtain event source list information and table primary key column information, with the SaaS business service call parameters context in these information and the steps A, the composition tenant customization business service call parameters of going into to join to tabulate, simultaneously according to benchmark service service name and transaction information carry out the tenant customization business service selection, call, call and by the transaction unit tenant customization business service Transaction Identifier be updated to successfully after finishing;
E. the return results of benchmark service service and tenant customization SaaS business service is integrated;
F. the SaaS business service return results after will integrating returns to event source.
The business service call parameters of event source tissue comprises context information, business service definition address information, business service operation, original business service parameter and event source ID in the described steps A.
The standard business service is that the primitive event source is known and have the service of intrinsic call relation among the described step C, and it is made up of the business that some event sources need call.
The tenant customization business service is provided by SaaS business service engine among the described step D, has comprised inquiry, increase, modification and deletion business operation, the customization data in its main processing events source in the custom tabular.
A kind of support multi-tenant data and service customization operation method device, this device comprises:
A transaction unit, it is responsible for the coordination of all affairs in the SaaS business service engine and guarantees in whole transaction process to occur failure or guarantee the change of integrality and all failure affairs of rollback of database when unusual, whether the transaction unit is also successfully noted basic service service, calling of the service of activating business simultaneously, has guaranteed the consistent affairs of standards service and tenant customization service, business unit;
A basic service call unit, it is responsible for organizing the input parameter of basic service service, carries out the basic service services selection, shines upon, calls according to context, WSDL address and operation simultaneously; An expansion service call unit, it is responsible for coming organizational parameter invoke extensions business service according to transaction information, the expansion service call unit obtains event source list information and table primary key column information from database, with these information and context, go into the ginseng tabulation and form tenant customization business service call parameters, simultaneously according to benchmark service service name and transaction information carry out the tenant customization business service selection, call;
Service call is integral unit as a result, and it is responsible for the basic service service of will call and the result of the service of activating business integrates.
The invention has the beneficial effects as follows:
1, provide a kind of method and apparatus of supporting the operation of multi-tenant data and service customization, it is random self-defined to make that the tenant can carry out data, has improved the customizability of SaaS software;
2. solved the response problem of custom service service;
3. guaranteed the consistent affairs of benchmark service service and tenant customization business service, business unit;
4. realize separating of data customization technology and service logic exploitation, made the developer more be absorbed in the exploitation of service logic, improved the customization capability of tenant data, improved the ability that changes as required.
Description of drawings
Fig. 1 is a kind of method overview flow chart of supporting multi-tenant data and service customization operation;
Fig. 2 is a kind of structure drawing of device of supporting multi-tenant data and service customization operation.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing and embodiment.
Among Fig. 1, a kind of method of supporting multi-tenant data and service customization operation may further comprise the steps:
Step 101, by event source organization service call parameters, comprise context information, WSDL address, service operations, original service parameter and event source ID in the call parameters;
Step 102, service-Engine are resolved the parameter of input, obtain transaction management information according to going into ginseng, judge whether it is a New Transaction according to affairs, if not New Transaction and basic service Transaction Identifier is successfully then to jump to step 104, if New Transaction or basic service Transaction Identifier are that success then continues step 103;
Step 103, organize the basic service call parameters according to the service call parameter list in the step 101, carry out business service according to context, WSDL address and operation simultaneously and select, shine upon, judge whether it belongs to third party's service, definite address of service of finally calling, if belong to third party service then call third party's service operations, if belong to business service then call the corresponding business service operation;
Step 104, the business service result who returns is resolved, and the basic service Transaction Identifier upgraded, judge whether to transfer expansion service by Naming conventions and transaction information, step 106 is then jumped in the success of invoke extensions service and expansion service Transaction Identifier if desired, invoke extensions service and expansion service Transaction Identifier are not then continuation of success if desired, from metadata engine, obtain tabulation of page customization metadata information and table primary key column information, utilize the page customization metadata, service call parameter c ontext in table primary key column metadata and the step 101, going into ginseng tabulation and business service return results organizes, be combined into the expansion service call parameters, the expansion service name that identification will be called according to Naming conventions is served according to expansion service name invoke extensions;
Step 105, having called and upgraded the expansion service Transaction Identifier after the expansion service, is modulated usefulness with the expansion service Transaction Identifier, and the return results of basic service service and the return results of expansion service are integrated;
Step 106, all operations is write in the daily record, the service result after integrating is returned to event source.
Among Fig. 2, a kind of device of supporting multi-tenant data and service customization operation, this device comprises:
Transaction unit 201, be responsible for all affairs in the SaaS business service engine coordination, and can guarantee in whole transaction process, to occur failure or guarantee the change of integrality and all failure affairs of rollback of database when unusual, the transaction unit also needs whether calling of basic service call unit 203, expansion service call unit 202 is successfully noted simultaneously;
Basic service call unit 202 is responsible for organizing the input parameter of basic service service and is called the basic service service according to parameter;
Expansion service call unit 203 is responsible for the invoke extensions business service;
Call integral unit 204 as a result, the responsible basic service call unit 203 that will call and the result of expansion service call unit 202 integrate;