CN114640720A - Service protocol switching method and device - Google Patents
Service protocol switching method and device Download PDFInfo
- Publication number
- CN114640720A CN114640720A CN202210255450.XA CN202210255450A CN114640720A CN 114640720 A CN114640720 A CN 114640720A CN 202210255450 A CN202210255450 A CN 202210255450A CN 114640720 A CN114640720 A CN 114640720A
- Authority
- CN
- China
- Prior art keywords
- service
- protocol
- package
- executor
- publishing
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000008569 process Effects 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 11
- 238000003860 storage Methods 0.000 claims description 11
- 230000007246 mechanism Effects 0.000 claims description 7
- 238000012827 research and development Methods 0.000 abstract description 10
- 238000012423 maintenance Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 18
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 230000001419 dependent effect Effects 0.000 description 3
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 235000010627 Phaseolus vulgaris Nutrition 0.000 description 1
- 244000046052 Phaseolus vulgaris Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种服务协议的切换方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议;通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务;通过基于第一协议的服务处理接收的请求。该实施方式能够优化底层程序,减小占用的内存,降低研发难度和维护成本,缩短研发时间。
The invention discloses a service protocol switching method and device, and relates to the technical field of computers. A specific implementation of the method includes: determining a service publisher corresponding to the publishing package according to the configured publishing package based on the first protocol, where the first protocol is a protocol different from the second protocol currently based on the service; The service publisher corresponding to the package loads the publishing package to publish the service according to the first protocol; and processes the received request through the service based on the first protocol. This embodiment can optimize the underlying program, reduce the occupied memory, reduce the research and development difficulty and maintenance cost, and shorten the research and development time.
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种服务协议的切换方法和装置。The present invention relates to the field of computer technology, and in particular, to a service protocol switching method and device.
背景技术Background technique
对于租户化的系统,多租户多场景下需要经常对服务协议进行切换。目前的服务协议切换方案为对项目拉取多个分支,每个分支对应一种服务协议,后期维护成本较高和存在代码不一致问题。For a tenanted system, the service protocol needs to be switched frequently in multi-tenant and multi-scenarios. The current service agreement switching solution is to pull multiple branches of the project, and each branch corresponds to a service agreement. The later maintenance costs are high and there are code inconsistencies.
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:In the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art:
对于协议层的适配使项目的底层程序臃肿,项目中会出现对框架的强依赖,且占用的内存较大,研发难度大,研发时间长,维护成本高。The adaptation of the protocol layer makes the underlying program of the project bloated, and there will be a strong dependence on the framework in the project, and the memory occupied is large, the research and development is difficult, the research and development time is long, and the maintenance cost is high.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供一种服务协议的切换方法和装置,能够优化底层程序,解耦对worker调度框架的依赖,减小内存占用,降低研发难度和维护成本,缩短研发时间。In view of this, the embodiments of the present invention provide a service protocol switching method and device, which can optimize the underlying program, decouple the dependence on the worker scheduling framework, reduce memory occupation, reduce research and development difficulty and maintenance cost, and shorten research and development time.
为实现上述目的,根据本发明实施例的一个方面,提供了一种服务协议的切换方法。To achieve the above object, according to an aspect of the embodiments of the present invention, a method for switching a service protocol is provided.
一种服务协议的切换方法,包括:根据配置的基于第一协议的发布包,确定与所述发布包对应的服务发布器,所述第一协议为与服务当前所基于的第二协议不同的协议;通过与所述发布包对应的服务发布器加载所述发布包,以按照所述第一协议发布所述服务;通过基于所述第一协议的所述服务处理接收的请求。A service protocol switching method, comprising: determining a service publisher corresponding to the publishing package according to a configured publishing package based on a first protocol, where the first protocol is different from a second protocol currently based on a service protocol; loading the publishing package through the service publisher corresponding to the publishing package to publish the service according to the first protocol; processing the received request through the service based on the first protocol.
可选地,所述根据配置的基于第一协议的发布包,确定与所述发布包对应的服务发布器之前,包括:从依赖包管理插件中获取所述配置的基于第一协议的发布包,并通过配置文件加载器加载预设路径中的配置文件,所述配置文件包括与所述发布包对应的服务发布器的初始化文件。Optionally, before determining the service publisher corresponding to the release package according to the configured release package based on the first protocol, the step includes: acquiring the configured release package based on the first protocol from a dependent package management plug-in. , and the configuration file in the preset path is loaded by the configuration file loader, where the configuration file includes the initialization file of the service publisher corresponding to the publishing package.
可选地,所述通过与所述发布包对应的服务发布器加载所述发布包,以按照所述第一协议发布所述服务之前,包括:将多个服务发布器的初始化文件预先配置在所述配置文件中。Optionally, before loading the publishing package through the service publisher corresponding to the publishing package to publish the service according to the first protocol, the step includes: pre-configuring the initialization files of multiple service publishers in a in the configuration file.
可选地,所述通过与所述发布包对应的服务发布器加载所述发布包,以按照所述第一协议发布所述服务,包括:根据所述配置文件中的与所述发布包对应的服务发布器的初始化文件,动态加载与所述发布包对应的服务发布器的具体实现类,以按照所述第一协议发布所述服务。Optionally, the loading the publishing package through a service publisher corresponding to the publishing package to publish the service according to the first protocol includes: according to the configuration file corresponding to the publishing package The initialization file of the service publisher, dynamically loads the specific implementation class of the service publisher corresponding to the publishing package, so as to publish the service according to the first protocol.
可选地,所述通过基于所述第一协议的所述服务处理接收的请求,包括:根据所述第一协议确定所述请求的类型;按照与所述请求的类型对应的解析规则解析所述请求,以得到执行器标识,所述执行器标识为用于处理所述请求的执行器的标识;根据所述执行器标识从执行器名称查找器中查找对应的执行器名称,并将所述请求路由到所述执行器名称对应的执行器实例进行处理。Optionally, the processing of the received request through the service based on the first protocol includes: determining the type of the request according to the first protocol; parsing the request according to a parsing rule corresponding to the type of the request. The request is obtained to obtain the executor identifier, which is the identifier of the executor used to process the request; according to the executor identifier, the corresponding executor name is searched from the executor name finder, and the The request is routed to the executor instance corresponding to the executor name for processing.
可选地,所述将所述请求路由到所述执行器名称对应的执行器实例进行处理,包括:根据所述执行器名称,从spring容器中检索对应的执行器实例,或者,通过反射机制来完成对所述执行器的实例化以创建所述执行器实例;通过所述执行器实例对所述请求进行处理。Optionally, the routing the request to the executor instance corresponding to the executor name for processing includes: retrieving the corresponding executor instance from the spring container according to the executor name, or through a reflection mechanism to complete the instantiation of the executor to create the executor instance; the request is processed through the executor instance.
根据本发明实施例的另一方面,提供了一种服务协议的切换装置。According to another aspect of the embodiments of the present invention, an apparatus for switching a service protocol is provided.
一种服务协议的切换装置,包括:服务发布器确定模块,用于根据配置的基于第一协议的发布包,确定与所述发布包对应的服务发布器,所述第一协议为与服务当前所基于的第二协议不同的协议;发布包加载模块,用于通过与所述发布包对应的服务发布器加载所述发布包,以按照所述第一协议发布所述服务;请求处理模块,用于通过基于所述第一协议的所述服务处理接收的请求。A service protocol switching device, comprising: a service publisher determining module, configured to determine a service publisher corresponding to the publishing package according to a configured publishing package based on a first protocol, wherein the first protocol is a service current a different protocol based on the second protocol; a release package loading module, configured to load the release package through a service publisher corresponding to the release package, so as to release the service according to the first protocol; a request processing module, for processing the received request by the service based on the first protocol.
可选地,还包括初始化模块,用于:从依赖包管理插件中获取所述配置的基于第一协议的发布包,并通过配置文件加载器加载预设路径中的配置文件,所述配置文件包括与所述发布包对应的服务发布器的初始化文件。Optionally, it also includes an initialization module, which is used to: obtain the configured release package based on the first protocol from the dependency package management plug-in, and load the configuration file in the preset path through the configuration file loader, the configuration file The initialization file of the service publisher corresponding to the publishing package is included.
可选地,所述初始化模块还用于:将多个服务发布器的初始化文件预先配置在所述配置文件中。Optionally, the initialization module is further configured to: preconfigure the initialization files of multiple service publishers in the configuration file.
可选地,所述发布包加载模块还用于:根据所述配置文件中的与所述发布包对应的服务发布器的初始化文件,动态加载与所述发布包对应的服务发布器的具体实现类,以按照所述第一协议发布所述服务。Optionally, the publishing package loading module is further configured to: dynamically load the specific implementation of the service publisher corresponding to the publishing package according to the initialization file of the service publisher corresponding to the publishing package in the configuration file class to publish the service according to the first protocol.
可选地,所述请求处理模块还用于:根据所述第一协议确定所述请求的类型;按照与所述请求的类型对应的解析规则解析所述请求,以得到执行器标识,所述执行器标识为用于处理所述请求的执行器的标识;根据所述执行器标识从执行器名称查找器中查找对应的执行器名称,并将所述请求路由到所述执行器名称对应的执行器实例进行处理。Optionally, the request processing module is further configured to: determine the type of the request according to the first protocol; parse the request according to a parsing rule corresponding to the type of the request to obtain an executor identifier, the The executor identifier is the identifier of the executor used to process the request; according to the executor identifier, the corresponding executor name is searched from the executor name finder, and the request is routed to the corresponding executor name. Executor instance for processing.
可选地,所述请求处理模块还用于:根据所述执行器名称,从spring容器中检索对应的执行器实例,或者,通过反射机制来完成对所述执行器的实例化以创建所述执行器实例;通过所述执行器实例对所述请求进行处理。Optionally, the request processing module is further configured to: retrieve the corresponding executor instance from the spring container according to the executor name, or complete the instantiation of the executor through a reflection mechanism to create the An executor instance; the request is processed through the executor instance.
根据本发明实施例的又一方面,提供了一种电子设备。According to yet another aspect of the embodiments of the present invention, an electronic device is provided.
一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本发明实施例所提供的服务协议的切换方法。An electronic device comprising: one or more processors; a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more programs The multiple processors implement the service protocol switching method provided by the embodiment of the present invention.
根据本发明实施例的又一方面,提供了一种计算机可读介质。According to yet another aspect of the embodiments of the present invention, a computer-readable medium is provided.
一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例所提供的服务协议的切换方法。A computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the service protocol switching method provided by the embodiment of the present invention.
上述发明中的一个实施例具有如下优点或有益效果:根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议;通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务;通过基于第一协议的服务处理接收的请求。能够优化底层程序,解耦对worker调度框架的依赖,所使用的框架完全对于产品化的项目是无侵入式的,无需为了切换协议对worker服务增加对协议的支持或者是适配,减小内存占用,降低研发难度和维护成本,缩短研发时间。An embodiment of the above invention has the following advantages or beneficial effects: according to the configured release package based on the first protocol, the service publisher corresponding to the release package is determined, and the first protocol is different from the second protocol on which the service is currently based. protocol; loading the publishing package through the service publisher corresponding to the publishing package to publish the service according to the first protocol; processing the received request through the service based on the first protocol. It can optimize the underlying program, decouple the dependence on the worker scheduling framework, and the framework used is completely non-intrusive for production projects, and there is no need to increase protocol support or adaptation to worker services in order to switch protocols, reducing memory. Occupy, reduce research and development difficulty and maintenance costs, and shorten research and development time.
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。Further effects of the above non-conventional alternatives will be described below in conjunction with specific embodiments.
附图说明Description of drawings
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used for better understanding of the present invention and do not constitute an improper limitation of the present invention. in:
图1是根据本发明一个实施例的服务协议的切换方法的主要步骤示意图;1 is a schematic diagram of main steps of a method for switching a service protocol according to an embodiment of the present invention;
图2是根据本发明一个实施例的worker适配器内核包的架构示意图;2 is a schematic diagram of the architecture of a worker adapter kernel package according to an embodiment of the present invention;
图3是根据本发明一个实施例的切换服务协议的流程示意图;3 is a schematic flowchart of a handover service protocol according to an embodiment of the present invention;
图4是根据本发明一个实施例的切换服务协议的架构示意图;4 is a schematic diagram of the architecture of a handover service protocol according to an embodiment of the present invention;
图5是根据本发明一个实施例的查找执行器的架构示意图;5 is a schematic diagram of the architecture of a search executor according to an embodiment of the present invention;
图6是根据本发明一个实施例的服务发布器的架构示意图;6 is a schematic diagram of the architecture of a service publisher according to an embodiment of the present invention;
图7是根据本发明一个实施例的服务协议的切换装置的主要模块示意图;FIG. 7 is a schematic diagram of main modules of a device for switching a service protocol according to an embodiment of the present invention;
图8是本发明实施例可以应用于其中的示例性系统架构图;FIG. 8 is an exemplary system architecture diagram to which an embodiment of the present invention may be applied;
图9是适于用来实现本发明实施例的终端设备或服务器的计算机系统的结构示意图。FIG. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
图1是根据本发明一个实施例的服务协议的切换方法的主要步骤示意图。FIG. 1 is a schematic diagram of main steps of a method for switching a service protocol according to an embodiment of the present invention.
如图1所示,本发明一个实施例的服务协议的切换方法主要包括如下的步骤S101至步骤S103。As shown in FIG. 1 , a method for switching a service protocol according to an embodiment of the present invention mainly includes the following steps S101 to S103.
步骤S101:根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议。Step S101: Determine a service publisher corresponding to the publishing package according to the configured publishing package based on the first protocol, where the first protocol is a protocol different from the second protocol on which the service is currently based.
根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器之前,可以包括:从依赖包管理插件中获取配置的基于第一协议的发布包,并通过配置文件加载器加载预设路径中的配置文件,配置文件包括与发布包对应的服务发布器的初始化文件。Before determining the service publisher corresponding to the release package according to the configured release package based on the first protocol, the method may include: obtaining the configured release package based on the first protocol from the dependency package management plug-in, and loading the pre-configured release package through the configuration file loader. Set the configuration file in the path, and the configuration file includes the initialization file of the service publisher corresponding to the release package.
服务发布器(ServerPublisher)用于通过某一协议发布一个服务,该服务即可称为基于该协议的服务。A service publisher (ServerPublisher) is used to publish a service through a certain protocol, and the service can be called a service based on the protocol.
步骤S102:通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务。Step S102: Load the publishing package through the service publisher corresponding to the publishing package, so as to publish the service according to the first protocol.
通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务之前,可以包括:将多个服务发布器的初始化文件预先配置在配置文件中。Before the publishing package is loaded by the service publisher corresponding to the publishing package to publish the service according to the first protocol, the method may include: preconfiguring the initialization files of multiple service publishers in the configuration file.
通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务,可以包括:根据配置文件中的与发布包对应的服务发布器的初始化文件,动态加载与发布包对应的服务发布器的具体实现类,以按照第一协议发布服务。Loading the publishing package by the service publisher corresponding to the publishing package to publish the service according to the first protocol may include: dynamically loading the service publishing corresponding to the publishing package according to the initialization file of the service publisher corresponding to the publishing package in the configuration file The concrete implementation class of the server to publish the service according to the first protocol.
步骤S103:通过基于第一协议的服务处理接收的请求。Step S103: Process the received request through the service based on the first protocol.
基于第一协议的服务可以为worker(定时)服务。The service based on the first protocol may be a worker (timing) service.
通过基于第一协议的服务处理接收的请求,可以包括:根据第一协议确定请求的类型,不同的协议对应的请求的类型不同;按照与请求的类型对应的解析规则解析请求,以得到执行器(Invoker)标识,执行器标识为用于处理请求的执行器的标识,例如,在发布的服务协议为http服务的情况下,请求的类型为http服务的类型,对应的解析规则为解析http的URI,则解析出请求中包含的http的URI作为routerkey(即执行器标识);在发布的服务协议为jsf或者是dubbo协议的情况下,请求的类型为jsf或者是dubbo协议的类型,对应的解析规则为解析RPC(远程过程调用协议)所使用的alias(别名),则解析出请求中包含的RPC所使用的alias作为routerkey;根据执行器标识从执行器名称(InvokerName)查找器中查找对应的执行器名称,并将请求路由到执行器名称对应的执行器实例进行处理。Processing the received request through the service based on the first protocol may include: determining the type of the request according to the first protocol, the types of requests corresponding to different protocols are different; (Invoker) identifier, the executor identifier is the identifier of the executor used to process the request. For example, when the published service protocol is the http service, the type of the request is the type of the http service, and the corresponding parsing rule is the parsing http service. URI, the URI of http contained in the request is parsed as routerkey (that is, the identifier of the executor); if the published service protocol is jsf or dubbo protocol, the request type is jsf or dubbo protocol, and the corresponding The parsing rule is to parse the alias (alias) used by the RPC (Remote Procedure Call Protocol), then the alias used by the RPC contained in the request is parsed as the routerkey; the corresponding executor name (InvokerName) finder is searched according to the executor identifier. the executor name, and route the request to the executor instance corresponding to the executor name for processing.
将请求路由到执行器名称对应的执行器实例进行处理,可以包括:根据执行器名称,从spring容器中检索对应的执行器实例,或者,通过反射机制来完成对执行器的实例化以创建执行器实例,执行器实例中包括用于处理接收的请求的方法;通过执行器实例对请求进行处理。Routing the request to the executor instance corresponding to the executor name for processing can include: retrieving the corresponding executor instance from the spring container according to the executor name, or completing the instantiation of the executor through the reflection mechanism to create an execution The executor instance includes a method for processing the received request; the request is processed through the executor instance.
在一个实施例中,根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,从依赖包管理插件中获取配置的基于第一协议的发布包,第一协议为与服务当前所基于的第二协议不同的协议。具体地,根据使用环境确定所需要的服务协议,将该服务协议(即第一协议)的发布包配置到依赖包管理插件中,并替换依赖包管理插件中的原来的服务协议(即第二协议),从而从依赖包管理插件中获取配置的基于该服务协议的发布包,以作为worker适配器内核包(worker-adapter-core),其中,worker适配器内核包用于在worker服务中配置服务协议。本发明一个实施例的worker适配器内核包的架构如图2所示,服务协议的发布包可以为rest(Representational State Transfer,表现层状态转移,一种软件架构风格)服务发布包、dubbo(一个高性能优秀的服务框架)协议发布包、jsf(一种用于构建Java Web应用程序的标准框架)发布包等发布包中的一种。在使用spring(一个开放源代码的J2EE应用程序框架)容器的情况下,可以将服务协议的发布包作为worker适配器适配spring包(worker-adapter-spring),从而通过spring容器得到worker适配器内核包。其中,worker适配器适配spring包为在spring托管时的worker适配器内核包。In one embodiment, according to the configured release package based on the first protocol, a service publisher corresponding to the release package is determined, and the configured release package based on the first protocol is obtained from the dependency package management plug-in, where the first protocol is and service The second protocol currently based on is a different protocol. Specifically, determine the required service protocol according to the usage environment, configure the release package of the service protocol (ie the first protocol) into the dependent package management plug-in, and replace the original service protocol (ie the second protocol) in the dependent package management plug-in protocol), so as to obtain the configured release package based on the service protocol from the dependency package management plugin as the worker adapter kernel package (worker-adapter-core), where the worker adapter kernel package is used to configure the service protocol in the worker service . The architecture of the worker adapter kernel package according to an embodiment of the present invention is shown in Figure 2. The release package of the service protocol can be a rest (Representational State Transfer, a software architecture style) service release package, dubbo (a high Service framework with excellent performance) protocol release package, jsf (a standard framework for building Java Web applications) release package and other release packages. In the case of using the spring (an open source J2EE application framework) container, the release package of the service protocol can be used as a worker adapter to adapt the spring package (worker-adapter-spring) to obtain the worker adapter kernel package through the spring container . Among them, the worker adapter adaptation spring package is the worker adapter kernel package when hosted in spring.
在一个实施例中,将多个服务发布器的初始化文件预先配置在配置文件中,通过配置文件加载器加载预设路径中的配置文件,配置文件包括与发布包对应的服务发布器的初始化文件。在worker适配器(worker adapter)启动之后,可以通过配置文件加载器加载预设路径中的配置文件,以通过初始化执行器管理器实现与发布包对应的服务发布器的初始化,以及完成执行器名称查找器和执行器实例查找器的数据初始化,以便于在后续流程中使用服务发布器,以及执行器名称查找器和执行器实例查找器。其中,worker适配器即在worker服务中的定义的一个包装类,用于包装不兼容接口的对象,被包装对象可以为被适配的类,执行器管理器中设置有服务发布器API层,其中包括dubbo协议发布器、jsf协议发布器、rest服务协议发布器等多个服务发布器。在使用spring容器进行托管的情况下,可以根据用户在spring容器上下文中配置的变量(即worker.config.path)来确定预设路径,若未对预设路径进行配置,则预设路径为默认路径(即worker.config.properties)。In one embodiment, the initialization files of multiple service publishers are pre-configured in the configuration file, the configuration files in the preset path are loaded by the configuration file loader, and the configuration files include the initialization files of the service publishers corresponding to the release package . After the worker adapter is started, the configuration file in the preset path can be loaded through the configuration file loader to initialize the service publisher corresponding to the release package through the initialization executor manager, and complete the executor name lookup Data initialization for the executor and executor instance finder for use of the service publisher in subsequent processes, as well as the executor name finder and executor instance finder. Among them, the worker adapter is a wrapper class defined in the worker service, which is used to wrap objects with incompatible interfaces. The wrapped object can be an adapted class. The executor manager is provided with a service publisher API layer, where Including multiple service publishers such as dubbo protocol publisher, jsf protocol publisher, and rest service protocol publisher. In the case of using the spring container for hosting, the default path can be determined according to the variable (ie worker.config.path) configured by the user in the spring container context. If the default path is not configured, the default path is the default Path (ie worker.config.properties).
图3是根据本发明一个实施例的切换服务协议的流程示意图。FIG. 3 is a schematic flowchart of a handover service protocol according to an embodiment of the present invention.
如图3所示,在worker(即定时)服务中,启动worker启动器(即worker适配器启动器),该worker适配器启动器是worker服务启动的入口,也是对内核服务的加载发布和处理的统一调度入口,其内部的流程全部由worker启动器来执行,为worker服务提供了统一的入口。触发配置文件加载器对配置文件进行加载,通过加载与发布包对应的服务发布器的初始化文件完成对与发布包对应的服务发布器的初始化,得到与发布包对应的服务发布器。通过与发布包对应的服务发布器对服务协议的发布包按照SPI(串行外设接口)的方式进行动态加载,以发布服务协议。接收待处理的请求,基于发布的服务协议获取请求中的routerkey(即执行器标识)。根据routerkey在执行器名称查找器中查找对应的执行器名称,基于查找到的执行器名称在执行器实例查找器中得到执行器实例,执行该执行器实例中的方法以处理接收的请求。通过本发明实施例可以实现worker的服务协议的修改,只需要通过修改配置文件即可完成,其它的代码层面无需任何修改,实现零代码一键切换的目的。As shown in Figure 3, in the worker (ie timing) service, start the worker launcher (ie the worker adapter launcher), the worker adaptor launcher is the entry point for the worker service to start, and it is also the unification of the loading, publishing and processing of the kernel service. Scheduling entry, the internal processes are all executed by the worker initiator, which provides a unified entry for the worker service. Trigger the configuration file loader to load the configuration file, complete the initialization of the service publisher corresponding to the release package by loading the initialization file of the service publisher corresponding to the release package, and obtain the service publisher corresponding to the release package. The publishing package of the service protocol is dynamically loaded in the manner of SPI (Serial Peripheral Interface) by the service publisher corresponding to the publishing package, so as to publish the service protocol. Receive the pending request, and obtain the routerkey (that is, the executor identifier) in the request based on the published service protocol. Find the corresponding executor name in the executor name finder according to the routerkey, obtain the executor instance in the executor instance finder based on the found executor name, and execute the method in the executor instance to process the received request. The modification of the service protocol of the worker can be realized by the embodiment of the present invention, which can be completed only by modifying the configuration file, and other code layers do not need any modification, thereby realizing the purpose of zero-code one-key switching.
在一个实施例中,根据第一协议确定请求的类型,按照与请求的类型对应的解析规则解析请求,以得到执行器标识,执行器标识为用于处理请求的执行器的标识。例如,在发布的服务协议为http服务的情况下,请求的类型为http服务的类型,则解析出请求中包含的http的URI作为routerkey;在发布的服务协议为jsf或者是dubbo协议的情况下,请求的类型为jsf或者是dubbo协议的类型,则解析出请求中包含的RPC(远程过程调用协议)所使用的alias(别名)作为routerkey。其中,routerkey是配置文件的key,在worker服务中是执行器的唯一标识。In one embodiment, the type of the request is determined according to the first protocol, and the request is parsed according to a parsing rule corresponding to the type of the request to obtain an executor identifier, where the executor identifier is an identifier of an executor for processing the request. For example, if the published service protocol is the http service, and the type of the request is the type of the http service, the http URI contained in the request will be parsed as the routerkey; if the published service protocol is the jsf or dubbo protocol , the type of the request is jsf or the type of the dubbo protocol, then the alias (alias) used by the RPC (Remote Procedure Call Protocol) contained in the request is parsed as the routerkey. Among them, routerkey is the key of the configuration file, which is the unique identifier of the executor in the worker service.
在一个实施例中,根据执行器名称,从spring容器中检索对应的执行器实例,或者,通过反射机制来完成对执行器的实例化以创建执行器实例,通过执行器实例对请求进行处理。具体地,在使用spring托管的情况下,可以根据执行器名称,通过内置的spring容器检索对应的执行器实例,并通过默认的反射机制完成对执行器实例的创建。In one embodiment, according to the name of the executor, the corresponding executor instance is retrieved from the spring container, or the executor instance is instantiated through the reflection mechanism to create the executor instance, and the request is processed through the executor instance. Specifically, in the case of using spring hosting, you can retrieve the corresponding executor instance through the built-in spring container according to the executor name, and complete the creation of the executor instance through the default reflection mechanism.
在一个实施例中,依赖包管理插件可以为maven(项目管理工具)插件,maven插件可以根据需要使用到的依赖包(即发布包)配置多种环境,每个环境中可以使用不同的依赖包,通过maven的profiles(个性化环境)激活需要使用的服务协议。In one embodiment, the dependency package management plugin may be a maven (project management tool) plugin, and the maven plugin may configure multiple environments according to the dependency packages (ie release packages) used as needed, and different dependency packages may be used in each environment , activate the service agreement that needs to be used through maven's profiles (personalized environment).
图4是根据本发明一个实施例的切换服务协议的架构示意图。FIG. 4 is a schematic structural diagram of a handover service protocol according to an embodiment of the present invention.
如图4所示,协议枚举类包括http、jsf、dubbo等服务协议,服务配置中包括配置文件,按照需要使用的服务协议配置协议,协议配置管理器中包括多个服务发布器,服务配置加载器(即配置文件加载器)用于对配置文件的加载,服务配置加载器接口用于配置预设路径。As shown in Figure 4, the protocol enumeration class includes service protocols such as http, jsf, and dubbo. The service configuration includes configuration files, and the protocol is configured according to the required service protocol. The protocol configuration manager includes multiple service publishers, service configuration The loader (that is, the configuration file loader) is used to load the configuration file, and the service configuration loader interface is used to configure the preset path.
图5是根据本发明一个实施例的查找执行器的架构示意图。FIG. 5 is a schematic diagram of the architecture of a search executor according to an embodiment of the present invention.
如图5所示,执行器用于处理消息类,具体可处理接收的请求,服务实例工厂(BeanFactoryAware)包括多个执行器实例,默认执行器查找器(DefaultInvokerFinder)用于查找处理该请求的执行器(Invoker),spring上下文实例查找器(SpringInvokerFinder)和默认实例查找器用于查找执行器的具体实例,实例名称查找器(BeanNameFinder)用于查找执行器实例的名称,执行器查找器(InvokerFinder)接口用于与执行器管理器(InvokerManager)连接。As shown in Figure 5, the executor is used to process the message class, which can specifically process the received request. The service instance factory (BeanFactoryAware) includes multiple executor instances, and the default executor finder (DefaultInvokerFinder) is used to find the executor that processes the request. (Invoker), the spring context instance finder (SpringInvokerFinder) and the default instance finder are used to find the specific instance of the executor, the instance name finder (BeanNameFinder) is used to find the name of the executor instance, and the executor finder (InvokerFinder) interface is used for To connect with the InvokerManager (InvokerManager).
图6是根据本发明一个实施例的服务发布器的架构示意图。FIG. 6 is a schematic diagram of the architecture of a service publisher according to an embodiment of the present invention.
如图6所示,服务发布器API层可以位于执行器管理器中,其具体实现类包括dubbo协议发布器、jsf协议发布器、rest服务协议发布器等多个服务发布器,根据多个的服务发布器对实例初始化器(initializingBean)进行配置,其中,实例初始化器是spring中的一个可以进一步调整bean的实例的接口。As shown in Figure 6, the service publisher API layer can be located in the executor manager, and its specific implementation classes include multiple service publishers such as dubbo protocol publisher, jsf protocol publisher, and rest service protocol publisher. The service publisher configures the instance initializer (initializingBean), which is an interface in spring that can further adjust the instance of the bean.
图7是根据本发明一个实施例的服务协议的切换装置的主要模块示意图。FIG. 7 is a schematic diagram of main modules of an apparatus for switching a service protocol according to an embodiment of the present invention.
如图7所示,本发明一个实施例的服务协议的切换装置700主要包括:服务发布器确定模块701、发布包加载模块702、请求处理模块703。As shown in FIG. 7 , an
服务发布器确定模块701,用于根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议。The service
发布包加载模块702,用于通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务。The publishing
请求处理模块703,用于通过基于第一协议的服务处理接收的请求。The
在一个实施例中,还可以包括初始化模块,用于:从依赖包管理插件中获取配置的基于第一协议的发布包,并通过配置文件加载器加载预设路径中的配置文件,配置文件包括与发布包对应的服务发布器的初始化文件。In one embodiment, an initialization module may also be included, configured to: obtain the configured release package based on the first protocol from the dependency package management plug-in, and load the configuration file in the preset path through the configuration file loader, where the configuration file includes The initialization file of the service publisher corresponding to the distribution package.
在一个实施例中,初始化模块具体用于:将多个服务发布器的初始化文件预先配置在配置文件中。In one embodiment, the initialization module is specifically configured to: preconfigure the initialization files of multiple service publishers in the configuration file.
在一个实施例中,发布包加载模块702具体用于:根据配置文件中的与发布包对应的服务发布器的初始化文件,动态加载与发布包对应的服务发布器的具体实现类,以按照第一协议发布服务。In one embodiment, the release
在一个实施例中,请求处理模块703具体用于:根据第一协议确定请求的类型;按照与请求的类型对应的解析规则解析请求,以得到执行器标识,执行器标识为用于处理请求的执行器的标识;根据执行器标识从执行器名称查找器中查找对应的执行器名称,并将请求路由到执行器名称对应的执行器实例进行处理。In one embodiment, the
在一个实施例中,请求处理模块703具体用于:根据执行器名称,从spring容器中检索对应的执行器实例,或者,通过反射机制来完成对执行器的实例化以创建执行器实例;通过执行器实例对请求进行处理。In one embodiment, the
另外,在本发明实施例中服务协议的切换装置的具体实施内容,在上面服务协议的切换方法中已经详细说明了,故在此重复内容不再说明。In addition, the specific implementation content of the device for switching the service protocol in the embodiment of the present invention has been described in detail in the above method for switching the service protocol, so the repeated content will not be described here.
图8示出了可以应用本发明实施例的服务协议的切换方法或服务协议的切换装置的示例性系统架构800。FIG. 8 shows an
如图8所示,系统架构800可以包括终端设备801、802、803,网络804和服务器805。网络804用以在终端设备801、802、803和服务器805之间提供通信链路的介质。网络804可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 8 , the
用户可以使用终端设备801、802、803通过网络804与服务器805交互,以接收或发送消息等。终端设备801、802、803上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the
终端设备801、802、803可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The
服务器805可以是提供各种服务的服务器,例如对用户利用终端设备801、802、803所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。The
需要说明的是,本发明实施例所提供的服务协议的切换方法一般由服务器805执行,相应地,服务协议的切换装置一般设置于服务器805中。It should be noted that the method for switching the service protocol provided by the embodiment of the present invention is generally performed by the
应该理解,图8中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 8 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
下面参考图9,其示出了适于用来实现本发明实施例的终端设备或服务器的计算机系统900的结构示意图。图9示出的终端设备或服务器仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring to FIG. 9 below, it shows a schematic structural diagram of a
如图9所示,计算机系统900包括中央处理单元(CPU)901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有系统900操作所需的各种程序和数据。CPU 901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。As shown in FIG. 9, a
以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。The following components are connected to the I/O interface 905: an
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被中央处理单元(CPU)901执行时,执行本发明的系统中限定的上述功能。In particular, the processes described above with reference to the flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the present invention. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括服务发布器确定模块、发布包加载模块、请求处理模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,服务发布器确定模块还可以被描述为“用于根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器的模块”。The modules involved in the embodiments of the present invention may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules can also be set in the processor, for example, it can be described as: a processor includes a service publisher determining module, a publishing package loading module, and a request processing module. Wherein, the names of these modules do not constitute a limitation of the module itself under certain circumstances. For example, the service publisher determination module can also be described as "used to determine and publish according to the configured publishing package based on the first protocol. The module of the service publisher corresponding to the package".
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议;通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务;通过基于第一协议的服务处理接收的请求。As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: according to the configured release package based on the first protocol, determine the service corresponding to the release package Publisher, the first protocol is a different protocol from the second protocol that the service is currently based on; the publishing package is loaded by the service publisher corresponding to the publishing package to publish the service according to the first protocol; the service processing based on the first protocol receives request.
根据本发明实施例的技术方案,根据配置的基于第一协议的发布包,确定与发布包对应的服务发布器,第一协议为与服务当前所基于的第二协议不同的协议;通过与发布包对应的服务发布器加载发布包,以按照第一协议发布服务;通过基于第一协议的服务处理接收的请求。能够优化底层程序,减小内存占用,降低研发难度和维护成本,缩短研发时间。According to the technical solution of the embodiment of the present invention, a service publisher corresponding to the publishing package is determined according to the configured publishing package based on the first protocol, where the first protocol is a different protocol from the second protocol on which the service is currently based; The service publisher corresponding to the package loads the publishing package to publish the service according to the first protocol; and processes the received request through the service based on the first protocol. It can optimize the underlying program, reduce memory usage, reduce R&D difficulty and maintenance cost, and shorten R&D time.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210255450.XA CN114640720A (en) | 2022-03-15 | 2022-03-15 | Service protocol switching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210255450.XA CN114640720A (en) | 2022-03-15 | 2022-03-15 | Service protocol switching method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114640720A true CN114640720A (en) | 2022-06-17 |
Family
ID=81948604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210255450.XA Pending CN114640720A (en) | 2022-03-15 | 2022-03-15 | Service protocol switching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114640720A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060094413A1 (en) * | 2004-11-01 | 2006-05-04 | Evans Mark S | Application protocol identification |
US20130275489A1 (en) * | 2012-04-12 | 2013-10-17 | Oracle International Corporation | Integration of web services with a clustered actor based model |
CN105245369A (en) * | 2015-10-12 | 2016-01-13 | 天津市普迅电力信息技术有限公司 | Component issuing container method supporting multiple transport protocols |
CN112751812A (en) * | 2019-10-31 | 2021-05-04 | 北京京东振世信息技术有限公司 | Method and device for self-adapting application protocol |
CN113778499A (en) * | 2020-08-21 | 2021-12-10 | 北京京东振世信息技术有限公司 | Method, device, equipment and computer readable medium for publishing service |
-
2022
- 2022-03-15 CN CN202210255450.XA patent/CN114640720A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060094413A1 (en) * | 2004-11-01 | 2006-05-04 | Evans Mark S | Application protocol identification |
US20130275489A1 (en) * | 2012-04-12 | 2013-10-17 | Oracle International Corporation | Integration of web services with a clustered actor based model |
CN105245369A (en) * | 2015-10-12 | 2016-01-13 | 天津市普迅电力信息技术有限公司 | Component issuing container method supporting multiple transport protocols |
CN112751812A (en) * | 2019-10-31 | 2021-05-04 | 北京京东振世信息技术有限公司 | Method and device for self-adapting application protocol |
CN113778499A (en) * | 2020-08-21 | 2021-12-10 | 北京京东振世信息技术有限公司 | Method, device, equipment and computer readable medium for publishing service |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111045833B (en) | Interface calling method and device | |
WO2019015272A1 (en) | Information processing method and device | |
CN113821352B (en) | A remote service calling method and device | |
CN113010405B (en) | A method and device for testing an application program | |
CN110795328A (en) | Interface testing method and device | |
CN112306984A (en) | A data source routing method and device | |
CN113127225A (en) | Method, device and system for scheduling data processing tasks | |
CN113595927A (en) | Method and device for processing mirror flow in bypass mode | |
CN112905273A (en) | Service calling method and device | |
CN110795135A (en) | A method and apparatus for realizing annotated configuration | |
CN113765983B (en) | Site service deployment method and device | |
CN114422637B (en) | Media request processing method and cross-platform engine system | |
CN115080274A (en) | Business processing method, apparatus and system, and interface mapping system | |
CN109981546B (en) | Method and device for acquiring remote call relation between application modules | |
CN110119279B (en) | Application and upgrading method and device thereof | |
CN116561013B (en) | Test methods, devices, electronic equipment and media based on the target service framework | |
CN117194068A (en) | Cross-process data transmission method, system, equipment and storage medium | |
CN114640720A (en) | Service protocol switching method and device | |
CN111984616A (en) | A method, device and system for updating shared files | |
CN113961376A (en) | Message middleware switching method and device | |
CN113760487B (en) | Service processing method and device | |
CN114860213A (en) | Application package generation method, device, equipment and medium | |
CN114924881A (en) | Method and device for querying state data result | |
WO2021243665A1 (en) | Compilation method, compilation apparatus, compilation system, storage medium, and electronic device | |
CN113946458A (en) | Method and device for realizing client proxy |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220617 |
|
RJ01 | Rejection of invention patent application after publication |