CN115361431A - Remote service interface calling method based on explicit-implicit parameter registration - Google Patents

Remote service interface calling method based on explicit-implicit parameter registration Download PDF

Info

Publication number
CN115361431A
CN115361431A CN202210803767.2A CN202210803767A CN115361431A CN 115361431 A CN115361431 A CN 115361431A CN 202210803767 A CN202210803767 A CN 202210803767A CN 115361431 A CN115361431 A CN 115361431A
Authority
CN
China
Prior art keywords
service
interface
parameter
calling
registration
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.)
Pending
Application number
CN202210803767.2A
Other languages
Chinese (zh)
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.)
China Electric Rice Information System Co ltd
Original Assignee
China Electric Rice Information System 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 China Electric Rice Information System Co ltd filed Critical China Electric Rice Information System Co ltd
Priority to CN202210803767.2A priority Critical patent/CN115361431A/en
Publication of CN115361431A publication Critical patent/CN115361431A/en
Pending legal-status Critical Current

Links

Images

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a remote service interface calling method based on explicit and implicit parameter registration, and provides a RPC (remote procedure call) service calling method based on registration, which is used for minimizing parameter transmission during calling and formatting returned data into a standard data frame. A service producer registers interface name, type and description information in a registration center and declares explicit and implicit types of parameters, wherein the implicit parameters need to be filled with default values; the service consumer remotely calls the corresponding method by retrieving the registry registration information, translating the parameters and directly using the reflection mechanism through a general RPC framework. The implicit default parameters are introduced to improve the use flexibility of the service producer interface, and the service producer can appropriately design the implicit parameter multiplexing interface to realize different types of calling.

Description

Remote service interface calling method based on explicit-implicit parameter registration
Technical Field
The invention relates to a remote service interface calling method based on explicit-implicit parameter registration.
Background
Remote Procedure Call (RPC) technology is widely used in communication of multi-machine systems. Whether it is a large-scale distributed cluster or a common multi-machine service system, the RPC technology generally assumes responsibility for system coordination and data exchange, and the performance and reliability of RPC directly determine the performance and availability of the system. The nature of RPC is the process of asking a remote server at the client to run a certain service and get its results. It is an interprocess communication mechanism and does not specify a specific implementation, platform and language. Generally, a Dubbo framework is used in Java Web development to realize remote procedure call, relatively speaking, dubbo call needs to directly specify and call a method name in a code, a service producer is difficult to be restricted, and meanwhile, a producer code is embedded into a consumer, so that the situation of inconsistent versions is easy to occur. The dependence generates coupling and restriction in aspects of engineering code, deployment and maintenance and the like, thereby prompting architects to design and build a series of service centers according to business fields.
And the Dubbo call needs to be serialized and deserialized, a serialization mechanism is responsible for converting data from the state information of an object into a transmittable form, a deserialization mechanism is a reverse process, and different processes on different hosts can realize data exchange through the serialization and deserialization mechanisms, which are important rings of RPC. But the serialization process encounters complex objects that cause efficiency problems while exacerbating producer-to-consumer code intrusion. Multiple software data calls and interactions hope that these independently deployed services effectively isolate the core data sources, complex business logic, and diverse upper-layer applications in their respective domains, providing a highly cohesive and standard-semantic remote service interface.
Disclosure of Invention
The purpose of the invention is as follows: in a local area network scene and in a multi-configuration item development environment, services are called mutually, and Remote Procedure Call (RPC) of different developers has the problems that interface dependence needs to be introduced, parameter description is unclear or type errors occur, and object serialization needs to be introduced. The invention provides a remote service interface calling method based on explicit and implicit parameter registration, which aims to solve the problems of multi-parameter remote calling and irregular returned data format, effectively support services to directly use remote procedure calling, weaken the dependence between programs and clearly describe explicit and implicit parameters of an interface.
Before the remote service interface based on explicit-implicit parameter registration is used for calling, a Dubbo frame needs to be built, dubbo dependence needs to be quoted among different configuration items, a communication middleware used for building the Dubbo is Zookeeper, and 3 or more clusters which are odd numbers are suggested to be used so as to ensure stable service registration and calling. The technical solution for realizing the purpose of the invention is as follows: the invention provides a remote service interface calling method based on explicit-implicit parameter registration, which comprises the following steps:
step 1: aiming at remote calling service, service information is registered through a registration platform, a service producer interface object is processed into a data object described by available meta information, highly cohesive remote service interface calling with standard semantics is provided only through a registered unique identifier, and a calling parameter processing mark is marked as a explicit parameter and a hidden parameter through the registration platform, so that transparent and efficient point-to-point calling between a service consumer and a service provider with minimized parameter transmission is realized. For a producer and a consumer which are called remotely, a Dubbo frame is quoted to realize a remote process calling path, and the communication and registration of the Dubbo frame are realized through a Zookeeper registration center;
and 2, step: the method comprises the steps that remote invocation is conducted on a data frame in a determinant form, the data frame comprises a meta-information section and a data section, the meta-information section describes field attributes included in the data frame, and the data section is a field key value pair list. Aiming at a service producer (an interface for providing remote calling service), reflecting calling of a route parent class interface class is realized, and a transmission parameter format and an interface data exchange format specified by a route are packaged according to the format;
and 3, step 3: according to the reflection call route packaged in the step 2, a producer inherits a reflection call route parent interface and realizes a service expected to be issued based on service requirements, returns a data format and requires normalization of a data exchange format according to the step 2, namely a data frame in a standard JSONObject format;
and 4, step 4: for service consumers (other programs of remote calling service producers), a reflection calling routing parent interface file is referred;
and 5: for a service consumer, invoking a reflection calling routing subclass interface file;
step 6: the service producer adds the detailed description of the service interface information and the calling parameter in the registration center, and particularly declares whether each interface calling parameter is explicit or implicit, and fills parameter type information. The explicit parameters refer to parameters which need to be transmitted when being exposed to external service call, and only need to register meta information such as names, field types and the like of the parameters; the implicit parameter refers to a default parameter that must be used by a calling service, but an external call does not need processing, and is automatically brought in, and the default value of the parameter must be registered besides the meta information such as the name, the field type and the like of the parameter. Meanwhile, the registration center automatically generates a unique identification ID of the service;
and 7: when a consumer uses the service, only the service unique identification ID and the parameter information are needed to be transmitted, and the unique open interface of the parent interface is called uniformly;
and 8: and organizing the parameters according to the service requirements to remotely call the service.
In the step 1, the Dubbo frame is referred to, specifically, an RPC frame is called by an open source remote procedure to carry out final service calling, and the open source Dubbo frame is used; if there is no special statement, where the service producer refers to the implementer of the service interface and the service consumer refers to the caller of the remote usage service interface.
The step 2 comprises the following steps: constructing a service call parent INTERFACE class P _ INTERFACE, wherein the P _ INTERFACE only has a unique public method getData (Stringmethod, stringparams), the character String method is the specific method name of the call, and the params parameter contains all parameter key value pairs needing to be transmitted; aiming at service PRODUCERs, each service PRODUCER PRODUCER [1-n ] inherits a parent class INTERFACE class to construct a child class INTERFACE class S _ INTERFACE [1-n ] and realizes the class S _ INTERFACE _ IMPL [1-n ], wherein all other child class methods are modified by private keywords except that a getData method is a public INTERFACE modified by public keywords and a returned data format is a standard JSONObject format, and reflection calling routing based on a method parameter and a params parameter is realized in a public method getData (String method, string params).
In step 2, the access parameter format and the interface data exchange format specified by the route are data frames in a standard JSONObject format, the format is fixed into a JSON array comprising two fields of condition and filter, and a parent interface class has one and only one public interface; the condition is an implicit parameter, no processing is needed when an external service is called, a default parameter is automatically brought in, and the default value of the parameter needs to be registered except for registering meta information such as the name and the field type of the parameter; the filter is an explicit parameter, and the external service must be transmitted according to the registration information when being called; and directly filling the value of the condition parameter during condition parameter registration, and only describing the specific filling method of the filter parameter during the filter parameter registration, but not setting a default value.
In step 3, the normalized data exchange format is organized based on business or foreground display requirements, a data frame in a standard JSONObject format returned by remote invocation comprises a meta-information segment and a data segment, the meta-information segment describes field attributes included in the data frame, and the data segment is a field key value pair list and is required to be transmitted in the standard JSONObject format.
In step 3, step 4 and step 5, the routing parent class interface class and the routing child class interface class are the same in the producer and the consumer.
The step 5 comprises the following steps: the service consumer refers to all the subclass INTERFACE classes S _ INTERFACE [1-n ] of the service producer; and instantiated Java objects of all the referenced service producers and consumers, i.e., BEAN objects, incorporate a Spring framework to manage their lifecycle and declare the Dubbo registration information of the BEAN objects.
In step 6, before the service producer registers the service, the service manager registers the information in a registry, which is different from the Zookeeper registry mentioned in step 1, and the difference is that: the Zookeeper registration center is open source software, is used for the Dubbo framework in the step 1 to use, only manages the service identification and IP address, and provides IP information discovery and configuration information synchronization of a service producer and a service consumer when Remote Procedure Call (RPC) is carried out; the registry is used for managing the detailed information of the service producer interface, including the meta information of the transmission parameters, and is a webpage end management platform.
In step 6, the service producer registers the detailed description of the service interface information and the calling parameter to the registration platform, including the identifier softwave, the interface name, the explicit parameter list, and the implicit parameter list, of the configuration item SOFTWARE, and the registration platform will automatically generate the unique identifier of the service producer, which is recorded as API _ ID.
In step 7, the unique public interface form of the unified calling parent class interface is as follows:
JSONObject getData(String method,String params);
the specific subclass calling method includes that the introduced service unique identifier obtains the registration information of the subclass, and then the corresponding instantiation subclass is used for realizing remote calling of the service.
The method is suitable for scenes that calling among multiple configuration items is complex, interface parameters are multiple, developers are multiple, and versions of the configuration items are easy to be inconsistent. The framework of the present invention has the ability to make transparent and efficient point-to-point calls between a service consumer and a service provider of a service. To meet the need to implement a servitization framework in Web development. Specifically, the framework should not be intrusive to the application development phase, provide high performance and high reliability peer-to-peer RPC functions while the application is running, and a range of practical service governance functions including service registration and discovery, clustering, and load balancing. The method has the greatest advantages that Dubbo calling can be isolated, so that producer codes are minimally invaded into consumers, the RPC process of the consumers is transparent, and even the foreground can directly look up the service registration center and directly transmit service ID remote calling service. The remote service interface calling method based on explicit and implicit parameter registration is realized, and the method can be used for scenes with complex calling, multiple interface parameters, multiple developers and easily inconsistent versions of various configuration items among multiple configuration items.
The invention provides a method for solving the problems of multi-parameter remote calling and irregular returned data format in a local area network scene, effectively supports services to directly use remote procedure calling, weakens the dependence between programs, minimizes parameter transmission during calling, and formats the returned data into a standard data frame.
Compared with the prior art, the invention has the following remarkable advantages: the method has the advantages that the method has the capability of carrying out transparent and efficient point-to-point calling between service consumers and service providers of the services, the services effectively isolate core data sources, complex business logic and changeable upper-layer applications in respective fields, provide highly cohesive remote service interfaces with standard semantics, and can call corresponding remote services only through ID (identity) by registering an interface calling method through a service registration platform, is friendly to developers, solves the problems of complex calling among multiple configuration items, multiple interface parameters, multiple developers and easily inconsistent versions of the configuration items, and is suitable for calling the multiple configuration items.
Drawings
The foregoing and/or other advantages of the invention will become further apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is a flow chart and relationship diagram of the steps of the present invention;
fig. 2 is a schematic diagram of the implementation of the reflection call routing of the present invention.
Detailed Description
Step 1: building a Dubbo frame, wherein Dubbo dependence needs to be introduced between different configuration items, a communication middleware used for building the Dubbo is a Zookeeper, and 3 or more clusters with odd numbers are used to ensure stable service registration and calling;
step 2: the invention mainly aims at the remote invocation of a determinant form data frame, the data frame comprises a meta information segment and a data segment, the meta information segment describes the field attribute included in the data frame, and the data segment is a field key value pair list. Constructing a service call parent INTERFACE class P _ INTERFACE, wherein the INTERFACE class only has a unique public method getData (Stringmethod, stringparams), the character String method is the specific method name of the call, and the params parameter contains all parameter key value pairs needing to be transmitted; aiming at a service PRODUCER, each service PRODUCER PRODUCER [1-n ] inherits a parent INTERFACE class to construct a subclass INTERFACE class S _ INTERFACE [1-n ] and realizes the class S _ INTERFACE _ IMPL [1-n ], wherein except that a getData method is a public INTERFACE decorated by public keywords and returns a data frame with a data format of a standard JSONObject format, all other subclass methods are decorated by private keywords, and in a public method getData (Stringmethod, stringparams), a reflection calling route based on a method parameter and a params parameter is realized;
and 3, step 3: the service producer inherits the reflection calling route parent interface based on the service requirement, realizes the service which is expected to be issued based on the service requirement, and ensures that the returned data format is the normalized data exchange format required by the step 2, namely the data frame in the standard JSONObject format;
and 4, step 4: the service consumer calls a parent INTERFACE class P _ INTERFACE by relying on the service constructed in the step 1;
and 5: the service consumer refers to all the subclass INTERFACE classes S _ INTERFACE [1-n ] of the service producer; and all instantiated Java objects of the referenced service producer and consumer, namely BEAN objects, are incorporated into a Spring framework to manage the life cycle of the service producer and the consumer, and the Dubbo registration information of the BEAN objects is declared;
step 6: the service producer registers detailed description of service interface information and calling parameters to the registration platform, wherein the detailed description comprises an identifier SOFTWARE of configuration item SOFTWARE, an interface name METHOD, an explicit parameter list FILTER and an implicit parameter list CONDITION, and the registration platform can automatically generate a unique identifier of the service producer and record the unique identifier as API _ ID;
and 7: when a service consumer needs to remotely call a service producer, according to the API _ ID incoming parameter generated by registration in step 6, inquiring the registration information of the registration platform, directly selecting and calling the corresponding S _ INTERFACE [ i ], and acquiring data through a uniform getData (Stringmethod, stringparams) INTERFACE;
and 8: registering and remotely organizing and calling data according to business requirements, wherein when a service consumer calls the service, a service producer exchanges data through a Dubbo frame, analyzes a private modification method which needs to be really called through a reflection calling route, and organizes the data to be transmitted to the service consumer; .
The method needs to utilize an open-source RPC frame Dubbo to realize a remote procedure call path, and the step needs to rely on a Zookeeper registration center to realize communication and registration of the Dubbo frame. Before the calling method is used, a service information registration platform needs to be constructed to store and manage the description information of the service interface and the meta-information of the explicit and implicit parameters.
Wherein each service PRODUCER, PRODUCER [ i ], in step 2 can be considered a different software configuration item. Only one S _ INTERFACE _ IMPL [ i ] needs to be implemented per PRODUCER [ i ]. The other methods for modifying the private keywords realized in the step 2 all have one and only one parameter JSONObject params.
The reflection call routing in the step 2 obtains the method name actually required to be called by using the incoming method parameter, the method has only one parameter JSONObject params, and the method directly calls and executes the corresponding method by using a Java reflection mechanism through the method name to obtain result data.
In step 6, the softward identifier refers to an identifier of the SOFTWARE configuration item registered to the Dubbo framework, and does not include a version number, and the identifier needs to be unique in the whole large system. The explicit parameter list and the implicit parameter list registered in step 6 are shown in table 1:
TABLE 1
Figure BDA0003735574900000071
The condition field represents an implicit parameter list, which is a parameter value that must be delivered and cannot be modified when called by a consumer, the field represents a field name, the type represents a field type, the value represents an incoming default value, and the decvision represents description information; the filter field represents a display parameter list, the parameter is optional to be transferred when called by a consumer and can arbitrarily specify a parameter value, the field represents a field name, the type represents a field type, the decvision represents a value which describes that the information consumer fills in the filter field according to requirements when using, and the registration information only describes how to transfer the explicit parameter.
In step 5, the program obtains the name and the identifier of the registered BEAN by analyzing the configuration file of the Dubbo, wherein the registered name mainly specifies the BEAN ID of the S _ INTERFACE [ i ] in the consumer, which is realized by each producer.
In step 7, the data format returned by calling the unified getData (String method, string params) interface is generally specified as a data frame in a standard JSONObject format, the data frame in the standard JSONObject format returned by the remote call includes a meta information segment and a data segment, the meta information segment describes field attributes included in the data frame, and the data segment is a field key value pair list. To avoid the dependence of the consumer on the producer pojo class, and to avoid serialization and deserialization as much as possible, data exchange is performed through JSON strings, with a general data exchange format as shown in table 2:
TABLE 2
Figure BDA0003735574900000081
The metadata includes a meta-information description field metadata and a data frame field dataframe.
Examples
With reference to fig. 1, the present invention is further described in detail with reference to a scenario of call between two software configuration items as an example. A service producer, also in essence a producer in the Dubbo framework, but all calls are proxied by a reflection routing call; the service consumer is also a consumer in the Dubbo framework, is a consumer set, acquires a consumer instance which needs to be formed currently through a service registration center to serve as a consumer call target producer, and realizes transparent call. The method mainly comprises the following steps:
and building a Dubbo frame environment. Based on the figure 1, an RPC frame is built according to Dubbo official documents, so that the establishment of Zookeeper clusters and the establishment of Dubbo self-contained monitoring centers are realized, and the precondition of the steps is corresponded.
And designing a development service registry. Through Java Web program, developing service registration platform for managing service producer's interface information and explicit-implicit parameter registration information, the design table structure is as follows:
the registration service information (API) was constructed as shown in table 3 below:
TABLE 3
Figure BDA0003735574900000082
Figure BDA0003735574900000091
The call registration service information attachment information (Pipeline) is constructed as shown in table 4 below:
TABLE 4
Serial number Call service information (Pipeline) field Properties Type of data Main/outer key
1 ID Generating uuid, primary key Varchar Main key
2 F_PIPELINE_NAME Pipeline name Varchar Whether or not
3 F_API_ID API Primary Key ID Varchar FK@API/ID
4 F_PIPELINE_DESC Description of Pipeline Varchar Whether or not
5 F_PIPELINE_FILTER Explicit parameter meta-information Clob Whether or not
6 F_PIPELINE_CONDITION Implicit parameter registration Clob Whether or not
7 F_CREATE_ON Creation time Datetime Whether or not
The API information table is mainly registered with service producer ID and interface API method name; the Pipeline information table mainly registers interface API primary keys, explicit parameter meta information and implicit parameter registration. Corresponding to the table used in step 2.
Based on fig. 1 and fig. 2, a reflection call route is constructed at a SERVICE producer (SERVICE), the producer refers to a parent class INTERFACE class P _ INTERFACE, writes its sub-class S _ INTERFACE and its implementation class parent class INTERFACE class P _ INTERFACE _ IMPL, and writes a test method JSONObject test (JSONObject params), where the parameters used in the method are String year, string model, and float upper, where "year" is an implicit parameter and the current year is taken. Corresponding to step 1 and step 2, the information is registered to the service platform, i.e. a registration record (API) is added as shown in table 5 below:
TABLE 5
Figure BDA0003735574900000092
The following table 6 shows the addition of the registration service information attachment information (Pipeline):
TABLE 6
Figure BDA0003735574900000101
And introducing a routing parent class INTERFACE class P _ INTERFACE dependency and a subclass class INTERFACE S _ INTERFACE dependency realized by a producer by a service Consumer (CUSTOM), and registering the object into a Dubbo framework, which corresponds to the step 3 and the step 4.
Finally, where the consumer needs to call a method, directly entering the ID (01) and explicit parameters (model =0101, upper = 1.5) of the registration information can call the parent interface through the reflection route:
P_INTERFACE.test(SERVICE,{condition:{year:2021},filter:{model:0101,upper:1.5})
and (5) acquiring a result by the interface, corresponding to the step 5 and the step 6, and organizing and foreground displaying the data according to the service requirement after acquiring the result.
In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, where the computer storage medium is capable of storing a computer program, and the computer program, when executed by the data processing unit, may execute the inventive content of the remote service interface calling method based on explicit and implicit parameter registration and some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
It is clear to those skilled in the art that the technical solutions in the embodiments of the present invention can be implemented by means of a computer program and its corresponding general-purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a computer program, that is, a software product, which may be stored in a storage medium and includes several instructions to enable a device (which may be a personal computer, a server, a single chip microcomputer MUU or a network device) including a data processing unit to execute the method in each embodiment or some parts of the embodiments of the present invention.
The present invention provides a remote service interface calling method based on explicit and implicit parameter registration, and there are many methods and ways to implement this technical solution, and the above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications may be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. All the components not specified in the present embodiment can be realized by the prior art.

Claims (10)

1. A remote service interface calling method based on explicit-implicit parameter registration is characterized by comprising the following steps:
step 1: aiming at remote calling service, registering service information through a registration platform, processing a service producer interface object into a data object described by available meta information, providing highly cohesive remote service interface calling with standard semantics only through a registered unique identifier, and marking a calling parameter processing mark as a explicit parameter and an implicit parameter through the registration platform; for a producer and a consumer which are called remotely, a Dubbo frame is quoted to realize a remote process calling path, and the communication and registration of the Dubbo frame are realized through a Zookeeper registration center;
step 2: aiming at the remote invocation of a data frame in a determinant form, the data frame comprises a meta-information segment and a data segment, the meta-information segment describes field attributes included in the data frame, and the data segment is a field key value pair list; for a service producer, realizing reflecting and calling a route parent interface class and packaging a transmission parameter format and an interface data exchange format specified by a route according to the format;
and step 3: according to the reflection call route packaged in the step 2, a producer inherits a reflection call route parent interface and realizes the service expected to be issued based on the service requirement, returns a data format and normalizes the data exchange format according to the requirement of the step 2;
and 4, step 4: for a service consumer, invoking a reflection call routing parent interface file;
and 5: for a service consumer, invoking a reflection calling routing subclass interface file;
step 6: a service producer adds service interface information and detailed description of calling parameters in a registration center, specially declares whether each interface calling parameter is explicit or implicit, and fills parameter type information; the explicit parameters refer to parameters which need to be transmitted when being exposed to external service calls, and only need to register meta information such as names, field types and the like of the parameters; the implicit parameter refers to a default parameter which is required to be used by calling service but is automatically brought in without being processed by external calling, and the default value of the parameter is required to be registered except the name and the field type of the registered parameter; meanwhile, the registration center automatically generates a unique identification ID of the service;
and 7: when a consumer uses the service, only the unique service identification ID and the parameter information need to be transmitted, and the unique public interface of the parent interface is called uniformly;
and 8: and organizing the parameters according to the service requirements to remotely call the service.
2. The method according to claim 1, wherein in step 1, the Dubbo framework is referred to, specifically, an open source Remote Procedure Call (RPC) framework is used for making a final service call, and the open source Dubbo framework is used; if there is no special statement, where the service producer refers to the implementer of the service interface and the service consumer refers to the caller of the remote usage service interface.
3. The method of claim 2, wherein step 2 comprises: constructing a service call parent INTERFACE class P _ INTERFACE, wherein the P _ INTERFACE only has a unique public method getData (Stringmethod, stringparams), the character String method is the specific method name of the call, and the params parameter contains all parameter key value pairs needing to be transmitted; aiming at a service PRODUCER, each service PRODUCER PRODUCER [1-n ] inherits a parent class INTERFACE class to construct a subclass INTERFACE class S _ INTERFACE [1-n ] and realizes the class S _ INTERFACE _ IMPL [1-n ], wherein except that a getData method is a public INTERFACE decorated by public keywords and a return data format is a standard JSONObject format, all other subclass methods are decorated by private keywords, and in a public method getData (Stringmethod, stringparams), a reflection calling route based on a method parameter and a params parameter is realized.
4. The method according to claim 3, wherein in step 2, the access-specified parameters format and interface data exchange format are data frames in a standard JSONObject format, the format is fixed to a JSON array comprising two fields of condition and filter, and the parent interface class has one and only one public interface; the condition is an implicit parameter, no processing is needed when an external service is called, a default parameter is automatically brought in, and the default value of the parameter is required to be registered except the name and the field type of the registered parameter; the filter is an explicit parameter, and the external service must be transmitted according to the registration information when being called; and directly filling the value of the condition parameter during condition parameter registration, and only describing the specific filling method of the filter parameter during the filter parameter registration, but not setting a default value.
5. The method according to claim 4, wherein in step 3, the standardized data exchange format is organized based on business or foreground display requirements, and the standard JSONObject format data frame returned by the remote invocation comprises a meta information segment and a data segment, wherein the meta information segment describes the field attribute included in the data frame, and the data segment is a field key value pair list and requires to be transferred in the standard JSONObject format.
6. The method of claim 5, wherein in step 3, step 4, and step 5, the routing parent interface class and the child interface class are the same in the producer and the consumer.
7. The method of claim 6, wherein step 5 comprises: the service consumer refers to the subclass INTERFACE class S _ INTERFACE [1-n ] of all the service producers; and instantiated Java objects of all the referenced service producers and consumers, i.e., BEAN objects, incorporate a Spring framework to manage their lifecycle and declare the Dubbo registration information of the BEAN objects.
8. The method of claim 7, wherein in step 6, before the service producer registers the service, the registry is required to register information with the service management service, and the registry is a web management platform for managing the service producer interface details, including meta information of the delivery parameters.
9. The METHOD of claim 8, wherein in step 6, the service producer registers the service interface information and the detailed description of the calling parameter with the registration platform, including the identity softwave of the configuration SOFTWARE, the interface name, the explicit parameter list, the FILTER, and the implicit parameter list, the registration platform automatically generates the unique identity of the service producer, which is denoted as API _ ID.
10. The method according to claim 9, wherein in step 7, the unique public interface form of the unified calling parent class interface is:
JSONObject getData(String method,String params)。
CN202210803767.2A 2022-07-07 2022-07-07 Remote service interface calling method based on explicit-implicit parameter registration Pending CN115361431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210803767.2A CN115361431A (en) 2022-07-07 2022-07-07 Remote service interface calling method based on explicit-implicit parameter registration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210803767.2A CN115361431A (en) 2022-07-07 2022-07-07 Remote service interface calling method based on explicit-implicit parameter registration

Publications (1)

Publication Number Publication Date
CN115361431A true CN115361431A (en) 2022-11-18

Family

ID=84031183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210803767.2A Pending CN115361431A (en) 2022-07-07 2022-07-07 Remote service interface calling method based on explicit-implicit parameter registration

Country Status (1)

Country Link
CN (1) CN115361431A (en)

Similar Documents

Publication Publication Date Title
US7350184B2 (en) System and method for enterprise application interactions
US7546606B2 (en) System and method using a connector architecture for application integration
US6779002B1 (en) Computer software framework and method for synchronizing data across multiple databases
US6349333B1 (en) Platform independent alarm service for manipulating managed objects in a distributed network management system
US8005871B2 (en) System and method for control architecture
US7035944B2 (en) Programmatic management of software resources in a content framework environment
US7937500B2 (en) Dynamic, real-time integration of software resources through services of a content framework
US7836439B2 (en) System and method for extending a component-based application platform with custom services
US8060863B2 (en) Conformance control module
US20040201600A1 (en) Methods and system for providing an XML-based interface description language
US20060294048A1 (en) Data centric workflows
US20030233477A1 (en) Extensible infrastructure for manipulating messages communicated over a distributed network
CA2443447A1 (en) System and method for conversion between graph-based representations and structural text-based representations of business processes
JP2001520486A (en) Object-oriented point-to-point communication method and communication device for performing the method
US7770159B2 (en) Virtual types
US20030220963A1 (en) System and method for converting data structures
WO2003034183A2 (en) System and method using a connector architecture for application integration
US20060282460A1 (en) Method and system for generic data objects
US20120174063A1 (en) Logical address based object oriented programming
CN115361431A (en) Remote service interface calling method based on explicit-implicit parameter registration
US20050235071A1 (en) Method for collecting monitor information
US20080126405A1 (en) Methods, Apparatus and Media for Modifying Information
US8910183B2 (en) Access to context information in a heterogeneous application environment
WO2003030020A2 (en) Handling relational metanodes in databases
Hogan Semantics in distributed systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination