CN105721562B - A kind of Heterogeneous service call method based on agency with cooperate with calling system - Google Patents

A kind of Heterogeneous service call method based on agency with cooperate with calling system Download PDF

Info

Publication number
CN105721562B
CN105721562B CN201610058405.XA CN201610058405A CN105721562B CN 105721562 B CN105721562 B CN 105721562B CN 201610058405 A CN201610058405 A CN 201610058405A CN 105721562 B CN105721562 B CN 105721562B
Authority
CN
China
Prior art keywords
service
submodule
heterogeneous
file
osgi
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
CN201610058405.XA
Other languages
Chinese (zh)
Other versions
CN105721562A (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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN201610058405.XA priority Critical patent/CN105721562B/en
Publication of CN105721562A publication Critical patent/CN105721562A/en
Application granted granted Critical
Publication of CN105721562B publication Critical patent/CN105721562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The Heterogeneous service call method that the invention discloses a kind of based on agency with cooperate with calling system.This call method is packaged conversion to two kinds of CORBA, Web Service Heterogeneous services using the thought of agency, generating can realize that the OSGi called act on behalf of Bundle component to Heterogeneous service, to be called using this collaboration calling system to Heterogeneous service and coordinated management.This collaboration calling system mainly includes the parts such as OSGi service management module, the fault-tolerant module of OSGi service, LDAP Heterogeneous service management middleware.The present invention effectively can quickly be found for the Heterogeneous services such as CORBA service, OSGi service, Web service, cooperate with calling, being managed collectively and service monitoring with it is fault-tolerant, to enhance the reusability of left over by history system and Heterogeneous service, overcome the interoperability predicament between Heterogeneous service, improves the utilization efficiency of Heterogeneous service.

Description

A kind of Heterogeneous service call method based on agency with cooperate with calling system
Technical field
The present invention relates to software services and component technology field, relate generally to a kind of Heterogeneous service calling based on agency Method and coordination management system.
Background technique
With gradually going deep into for computer technology research, large quantities of outstanding software technologies play important in the daily work Role.Currently, being based on OSGi (Open Service Gateway Initiative, open service gateway initiative agreement), CORBA (Common Object Request Broker Architecture, Common Object Request Broker Architecture) and Web Heterogeneous service constructed by the technologies such as Service is widely used in every profession and trade.
The industrialization trend of Software Industry makes the software repeated usage thought of Component- Based Development, becomes soft project recent years neck One of the hot spot of domain research.The reusing degree and quality of software can be improved in modularized design, shortens software development cycle, is based on The serviced component of the technologies such as CORBA and Web Service building is widely used, wherein CORBA uses IDL (Interface Description language, interface description language) and middleware Technology, provide independent of platform programming interface and Model;Web Service uses the SOAP independently of platform, and (Simple Object Access Protocol, simple object are visited Ask agreement) protocol communication, it utilizes WSDL (Web Services Description Language, web services definition language) Language unity description service, realizes the modularization serviced between network.
According to the thought of modularized design, Heterogeneous service component, which should can integrate, provides more perfect function Can, but they be as provided by different service provider, different platform, not homologous ray, i.e., service and interface isomerism, lead The difficulty of the integrated multiplexing of Heterogeneous service component is caused.Therefore, when constructing large-scale distributed system, how it is operatively compatible these The Heterogeneous service of left over by history improves software repeated usage degree, reduces development cost, shortens the development cycle, becomes one and important asks Topic.
Currently, the Integrated research of heterogeneous system is mainly based upon SOA thought, Web service technology or ESB bussing technique are utilized It realizes, or is realized using the SOAP communication protocol unrelated with environment, to solve the Interoperability of heterogeneous system.Although these Integrated approach can solve the multiplying question of Heterogeneous service, but be the absence of the description to service metadata, calls and services to user The operation such as inconvenience is brought, and can only be registered, be called to service, the life cycle of service cannot be carried out more detailed Management.
The invention proposes a kind of Heterogeneous service call method and coordination management system based on agency, it is using being based on " SOA in JVM " --- OSGi framework carrys out management service component, realizes the effect of service " plug and play, that is, delete i.e. without ".Operation It is referred to as Bundle in the modular unit in OSGi container, it is by Java Jar file and additional meta data file (MANIFEST.MF) description composition.The present invention passes through the thought of agency, by distributed Heterogeneous service object encapsulation to OSGi In Bundle, the othernesses such as Heterogeneous service different platform, different realization language, distinct interface are effectively shielded, service is allowed to make User can be transparent the long-range Heterogeneous service of access;Meanwhile Heterogeneous service is called in order to facilitate user, the present invention, which uses, has letter LDAP (Lightweight Directory Access Protocol, the light weight catalog access of the advantages that single, efficient, inexpensive Agreement) come describe service metadata.In order to increase the stability of system, the present invention also formulated a set of service quality assessment and Fault-tolerant networks are serviced, once there is the service of operation error, system will start automatically spare serviced component, will effectively guarantee System robust, even running.
Summary of the invention
Present invention is mainly applied to the integrated management of Heterogeneous service, enhance the reusable of left over by history system and Heterogeneous service Property, improve the interoperability and utilization efficiency between Heterogeneous service.In order to realize the above functions, the invention proposes a kind of bases In the Heterogeneous service call method and coordination management system of agency.
The Heterogeneous service refers to by different service provider, different development language, different platform, different operation system Service provided by system.System according to the present invention is mainly for 3 kinds of Heterogeneous services such as CORBA, Web Service, OSGi.
A kind of Heterogeneous service call method based on agency, which comprises the steps of:
Step 1 is compiled automatically in conjunction with information on services provided when registering by the compiler directive of the local cmd and generates the clothes It is engaged in corresponding multiple local Java files;Wherein, CORBA is serviced, it is desirable to provide the idl file of the service utilizes idlj Order automatically generates the corresponding interface document of the service, realizes class file and CORBA telecommunication file;For Web Service, it is desirable to provide the WSDL of the service automatically generates the corresponding interface document of the service, reality using wsimport order Existing class file and Web Service telecommunication file;
Local Java file after step 2, search compiling, obtains service interface file;Wherein, CORBA is serviced, is followed The file to be ended up in the local file that ring finding step 1 generates with Operations.java;For Web Service, parsing WSDL obtains the name attribute of portType node, which is interface name, in the local file that finding step 1 generates with The .java file of interface name name;
Step 3 carries out code wrap to the realization class file generated in step 1, generates a new interface and realizes class text Part, the realization class serve the service registration in step 4;Such realizes the interface class that step 2 is searched, and defines one The local agent object of remote service, the object are the variable of a static initialization, and all interface realizing methods are equal in class By calling the method for the same name of the object to realize;
Step 4, the BundleActivator class file that the service of class file dynamic generation is realized according to interface and interface, Such realizes the start method and stop method for the BundleActivator interface that OSGi is defined, and infuses in start method Volume remote service, destroys the Bundle context object of OSGi framework in stop method;
Step 5 includes according to step 4 BundleActivator class file generated and other system environments, generation Bundle-Version、Bundle-Activator、Bundle-RequiredExecutionEnvironment、Import- The MANIFEST.MF file of the metadata informations such as Package;
Step 6 passes through Ant packaging file tool for step 1 to 5 All Files generated, and Uniform compilation, which is packaged, to be generated Local agent Bundle.
A kind of Heterogeneous service coordination management system, feature include:
Component one, Java Virtual Machine:
Component two, OSGi container assemblies: system core function runs relied on OSGi Felix frame and the frame Under core business module: OSGi service management module and the fault-tolerant module of OSGi service, wherein
OSGi service management module is used for OSGi service and the CORBA service being registered in system and Web The Bundle that acts on behalf of of Service carries out unified life cycle management and supports with cooperateing with to call, and generates submodule comprising service broker Block, service call submodule, service lifecycle management submodule and service quality evaluation submodule;
Service broker generates submodule: generating local agent for the Heterogeneous services resource such as CORBA service and Web Service Bundle;
Service call submodule: for realizing the local Bundle passed through in system to the isomery in system Heterogeneous service pond Service carries out unified call;
Service lifecycle manages submodule: for the life cycle of all Bundle under management system OSGi framework, Bundle and system including OSGi service itself are that CORBA is serviced and what Web Service was automatically generated acts on behalf of Bundle; The module inherits OSGi framework to the relevant interface of Bundle life cycle management, realize to the installation of Bundle in system, Parsing, starting, stop, and update, the unified management of the operations such as unloading;
Service evaluation submodule: using operation datas such as the response times, the time of execution, the rate that runs succeeded of service to isomery Service progress quality evaluation, can rule of thumb or user interest carries out indices scoring, then passes through user and requires to assign Indices weight is given, service quality weighted synthetical evaluation is carried out, so that the quality respectively serviced in user's understanding system is helped, and Foundation is provided for the automatic recovery of error service;
The fault-tolerant module of OSGi service is mainly used for the operating status for the service of monitoring and restores error service automatically, to improve The robustness of system includes service operation monitoring submodule and the fault-tolerant recovery submodule of service, wherein
Service operation monitors submodule: for generating fault-tolerant prison before service invocation procedure occurs for called service copy Control is acted on behalf of to complete the collection of service operation monitoring and operating status relevant parameter;After monitoring agent generates, a service call When generation, what system can be completed to service executes monitoring;
It services fault-tolerant recovery submodule: realizing above-mentioned service execution state automatic fault tolerant recovery process, work as monitor agent When capturing service operation mistake, service recovery is carried out;
Component three, LDAP Heterogeneous service management module include service registration submodule, service discovery submodule, service 4 parts such as the synchronous submodule of metadata management submodule, service catalogue;
Service registration submodule: recording for completing registration of the Heterogeneous service in system and information, guidance user's input Heterogeneous service metadata information simultaneously specifies the relevant description file of the service, need to upload the service for CORBA service user Idl file need to specify Web Service user the WSDL of the service;
Service discovery submodule: the automatic hair of Heterogeneous service is realized by OpenLDAP LIST SERVER and system database It is existing, and support registered all quick lookups for meeting corresponding conditions Heterogeneous service in ldap server;
Service metadata manages submodule: being mainly used for the Service name of each Heterogeneous service itself in management and maintenance system The metadata informations such as title, service identifiers, address of service, service type;
Service catalogue synchronizes submodule: based on ldap protocol to cores such as WSDL, EndPointReference of Heterogeneous service Heart resource is managed collectively with service metadata information, and realizes system uniform service catalogue oneself after information on services change It is dynamic to synchronize;
Component four, Heterogeneous service pond: including each original Heterogeneous service.
In a kind of above-mentioned Heterogeneous service coordination management system, the specific evaluation method of service evaluation submodule includes:
Step 1 executes record by query service, calculates related letter with five evaluation indexes using each service Breath, is scored by the five indices serviced each, obtains respective score of the service in five evaluation indexes;
Step 2, the row vector for each service being expressed as 1X5, i.e., (1 score of index, 2 score of index, 3 score of index, 4 score of index, 5 score of index), all services are formed a matrix, to service row vector as matrix row vector;Passing through will The each element of matrix subtracts the column minimum value again divided by the difference of the column maxima and minima, obtains normalization decision matrix;Root According to the significance level of quality evaluation index, it is arranged weight vectors (weight w1, weight w2, weight w3, weight w4, weight w5), leads to The product for calculating decision matrix and weight vectors is crossed, the quality score situation of each service is obtained.
In a kind of above-mentioned Heterogeneous service coordination management system, service operation monitoring submodule is completed to take as follows Business executes monitoring:
Parameter before step 1, record current time and other service operations, and prepare to be produced during capture service operation Raw mistake;
If the success of step 2, service operation, agency do not capture run-time error, then follow the steps 2-a;If service fortune Row failure, agency capture corresponding mistake, then follow the steps 2-b;
Step 2-a, parameter after current time and other service operations is recorded, is accordingly calculated, obtains service operation Efficacy parameter simultaneously passes information to service quality evaluation submodule;
Step 2-b, it executes service execution state automatic fault tolerant to restore, and records service error message;
In a kind of above-mentioned Heterogeneous service coordination management system, services fault-tolerant recovery submodule and taken as follows Business restores:
Step 2-b-1, stop error service, record corresponding information, inquiry system service of the same name;If;
Without available service of the same name, relevant information is transmitted to service quality evaluation submodule, service invocation procedure terminates;
Service of the same name can be used, then the service for choosing wherein quality evaluation highest scoring re-starts service call, and will The reference of monitor agent is transferred on new demand servicing copy;
Step 2-b-2, it attempts to capture service error information, if service operation malfunctions, return step 2-b-1, if service It runs successfully, then service call is completed, and corresponding information is passed to service quality evaluation module.
Detailed description of the invention
Fig. 1 is the Heterogeneous service call method schematic diagram of the invention based on agency;
Fig. 2 is local agent Bundle composite structural diagram of the invention;
Fig. 3 is the system framework figure of Heterogeneous service coordination management system of the invention;
Fig. 4 is QoS evaluating method schematic diagram of the present invention;
Fig. 5 is the applicating flow chart of one embodiment of the present of invention.
Specific embodiment
Specific embodiments of the present invention are described below in detail.It should be noted that the embodiments described herein is served only for illustrating It is bright, it is not intended to restrict the invention:
Fig. 1 is the Heterogeneous service call method schematic diagram of the invention based on agency.When there is Heterogeneous service to be registered, That completes Heterogeneous service as follows acts on behalf of formula calling:
Step 1) inquires the Heterogeneous service from the service metadata management submodule of LDAP Heterogeneous service management middleware Corresponding service metadata, and transfer to the service broker under OSGi service management module to generate submodule the service and its metadata What block generated the Heterogeneous service acts on behalf of Bundle.
Step 2) is directed to different types of Heterogeneous service, carries out the following steps respectively:
Step 2-1) for Web Service, service broker, which generates submodule, can execute following steps completion agency's generation:
Step 2-1-1) WSDL of the service is parsed, the service interface class file in Bundle is generated, address of service is compiled Local file is obtained to generate the service implementing type in Bundle.
Step 2-1-2) it extracts in relevant information composition Bundle file in service interface class file and service implementing type Service management class.
Step 2-1-3) compiling of above-mentioned file is packaged by Ant tool and acts on behalf of Bundle file.
Step 2-2) CORBA is serviced, service broker, which generates submodule, can execute following steps completion agency's generation:
Step 2-2-1) idl file of the service is parsed, generate the service interface class file in Bundle, compiling service ground Location obtains local file to generate the service implementing type in Bundle.
Step 2-2-2) it extracts in relevant information composition Bundle file in service interface class file and service implementing type Service management class.
Step 2-2-3) compiling of above-mentioned file is packaged by Ant tool and acts on behalf of Bundle file.
The Heterogeneous service that step 3) generates acts on behalf of Bundle can be carried out unified pipe under system OSGi framework by user Reason and calling.
The above-mentioned structure for acting on behalf of Bundle is as shown in Figure 2.It acts on behalf of Bundle for one and class text is realized by interface document, interface 4 parts such as part, service management class file, configuration file composition.Wherein, the description file that interface document passes through parsing Heterogeneous service (Web Service service is the WSDL of the service, and CORBA service is the idl file of the service), identifies a Heterogeneous service Identification name in OSGi environment.Interface realizes that class file defines the realization class of service.Interface realize class be one can example The class of change realizes the interface that Heterogeneous service is issued, and one variable of static initialization, for saving the local of remote service Agent object;There is no the services of rewriting to realize for such implementation method, but calls corresponding remote method.Interface realizes that class is logical Agent object is crossed, the calling of remote method is effectively shielded, and the registration that is Heterogeneous service in OSGi framework provides Basis.Service management class file provides the class for the registration service into OSGi environment, the Similar integral in BundleActivator interface.BundleActivator interface defines entrance and the outlet of Bundle, may be implemented The management serviced in Bundle.Configuration file is the necessary a part of java applet, is automatically generated in compiling packing process.
Fig. 3 is the frame diagram of Heterogeneous service coordination management system provided by the present invention, which is made of 4 parts, i.e., Related function module, LDAP Heterogeneous service manage middleware in computer hardware basis and software environment, OSGi container and container With Heterogeneous service pond.
The computer hardware basis and software environment refer to that this system operates normally required computer hardware ring The software environments such as border and Java Virtual Machine.Wherein, hardware environment includes each computer node, the network path etc. between each node; And software environment includes the operating system run on computer node and Java Virtual Machine, is safeguarded soft essential to each node communication Part system etc..
The OSGi container refers to that this system core function runs relied on OSGi Felix frame and the frame Under core business module: OSGi service management module and the fault-tolerant module of OSGi service.
Above-mentioned OSGi service management module be mainly used for be registered in system OSGi service and CORBA service with The Bundle that acts on behalf of of Web Service carries out unified life cycle management and supports with cooperateing with to call, raw comprising service broker altogether 4 submodules such as submodule and service quality evaluation submodule are managed at submodule, service call submodule, service lifecycle Block.Wherein:
Service broker generates submodule based on the Heterogeneous service call method based on agency proposed above, takes for CORBA The Heterogeneous services resource such as business and Web Service generates local agent Bundle.
Service call submodule is for realizing the local Bundle passed through in system to the isomery in system Heterogeneous service pond Service carries out unified call.
Service lifecycle manages life cycle of the submodule for all Bundle under management system OSGi framework, packet The Bundle and system for including OSGi service itself are that CORBA is serviced and what Web Service was automatically generated acts on behalf of Bundle.It should Module inherits OSGi framework to the relevant interface of Bundle life cycle management, realizes the installation to Bundle in system, solves Analysis, starting, stop, and update, the unified management of the operations such as unloading.
Service evaluation submodule is using operation datas such as the response times, the time of execution, the rate that runs succeeded of service to isomery Service progress quality evaluation, can rule of thumb or user interest carries out indices scoring, then passes through user and requires to assign Indices weight is given, service quality weighted synthetical evaluation is carried out, so that the quality respectively serviced in user's understanding system is helped, and Foundation is provided for the automatic recovery of error service.
Fig. 4 is QoS evaluating method schematic diagram used by this system service evaluation submodule, and system can be by such as Lower step completes service quality evaluation.
Step 1) executes record by query service, calculates related letter with five evaluation indexes using each service Breath, is scored by the five indices serviced each, obtains respective score of the service in five evaluation indexes.
Step 2) is expressed as each service the row vector of 1X5, i.e., (1 score of index, 2 score of index, 3 score of index, 4 score of index, 5 score of index), all services are formed a matrix, to service row vector as matrix row vector.Passing through will The each element of matrix subtracts the column minimum value again divided by the difference of the column maxima and minima, obtains normalization decision matrix.Root According to the significance level of quality evaluation index, it is arranged weight vectors (weight w1, weight w2, weight w3, weight w4, weight w5), leads to The product for calculating decision matrix and weight vectors is crossed, the quality score situation of each service is obtained.
Service monitoring submodule realizes that the monitoring run to OSGi service and operating status record by service monitoring agency; Service automatic recovery of the fault-tolerant submodule for the service of malfunctioning.
The fault-tolerant module of above-mentioned OSGi service is mainly used for the operating status for the service of monitoring and restores error service automatically, from And the robustness of system is improved, it include service operation monitoring submodule and the fault-tolerant recovery submodule of service.Wherein:
Service operation monitoring submodule, which is mainly used for before service invocation procedure occurs generating for called service copy, to be held Wrong monitoring agent is to complete service operation monitoring and the collection of operating status relevant parameter.After monitoring agent generates, a service When calling generation, what system can be completed to service as follows executes monitoring:
Step 1) records parameter before current time and other service operations, and prepares to be produced during capture service operation Raw mistake.
If the success of step 2) service operation, agency do not capture run-time error, then follow the steps 2-a;If service fortune Row failure, agency capture corresponding mistake, then follow the steps 2-b.
Step 2-a) parameter after current time and other service operations is recorded, it is accordingly calculated, obtains service operation Efficacy parameter simultaneously passes information to service quality evaluation submodule.
Step 2-b) recovery of service execution state automatic fault tolerant is executed, and record service error message.
Fault-tolerant recovery submodule is serviced for realizing above-mentioned service execution state automatic fault tolerant recovery process, when monitoring generation When reason captures service operation mistake, service recovery is carried out as follows:
Step 2-b-1) stop error service, record corresponding information, inquiry system service of the same name.If;
Without available service of the same name, relevant information is transmitted to service quality evaluation submodule, service invocation procedure terminates;
Service of the same name can be used, then the service for choosing wherein quality evaluation highest scoring re-starts service call, and will The reference of monitor agent is transferred on new demand servicing copy.
Step 2-b-2) it attempts to capture service error information, if service operation malfunctions, return step 2-b-1, if service It runs successfully, then service call is completed, and corresponding information is passed to service quality evaluation module.
The LDAP Heterogeneous service management middleware is based on ldap protocol, in conjunction with OpenLDAP server and system data Library, can Heterogeneous service to system and its associated metadata carry out unified storage, inquiry, modification and maintenance.LDAP isomery Service management middleware includes service registration submodule, service discovery submodule, service metadata management submodule, service mesh Record 4 parts such as synchronous submodule.
Service registration submodule is mainly used to the registration completed Heterogeneous service in system and information record, and guidance user is defeated Enter Heterogeneous service metadata information and specify the relevant description file of the service, which need to be uploaded for CORBA service user Idl file, the WSDL of the service need to be specified for Web Service user.
Service discovery submodule realizes the automatic hair of Heterogeneous service by OpenLDAP LIST SERVER and system database It is existing, and support registered all quick lookups for meeting corresponding conditions Heterogeneous service in ldap server.
Service metadata management submodule be mainly used for management and maintenance system in each Heterogeneous service itself service name, The metadata informations such as service identifiers, address of service, service type.
The synchronous submodule of service catalogue is based on ldap protocol to cores such as WSDL, EndPointReference of Heterogeneous service Heart resource is managed collectively with service metadata information, and realizes system uniform service catalogue oneself after information on services change It is dynamic to synchronize.
The Heterogeneous service pond is made of each original Heterogeneous service, and the invention mainly comprises OSGi service, CORBA to take 3 kinds of Heterogeneous services such as business and Web Service.
Fig. 5 is a Heterogeneous service from the embodiment flow chart for calling successfully whole process is registered to, and process is as follows:
Step 1) process starts, and user selects a service, carries out service registration into service registration submodule.
Step 2) utilizes whether have Heterogeneous service note of the same race under LDAP service discovery submodule Ergodic Theory OSGi framework Volume, thens follow the steps 3-a if having), no to then follow the steps 3-b).
Step 3-a) have service registration of the same race, then to user's display reminding information, user is asked to confirm the operation for change Service release or maloperation.If service release need to be changed, step 2-b is executed), it is no to then follow the steps 5).
Step 3-b) without service registration of the same race, then the relevant metadata information of the service of filling in registers service.It completes After service registration, the synchronous submodule of LDAP service catalogue can complete the automatic synchronization of system service catalogue.
Step 4) is for registered Heterogeneous service, system automatically generated service broker Bundle.
Step 5) acts on behalf of Bundle to the Heterogeneous service using OSGi life cycle management module and carries out life cycle management, It is operated including installation, parsing, starting, stopping, update, the unloading etc. to Bundle.Installation, starting two steps behaviour are executed to Bundle After work, service can be called.
Step 6) is called Heterogeneous service, which can carry out two step operations simultaneously, respectively
Step 6-a) redundancy with failover capabilities is carried out to Heterogeneous service;
Step 6-b) status monitoring is carried out to service execution;
Step 6-b-1) if this executes error, error recovery is carried out using redundancy with failover capabilities, is executed again from step 5) Service invocation procedure.
Step 6-b-2) if run succeeded, service quality evaluation is carried out to the service, process terminates.
It is of the invention above described embodiment only expresses to be directed to 3 kinds of Heterogeneous services such as OSGi, CORBA, Web Service The embodiment being managed collectively, the description thereof is more specific and detailed, but can not therefore understand to the invention patent model The limitation enclosed.It should be pointed out that for those of ordinary skill in the art, in the premise for not departing from present inventive concept Under, several improvement can also be made, these belong to the scope of protection of the patent of the present invention.Therefore, the protection model of the invention patent Enclosing should be determined by the appended claims.

Claims (5)

1. a kind of Heterogeneous service call method based on agency, which comprises the steps of:
Step 1 is compiled automatically in conjunction with information on services provided when registering by the compiler directive of the local cmd and generates the service pair The multiple local Java files answered;Wherein, CORBA is serviced, it is desirable to provide the idl file of the service, using idlj order, It automatically generates the corresponding interface document of the service, realize class file and CORBA telecommunication file;For Web Service, It needs to provide the WSDL of the service, using wsimport order, automatically generates the corresponding interface document of the service, realizes class file And Web Service telecommunication file;
Local Java file after step 2, search compiling, obtains service interface file;Wherein, CORBA is serviced, circulation is looked into The file to be ended up in the local file for looking for step 1 to generate with Operations.java;For Web Service, parses WSDL and obtain PortType node name attribute, which is interface name, with the interface in the local file that finding step 1 generates The .java file of name name;
Step 3 carries out code wrap to the realization class file generated in step 1, generates a new interface and realizes class file, should Realize that class serves the service registration in step 4;Such realizes the interface class that step 2 is searched, and defines one remotely The local agent object of service, the object are the variable of a static initialization, and all interface realizing methods pass through in class The method of the same name of the object is called to realize;
Step 4, the BundleActivator class file that the service of class file dynamic generation is realized according to interface and interface, such The start method and stop method for realizing the BundleActivator interface that OSGi is defined are registered remote in start method The Bundle context object of OSGi framework is destroyed in journey service in stop method;
Step 5 includes according to step 4 BundleActivator class file generated and other system environments, generation Bundle-Version、Bundle-Activator、Bundle-RequiredExecutionEnvironment、Import- The MANIFEST.MF file of Package metadata information;
Step 6 passes through Ant packaging file tool for step 1 to 5 All Files generated, and Uniform compilation, which is packaged, to be generated locally Act on behalf of Bundle.
2. a kind of Heterogeneous service cooperates with calling system, feature includes:
Component one, Java Virtual Machine:
Component two, OSGi container assemblies: system core function is run under relied on OSGi Felix frame and the frame Core business module: OSGi service management module and the fault-tolerant module of OSGi service, wherein
OSGi service management module is used for OSGi service and the CORBA service being registered in system with Web Service's It acts on behalf of Bundle and carries out unified life cycle management and support with cooperateing with to call, generate submodule comprising service broker, service is adjusted With submodule, service lifecycle management submodule and service quality evaluation submodule;
Service broker generates submodule: generating local agent with Web Service Heterogeneous service resource for CORBA service Bundle;
Service call submodule: for realizing the local Bundle passed through in system to the Heterogeneous service in system Heterogeneous service pond Carry out unified call;
Service lifecycle manages submodule: for the life cycle of all Bundle under management system OSGi framework, including The Bundle and system of OSGi service itself are that CORBA is serviced and what WebService was automatically generated acts on behalf of Bundle;The mould Block inherits OSGi framework to the relevant interface of Bundle life cycle management, realize to the installation, parsing of Bundle in system, Starting stops, and updates, the unified management of unloading operation;
Service evaluation submodule: using service response time, the time of execution, the rate that runs succeeded operation data to Heterogeneous service into Row quality evaluation, can rule of thumb or user interest carries out indices scoring, then requires to assign by user every Index weights carry out service quality weighted synthetical evaluation, to help the quality respectively serviced in user's understanding system, and are error The automatic recovery of service provides foundation;
The fault-tolerant module of OSGi service is mainly used for the operating status for the service of monitoring and restores error service automatically, to improve system Robustness, include service operation monitoring submodule and service fault-tolerant recovery submodule, wherein
Service operation monitors submodule: for generating fault-tolerant monitoring generation before service invocation procedure occurs for called service copy It manages to complete the collection of service operation monitoring and operating status relevant parameter;After monitoring agent generates, a service call occurs When, what system can be completed to service executes monitoring;
It services fault-tolerant recovery submodule: realizing above-mentioned service execution state automatic fault tolerant recovery process, when monitor agent captures When to service operation mistake, service recovery is carried out;
Component three, LDAP Heterogeneous service management module include service registration submodule, service discovery submodule, service unit number According to management submodule, synchronous 4 part of submodule of service catalogue;
Service registration submodule: it is recorded for completing registration of the Heterogeneous service in system and information, guidance user inputs isomery Service metadata information simultaneously specifies the relevant description file of the service, and the IDL text of the service need to be uploaded for CORBA service user Part need to specify Web Service user the WSDL of the service;
Service discovery submodule: realizing the automatic discovery of Heterogeneous service by OpenLDAP LIST SERVER and system database, And support registered all quick lookups for meeting corresponding conditions Heterogeneous service in ldap server;
Service metadata manages submodule: being mainly used for the service name of each Heterogeneous service itself in management and maintenance system, clothes Business mark, address of service, service type metadata information;
Service catalogue synchronizes submodule: based on ldap protocol to WSDL, EndPointReference core resource of Heterogeneous service It is managed collectively with service metadata information, and realizes the automatic same of system uniform service catalogue after information on services change Step;
Component four, Heterogeneous service pond: including each original Heterogeneous service.
3. a kind of Heterogeneous service according to claim 2 cooperates with calling system, feature includes: service evaluation submodule Specifically evaluation method includes:
Step 1 executes record by query service, calculates related information with five evaluation indexes using each service, leads to It crosses and scores the five indices of each service, obtain respective score of the service in five evaluation indexes, wherein five The item evaluation index response time executes time, success rate, memory occupation rate and failure rate;
Step 2, the row vector for each service being expressed as 1X5, i.e. (1 score of index, 2 score of index, 3 score of index, index 4 scores, 5 score of index), all services are formed a matrix, to service row vector as matrix row vector;By by matrix Each element subtracts the column minimum value again divided by the difference of the column maxima and minima, obtains normalization decision matrix;According to matter The significance level of evaluation index is measured, is arranged weight vectors (weight w1, weight w2, weight w3, weight w4, weight w5), passes through meter The product for calculating decision matrix and weight vectors obtains the quality score situation of each service.
4. a kind of Heterogeneous service according to claim 2 cooperates with calling system, feature includes: service operation monitoring submodule What block was completed to service as follows executes monitoring:
Parameter before step 1, record current time and other service operations, and it is generated in the process to prepare capture service operation Mistake;
If the success of step 2, service operation, agency do not capture run-time error, then follow the steps 2-a;If service operation loses It loses, agency captures corresponding mistake, thens follow the steps 2-b;
Step 2-a, parameter after current time and other service operations is recorded, is accordingly calculated, obtains service operation effect Parameter simultaneously passes information to service quality evaluation submodule;
Step 2-b, it executes service execution state automatic fault tolerant to restore, and records service error message.
5. a kind of Heterogeneous service according to claim 4 cooperates with calling system, feature includes: the fault-tolerant recovery submodule of service Block carries out service recovery as follows:
Step 2-b-1, stop error service, record corresponding information, inquiry system service of the same name;If;
Without available service of the same name, relevant information is transmitted to service quality evaluation submodule, service invocation procedure terminates;
Service of the same name can be used, then the service for choosing wherein quality evaluation highest scoring re-starts service call, and will monitoring The reference of agency is transferred on new demand servicing copy;
Step 2-b-2, it attempts to capture service error information, if service operation malfunctions, return step 2-b-1, if service operation Success, then service call is completed, and corresponding information is passed to service quality evaluation module.
CN201610058405.XA 2016-01-28 2016-01-28 A kind of Heterogeneous service call method based on agency with cooperate with calling system Active CN105721562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610058405.XA CN105721562B (en) 2016-01-28 2016-01-28 A kind of Heterogeneous service call method based on agency with cooperate with calling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610058405.XA CN105721562B (en) 2016-01-28 2016-01-28 A kind of Heterogeneous service call method based on agency with cooperate with calling system

Publications (2)

Publication Number Publication Date
CN105721562A CN105721562A (en) 2016-06-29
CN105721562B true CN105721562B (en) 2019-01-29

Family

ID=56154285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610058405.XA Active CN105721562B (en) 2016-01-28 2016-01-28 A kind of Heterogeneous service call method based on agency with cooperate with calling system

Country Status (1)

Country Link
CN (1) CN105721562B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612950B (en) * 2016-07-11 2021-02-05 阿里巴巴集团控股有限公司 Method, device and system for providing service and electronic equipment
WO2019071584A1 (en) 2017-10-13 2019-04-18 Telefonaktiebolaget Lm Ericsson (Publ) Method and device for proxy between different architectures
CN109039752B (en) * 2018-08-16 2021-11-30 安徽网才信息技术股份有限公司 Unified gateway-based SOA architecture system management method
CN110852139B (en) * 2018-08-21 2024-05-24 斑马智行网络(香港)有限公司 Biometric identification method, device, apparatus and storage medium
CN109922139B (en) * 2019-01-31 2021-09-03 西南电子技术研究所(中国电子科技集团公司第十研究所) Dynamic service discovery and release method for heterogeneous network
CN111176963B (en) * 2019-12-13 2023-03-28 腾讯云计算(北京)有限责任公司 Service evaluation information processing method and device
CN111353880B (en) * 2020-03-31 2023-09-26 中国工商银行股份有限公司 Transaction service packaging method, device and system
CN115865980A (en) * 2022-11-29 2023-03-28 重庆长安汽车股份有限公司 SOA communication architecture, vehicle, construction method and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102323879A (en) * 2011-06-07 2012-01-18 北京大学 Complete network middleware operation support platform and integration method of heterogeneous middleware
CN102333019A (en) * 2011-09-02 2012-01-25 东莞中山大学研究院 Proxy device for being compatible to logical device access
CN102377796A (en) * 2010-08-05 2012-03-14 中国人民解放军国防科学技术大学 Heterogeneous service integrating system and method based on OSGi (open service gateway initiative)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2891972A1 (en) * 2005-10-11 2007-04-13 France Telecom METHOD FOR AUTOMATIC MANAGEMENT OF ASSOCIATIONS BETWEEN SERVICES IN A DISTRIBUTED ENVIRONMENT
US20080256560A1 (en) * 2006-06-23 2008-10-16 Gaetano Ruggiero Method, system and computer program for interacting with services through a native user interface in a soa environment
US9571495B2 (en) * 2014-05-29 2017-02-14 General Electric Company Methods and systems for authorizing web service requests

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377796A (en) * 2010-08-05 2012-03-14 中国人民解放军国防科学技术大学 Heterogeneous service integrating system and method based on OSGi (open service gateway initiative)
CN102323879A (en) * 2011-06-07 2012-01-18 北京大学 Complete network middleware operation support platform and integration method of heterogeneous middleware
CN102333019A (en) * 2011-09-02 2012-01-25 东莞中山大学研究院 Proxy device for being compatible to logical device access

Also Published As

Publication number Publication date
CN105721562A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
CN105721562B (en) A kind of Heterogeneous service call method based on agency with cooperate with calling system
CN106230987B (en) A kind of information integrated system and method based on electric power PaaS cloud platform
CN107766205B (en) A kind of monitoring system and method towards the tracking of micro services calling process
CN109445802A (en) The method of privatization Paas platform and its publication application based on container
CN109246251A (en) A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN113176875B (en) Resource sharing service platform architecture based on micro-service
CN101277304B (en) Management system and management method for Web service operational environment based on rules
US20030208527A1 (en) Method for smart device network application infrastructure (SDNA)
CN102857363A (en) Automatic computing system and method for virtual networking
Baresi et al. Dynamo+ astro: An integrated approach for bpel monitoring
CN105635283A (en) Organization and management and using method and system for cloud manufacturing service
CN101826987A (en) System and method for supporting mixed service based on integrated open network
CN103336813A (en) Data integrated management scheme for Internet of Things based on middleware framework
CN102291464A (en) System and method for dynamically generating Web Service by business flow in BPM (Business Process Management)
CN101860564A (en) Protocol-based service combination system and method
CN104410556A (en) Bilateral interaction terminal integration architecture based on IEC61970 standard
CN113992769A (en) Industrial internet information exchange method
CN105320522A (en) Service-oriented architecture based XBRL application platform
CN101442562A (en) Context perception method based on mobile proxy
CN102073505B (en) Service composition-oriented declarative transaction integration method and system
CN106657282B (en) Method and device for integrating running state information of converter station equipment
CN103684904A (en) Tri-networks integration network monitoring system based on IP
CN103064688A (en) Workflow universal service method and system
CN114124859B (en) Intelligent customer service robot of network maintenance platform and maintenance method
CN114978850A (en) Heterogeneous high-concurrency big data collaborative access system for smart power grid

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant