[go: up one dir, main page]

CN114461424A - Inter-unit service discovery method, device and system under unitized deployment architecture - Google Patents

Inter-unit service discovery method, device and system under unitized deployment architecture Download PDF

Info

Publication number
CN114461424A
CN114461424A CN202210129582.8A CN202210129582A CN114461424A CN 114461424 A CN114461424 A CN 114461424A CN 202210129582 A CN202210129582 A CN 202210129582A CN 114461424 A CN114461424 A CN 114461424A
Authority
CN
China
Prior art keywords
unit
service
cross
service provider
unitized
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
CN202210129582.8A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210129582.8A priority Critical patent/CN114461424A/en
Publication of CN114461424A publication Critical patent/CN114461424A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a device and a system for discovering inter-unit services under a unit deployment architecture, which can be applied to the field of finance, wherein the invention takes a cross-unit service manager as an execution main body and comprises the following steps: monitoring the starting action of the cross-unit service, and registering the service provider information of the cross-unit service; and sending the registered service provider information to the cross-unit calling server so that the cross-unit calling server sends the service provider information to the service consumer. The method and the device solve the problem that under the service scene that a transaction opponent exists or part of services cannot be unitized, the transaction cannot be closed in the unit, and the transaction between two cross-unit services is realized.

Description

单元化部署架构下的单元间服务发现方法、装置及系统Inter-unit service discovery method, device and system under unitized deployment architecture

技术领域technical field

本申请属于计算机技术领域,具体地讲,涉及一种单元化部署架构下的单元间服务发现方法、装置及系统。The present application belongs to the field of computer technology, and in particular, relates to an inter-unit service discovery method, device and system under a unitized deployment architecture.

背景技术Background technique

单元化架构就是把单元作为系统部署的基本单位,在全站所有机房中部署数个单元,任意一个单元都部署了系统所需的所有应用,数据则是全量数据按照某种维度(通常是客户维度)水平划分后的一部分。单元化就是将服务和数据设计改造让其符合单元特征的过程。在单元化部署架构背景下,正常情况下,交易基本都能在本单元内闭环,但在有交易对手存在或部分服务无法单元化的业务场景下,交易并不能在本单元内闭环,所以如何实现不同单元的两个服务之间的交易是个问题。The unitized architecture is to use the unit as the basic unit of system deployment. Several units are deployed in all computer rooms of the whole station. All the applications required by the system are deployed in any unit. The data is the full amount of data according to a certain dimension (usually the customer dimension) part of the horizontal division. Unitization is the process of designing services and data to conform to the characteristics of a unit. Under the background of unitized deployment architecture, under normal circumstances, transactions can basically be closed in this unit, but in business scenarios where there is a counterparty or some services cannot be unitized, transactions cannot be closed in this unit, so how to Implementing transactions between two services in different units is a problem.

目前,针对跨单元场景,业界里主要采用的技术方案包括:zProxy方案、antVIP方案和注册中心同步方案。At present, for cross-unit scenarios, the main technical solutions adopted in the industry include: zProxy solution, antVIP solution and registry synchronization solution.

如图1所示,zProxy方案中消费者服务调用时,如果目标单元不是本单元,则自动筛选到zProxy节点,然后zProxy节点RPC方式调用目标单元的服务。但是,代理节点需要订阅大量服务,存在较大的订阅缓存压力,同时跨单元服务调用由zProxy节点转发,会多一次服务调用的开销。As shown in Figure 1, when the consumer service is called in the zProxy scheme, if the target unit is not the unit, the zProxy node will be automatically screened, and then the zProxy node will call the service of the target unit by RPC. However, the proxy node needs to subscribe to a large number of services, and there is a large subscription cache pressure. At the same time, the cross-unit service call is forwarded by the zProxy node, which will increase the cost of one service call.

如图2所示,antVIP方案中消费者服务调用时,如果目标单元不是本单元,则使用antVIP规则拼装URL地址,获取目标单元提供者地址,通过RPC方式调用服务。但是该方案需要云平台配合,且手工配置方式无法保证时效。As shown in Figure 2, when the consumer service is called in the antVIP scheme, if the target unit is not the unit, the antVIP rule is used to assemble the URL address, the provider address of the target unit is obtained, and the service is called by RPC. However, this solution requires the cooperation of the cloud platform, and the manual configuration method cannot guarantee the timeliness.

如图3所示,注册中心之间数据同步,每个注册中心都由完整的服务提供者列表;消费者服务调用时,根据目标单元筛选提供者列表即可。但是银行使用的zookeeper及sofa注册中心不支持数据同步,且根据调研,无合适的zookeeper/sofa数据同步工具;同时消费端需要订阅所有单元的服务提供方,存在订阅缓存及连接数的压力。As shown in Figure 3, data is synchronized between registration centers, and each registration center has a complete list of service providers; when the consumer service is invoked, the provider list can be filtered according to the target unit. However, the zookeeper and the sofa registration center used by the bank do not support data synchronization, and according to the research, there is no suitable zookeeper/sofa data synchronization tool; at the same time, the consumer needs to subscribe to the service providers of all units, and there is pressure to subscribe to the cache and the number of connections.

发明内容SUMMARY OF THE INVENTION

本申请提供了一种单元化部署架构下的单元间服务发现方法、装置及系统,以至少解决现有技术中跨单元间服务存在较大的订阅缓存压力,开销大,手工配置方式无法保证时效等问题。The present application provides an inter-unit service discovery method, device and system under a unitized deployment architecture, so as to at least solve the problem of the large subscription cache pressure in the cross-unit service in the prior art, the overhead is high, and the manual configuration method cannot guarantee the timeliness And other issues.

根据本申请的一个方面,提供了一种单元化部署架构下的单元间服务发现方法,以跨单元服务管理器为执行主体,包括:According to an aspect of the present application, an inter-unit service discovery method under a unitized deployment architecture is provided, using a cross-unit service manager as an execution subject, including:

监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记;Monitor the startup action of the cross-unit service, and register the service provider information of the cross-unit service;

将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。The registered service provider information is sent to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

在一具体实施例中,单元化部署架构下的单元间服务发现方法,还包括:In a specific embodiment, the inter-unit service discovery method under the unitized deployment architecture further includes:

监听服务提供方的信息变更动作,并对跨单元服务的服务提供方信息进行更新后推送至跨单元调用服务器。Monitor the information change action of the service provider, update the service provider information of the cross-unit service, and push it to the cross-unit invocation server.

根据本申请的另一个方面,还提供了一种单元化部署架构下的单元间服务发现方法,以跨单元调用服务器,包括:According to another aspect of the present application, an inter-unit service discovery method under a unitized deployment architecture is also provided to invoke a server across units, including:

接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方;Receive service provider registration or change information sent by the cross-unit service manager and forward it to the service consumer;

解析服务消费方发起的服务调用请求获取服务提供方地址;Parse the service call request initiated by the service consumer to obtain the address of the service provider;

根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。According to the address of the service provider, a call is made to the server of the service provider based on the soft load balancing algorithm.

在一实施例中,单元化部署架构下的单元间服务发现方法,还包括:In one embodiment, the inter-unit service discovery method under the unitized deployment architecture further includes:

当向服务提供方发起调用失败时,采用RPC长连接点对点的方式调用预存的本地服务提供方地址列表中的其他服务提供方的服务器。When initiating a call to the service provider fails, the server of other service providers in the pre-stored local service provider address list is called by means of a point-to-point RPC connection.

根据本申请的第三个方面,提供了一种单元化部署架构下的单元间服务发现系统,包括:分别部署在服务提供方的若干个监听单元,跨单元服务管理器和跨单元调用服务器;监听单元与跨单元服务管理器通信连接,跨单元服务管理器与跨单元调用服务器通信连接;According to a third aspect of the present application, an inter-unit service discovery system under a unitized deployment architecture is provided, including: several monitoring units respectively deployed on the service provider, a cross-unit service manager and a cross-unit invocation server; The monitoring unit is in communication connection with the cross-unit service manager, and the cross-unit service manager is in communication and connection with the cross-unit invocation server;

监听单元用于监听服务提供方的动作;The monitoring unit is used to monitor the actions of the service provider;

跨单元服务管理器用于进行跨单元服务的管理和登记;The cross-unit service manager is used to manage and register cross-unit services;

跨单元调用服务器用于实现跨单元交易的订阅和调用。The cross-unit invocation server is used to implement subscription and invocation of cross-unit transactions.

根据本申请的第四个方面,提供了一种单元化部署架构下的单元间服务发现装置,以跨单元管理服务器为执行主体,包括:According to a fourth aspect of the present application, an inter-unit service discovery device under a unitized deployment architecture is provided, using the cross-unit management server as the execution body, including:

监听单元,用于监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记;The monitoring unit is used to monitor the startup action of the cross-unit service and register the service provider information of the cross-unit service;

信息发送单元,用于将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。The information sending unit is configured to send the registered service provider information to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

在一实施例中,单元化部署架构下的单元间服务发现装置,还包括:In one embodiment, the inter-unit service discovery apparatus under the unitized deployment architecture further includes:

信息变更单元,用于监听服务提供方的信息变更动作,并对跨单元服务的服务提供方信息进行更新后推送至跨单元调用服务器。The information changing unit is used to monitor the information changing action of the service provider, update the service provider information of the cross-unit service, and then push it to the cross-unit calling server.

根据本申请的第五个方面,以跨单元调用服务器为执行主体,还提供了一种单元化部署架构下的单元间服务发现装置,包括:According to the fifth aspect of the present application, an inter-unit service discovery device under a unitized deployment architecture is also provided with the cross-unit invocation server as the execution body, including:

接收单元,用于接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方;a receiving unit, configured to receive the service provider registration or change information sent by the cross-unit service manager and forward it to the service consumer;

解析单元,用于解析服务消费方发起的服务调用请求获取服务提供方地址;The parsing unit is used to parse the service invocation request initiated by the service consumer to obtain the address of the service provider;

调用单元,用于根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。The calling unit is configured to initiate a call to the server of the service provider based on the soft load balancing algorithm according to the address of the service provider.

在一实施例中,单元化部署架构下的单元间服务发现装置还包括:In one embodiment, the inter-unit service discovery apparatus under the unitized deployment architecture further includes:

备用调用单元,用于当向服务提供方发起调用失败时,采用RPC长连接点对点的方式调用预存的本地服务提供方地址列表中的其他服务提供方的服务器。The standby invocation unit is used for invoking the servers of other service providers in the pre-stored local service provider address list by adopting the RPC long connection point-to-point mode when the invocation to the service provider fails.

本申请通过在全站所有机房中部署数个单元,任意一个单元都部署了系统所需的所有应用,然后将服务和数据设计改造让其符合单元的特征,在单元化部署架构的背景下,正常情况下,服务提供者在启动时,向本单元内的注册中心注册自己提供的服务,服务消费者在启动时,向本单元内注册中心订阅自己需要的服务,所以正常情况下,交易基本都能在本单元内实现闭环。本申请解决了在有交易对手存在或部分服务无法单元化的业务场景下,交易并不能在本单元内闭环,实现跨单元的两个服务之间的交易的问题。In this application, by deploying several units in all computer rooms of the whole station, all applications required by the system are deployed in any unit, and then the service and data are designed and transformed to conform to the characteristics of the unit. In the context of the unitized deployment architecture, Under normal circumstances, the service provider registers the services it provides with the registration center in this unit when it starts up, and the service consumer subscribes the services it needs to the registration center in this unit when it starts up. Therefore, under normal circumstances, the transaction is basically A closed loop can be realized in this unit. This application solves the problem that the transaction cannot be closed-loop within the unit to realize the transaction between two cross-unit services in a business scenario where a counterparty exists or some services cannot be unitized.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1至图3为现有技术中的跨单元服务调用系统结构图。1 to 3 are structural diagrams of a cross-unit service invocation system in the prior art.

图4为本申请提供的一种单元化部署架构下的单元间服务发现系统结构框图。FIG. 4 is a structural block diagram of an inter-unit service discovery system under a unitized deployment architecture provided by the present application.

图5为本申请提供的以跨单元管理服务器为执行主体的单元间服务发现方法流程图。FIG. 5 is a flowchart of an inter-unit service discovery method provided by the present application with a cross-unit management server as an execution subject.

图6为本申请提供的以跨单元调用服务器为执行主体的单元间服务发现方法流程图。FIG. 6 is a flowchart of an inter-unit service discovery method with a cross-unit invocation server as an execution subject provided by the present application.

图7为本申请提供的以跨单元管理服务器为执行主体的单元间服务发现装置结构框图。FIG. 7 is a structural block diagram of an inter-unit service discovery apparatus with a cross-unit management server as an execution subject provided by the present application.

图8为本申请提供的以跨单元调用服务器为执行主体的单元间服务发现装置结构框图。FIG. 8 is a structural block diagram of an inter-unit service discovery apparatus with a cross-unit invocation server as an execution subject provided by the present application.

图9为本申请实施例中一种电子设备的具体实施方式。FIG. 9 is a specific implementation manner of an electronic device in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在单元化部署架构背景下,正常情况下,交易基本都能在本单元内闭环,但在有交易对手存在或部分服务无法单元化的业务场景下,交易并不能在本单元内闭环,所以如何实现不同单元的两个服务之间的交易是个问题。Under the background of unitized deployment architecture, under normal circumstances, transactions can basically be closed in this unit, but in business scenarios where there is a counterparty or some services cannot be unitized, transactions cannot be closed in this unit, so how to Implementing transactions between two services in different units is a problem.

为了解决该问题,本申请提供了一种单元化部署架构下的单元间服务发现系统,如图4所示,包括:分别部署在服务提供方的若干个监听单元,跨单元服务管理器和跨单元调用服务器;监听单元与跨单元服务管理器通信连接,跨单元服务管理器与跨单元调用服务器通信连接;In order to solve this problem, the present application provides an inter-unit service discovery system under a unitized deployment architecture, as shown in FIG. 4 , including: several monitoring units respectively deployed on the service provider, a cross-unit service manager and a cross-unit service manager. The unit call server; the monitoring unit is communicated and connected with the cross-unit service manager, and the cross-unit service manager is communicated and connected with the cross-unit call server;

监听单元用于监听服务提供方的动作;The monitoring unit is used to monitor the actions of the service provider;

跨单元服务管理器用于进行跨单元服务的管理和登记;The cross-unit service manager is used to manage and register cross-unit services;

跨单元调用服务器用于实现跨单元交易的订阅和调用。The cross-unit invocation server is used to implement subscription and invocation of cross-unit transactions.

单元化架构就是把单元作为系统部署的基本单位,在全站所有机房中部署数个单元,任意一个单元都部署了系统所需的所有应用,数据则是全量数据按照客户维度水平划分后的一部分。单元化就是将服务和数据设计改造让其符合单元特征的过程。The unitized architecture is to use the unit as the basic unit of system deployment. Several units are deployed in all computer rooms of the whole station. All applications required by the system are deployed in any unit. The data is a part of the full data divided according to the customer dimension level. . Unitization is the process of designing services and data to conform to the characteristics of a unit.

在一具体实施例中,在单元化部署架构背景下,正常情况下,服务提供者在启动时,向本单元内的注册中心注册自己提供的服务。服务消费者在启动时,也向本单元内注册中心订阅自己需要的服务。所以正常情况下,交易基本都能在本单元内闭环。In a specific embodiment, under the background of the unitized deployment architecture, under normal circumstances, the service provider registers the service provided by itself with the registration center in the unit when it is started. When the service consumer starts, it also subscribes to the service it needs from the registration center in this unit. Therefore, under normal circumstances, transactions can basically be closed-loop in this unit.

但在有交易对手存在或部分服务无法单元化的业务场景下,交易并不能在本单元内闭环,所以如下图所示,对于跨单元的服务,本发明提出一种跨单元间服务发现方法,专门设置一个跨单元服务管理器(管控态)和一个跨单元调用机制(运行态)来实现跨单元服务间的调用。However, in the business scenario where there is a counterparty or some services cannot be unitized, the transaction cannot be closed in this unit. Therefore, as shown in the following figure, for cross-unit services, the present invention proposes a cross-unit service discovery method. Specifically set up a cross-unit service manager (control state) and a cross-unit call mechanism (running state) to implement calls between cross-unit services.

跨单元服务管理器:主要用于跨单元服务的管理和登记,当跨单元服务启动时,会自动将该提供方服务信息登记到跨单元服务管理器上,登记成功后,该服务的登记信息会被自动推送到跨单元调用机制上,如果跨单元提供方服务有变更,比如新的提供方上线或者原提供方下线也会自动在跨单元服务管理器进行更新和下线登记并将更新后的状态自动推送至跨单元调用机制。Cross-unit service manager: It is mainly used for the management and registration of cross-unit services. When the cross-unit service starts, the provider service information will be automatically registered on the cross-unit service manager. After the registration is successful, the registration information of the service will be displayed. It will be automatically pushed to the cross-unit invocation mechanism. If there is a change in the cross-unit provider service, such as a new provider going online or the original provider going offline, it will also be automatically updated and registered in the cross-unit service manager and will be updated. The post state is automatically pushed to the cross-unit invocation mechanism.

跨单元调用机制:该机制的作用是实现跨单元交易的订阅和调用,在接收到跨单元服务管理器发来的提供方信息后,跨单元调用机制会返回服务提供者地址列表给消费方供消费方调用,如果提供方服务信息有变更(比如有新的提供者上线,或者原提供者下线),跨单元调用机制也将基于长连接推送变更数据给消费者,从而消费方可以通过该机制自动订阅和调用跨单元的提供方,实现跨单元交易场景。Cross-unit invocation mechanism: The function of this mechanism is to realize the subscription and invocation of cross-unit transactions. After receiving the provider information sent by the cross-unit service manager, the cross-unit invocation mechanism will return the service provider address list to the consumer for supply. When the consumer calls, if the service information of the provider changes (for example, a new provider goes online, or the original provider goes offline), the cross-unit call mechanism will also push the changed data to the consumer based on the long connection, so that the consumer can pass the The mechanism automatically subscribes and calls cross-unit providers to realize cross-unit transaction scenarios.

基于上述系统,以跨单元服务管理器为执行主体,本申请还提供了一种单元化部署架构下的单元间服务发现方法,如图5所示,包括:Based on the above system, with the cross-unit service manager as the execution body, the present application also provides an inter-unit service discovery method under a unitized deployment architecture, as shown in FIG. 5 , including:

S501:监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记。S501: Monitor the start action of the cross-unit service, and register the service provider information of the cross-unit service.

S502:将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。S502: Send the registered service provider information to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

在一实施例中,单元化部署架构下的单元间服务发现方法,还包括:In one embodiment, the inter-unit service discovery method under the unitized deployment architecture further includes:

监听服务提供方的信息变更动作,并对跨单元服务的服务提供方信息进行更新后推送至跨单元调用服务器。Monitor the information change action of the service provider, update the service provider information of the cross-unit service, and push it to the cross-unit invocation server.

在一具体实施例中,对于跨单元服务的提供方,在其启动时,不仅仅在其单元内的服务注册中心注册自己提供的服务,也会将自己提供的跨单元服务自动登记在跨单元服务管理器,当该服务下线时,也会在跨单元服务管理器进行自动登记,方便后期对该服务进行管理。跨单元服务在跨单元服务管理器登记成功后,跨单元管理器会将该服务的信息自动推送到跨单元调用机制上,同时如果跨单元服务登记下线后,该下线信息也将自动推送到跨单元调用机制上。In a specific embodiment, for the provider of cross-unit services, when it starts up, it not only registers the service provided by itself in the service registration center in its unit, but also automatically registers the cross-unit service provided by itself in the cross-unit service. The service manager, when the service goes offline, will also be automatically registered in the cross-unit service manager, which is convenient for later management of the service. After the cross-unit service is successfully registered with the cross-unit service manager, the cross-unit manager will automatically push the information of the service to the cross-unit call mechanism. At the same time, if the cross-unit service is registered offline, the offline information will also be automatically pushed. to the cross-unit invocation mechanism.

以跨单元调用服务器为执行主体,本申请还提供了一种单元化部署架构下的单元间服务发现方法,如图6所示,包括:Taking the cross-unit invocation server as the execution body, the present application also provides an inter-unit service discovery method under the unitized deployment architecture, as shown in FIG. 6 , including:

S601:接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方。S601: Receive the service provider registration or modification information sent by the cross-unit service manager and forward it to the service consumer.

S602:解析服务消费方发起的服务调用请求获取服务提供方地址。S602: Parse the service invocation request initiated by the service consumer to obtain the address of the service provider.

S603:根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。S603: According to the address of the service provider, initiate a call to the server of the service provider based on the soft load balancing algorithm.

在一实施例中,单元化部署架构下的单元间服务发现方法,还包括:In one embodiment, the inter-unit service discovery method under the unitized deployment architecture further includes:

当向服务提供方发起调用失败时,采用RPC长连接点对点的方式调用预存的本地服务提供方地址列表中的其他服务提供方的服务器。When initiating a call to the service provider fails, the server of other service providers in the pre-stored local service provider address list is called by means of a point-to-point RPC connection.

在一具体实施例中,对于要调用其他单元内的服务的消费方,在该消费方启动过程中,也会通过跨单元调用机制查询需要调用的提供者地址列表,从提供者地址列表中,基于软负载均衡算法,选一台提供者进行调用,如果调用失败,再选另一台调用。服务调用采用java的RPC方式,并使用长连接进行点对点通信。从而实现订阅自己需要调用的跨单元服务,同时,当跨单元调用机制收到跨单元服务管理器推送过来的提供方信息变更的通知时,也会将该信息基于长连接推送变更数据给消费者。In a specific embodiment, for a consumer that wants to invoke services in other units, during the startup process of the consumer, the cross-unit invocation mechanism will also query the provider address list to be invoked. From the provider address list, Based on the soft load balancing algorithm, select one provider to call, and if the call fails, select another provider to call. The service call adopts the RPC method of java, and uses the long connection for point-to-point communication. In this way, it can subscribe to the cross-unit service that it needs to call. At the same time, when the cross-unit calling mechanism receives a notification of provider information change pushed by the cross-unit service manager, it will also push the change data to the consumer based on the long connection. .

基于同一发明构思,本申请实施例还提供了一种单元化部署架构下的单元间服务发现装置,可以用于实现上述实施例中所描述的方法,如下面实施例所述。由于该单元化部署架构下的单元间服务发现装置解决问题的原理与单元化部署架构下的单元间服务发现方法相似,因此单元化部署架构下的单元间服务发现装置的实施可以参考单元化部署架构下的单元间服务发现方法的实施。以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的系统较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。Based on the same inventive concept, the embodiments of the present application also provide an inter-unit service discovery apparatus under a unitized deployment architecture, which can be used to implement the methods described in the foregoing embodiments, as described in the following embodiments. Since the principle of solving the problem of the inter-unit service discovery device under the unitized deployment architecture is similar to that of the inter-unit service discovery method under the unitized deployment architecture, the implementation of the inter-unit service discovery device under the unitized deployment architecture can refer to the unitary deployment. The implementation of the inter-unit service discovery method under the architecture. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.

以跨单元管理服务器为执行主体,提供了一种单元化部署架构下的单元间服务发现装置,如图7所示,包括:Taking the cross-unit management server as the execution body, an inter-unit service discovery device under the unitized deployment architecture is provided, as shown in Figure 7, including:

监听单元701,用于监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记;A monitoring unit 701, configured to monitor the startup action of the cross-unit service, and register the service provider information of the cross-unit service;

信息发送单元702,用于将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。The information sending unit 702 is configured to send the registered service provider information to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

在一实施例中,单元化部署架构下的单元间服务发现装置,还包括:In one embodiment, the inter-unit service discovery apparatus under the unitized deployment architecture further includes:

信息变更单元,用于监听服务提供方的信息变更动作,并对跨单元服务的服务提供方信息进行更新后推送至跨单元调用服务器。The information changing unit is used to monitor the information changing action of the service provider, update the service provider information of the cross-unit service, and then push it to the cross-unit calling server.

在一具体实施例中,对于跨单元服务的提供方,在其启动时,不仅仅在其单元内的服务注册中心注册自己提供的服务,也会将自己提供的跨单元服务自动登记在跨单元服务管理器,当该服务下线时,也会在跨单元服务管理器进行自动登记,方便后期对该服务进行管理。跨单元服务在跨单元服务管理器登记成功后,跨单元管理器会将该服务的信息自动推送到跨单元调用机制上,同时如果跨单元服务登记下线后,该下线信息也将自动推送到跨单元调用机制上。In a specific embodiment, for the provider of cross-unit services, when it starts up, it not only registers the service provided by itself in the service registration center in its unit, but also automatically registers the cross-unit service provided by itself in the cross-unit service. The service manager, when the service goes offline, will also be automatically registered in the cross-unit service manager, which is convenient for later management of the service. After the cross-unit service is successfully registered with the cross-unit service manager, the cross-unit manager will automatically push the information of the service to the cross-unit call mechanism. At the same time, if the cross-unit service is registered offline, the offline information will also be automatically pushed. to the cross-unit invocation mechanism.

以跨单元调用服务器为执行主体,还提供了一种单元化部署架构下的单元间服务发现装置,如图8所示,包括:Taking the cross-unit invocation server as the execution body, an inter-unit service discovery device under the unitized deployment architecture is also provided, as shown in Figure 8, including:

接收单元801,用于接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方;A receiving unit 801, configured to receive the service provider registration or change information sent by the cross-unit service manager and forward it to the service consumer;

解析单元802,用于解析服务消费方发起的服务调用请求获取服务提供方地址;A parsing unit 802, configured to parse a service invocation request initiated by a service consumer to obtain an address of a service provider;

调用单元803,用于根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。The calling unit 803 is configured to initiate a call to the server of the service provider based on the soft load balancing algorithm according to the address of the service provider.

在一实施例中,单元化部署架构下的单元间服务发现装置还包括:In one embodiment, the inter-unit service discovery apparatus under the unitized deployment architecture further includes:

备用调用单元,用于当向服务提供方发起调用失败时,采用RPC长连接点对点的方式调用预存的本地服务提供方地址列表中的其他服务提供方的服务器。The standby invocation unit is used for invoking the servers of other service providers in the pre-stored local service provider address list by adopting the RPC long connection point-to-point mode when the invocation to the service provider fails.

在一具体实施例中,对于要调用其他单元内的服务的消费方,在该消费方启动过程中,也会通过跨单元调用机制查询需要调用的提供者地址列表,从提供者地址列表中,基于软负载均衡算法,选一台提供者进行调用,如果调用失败,再选另一台调用。服务调用采用java的RPC方式,并使用长连接进行点对点通信。从而实现订阅自己需要调用的跨单元服务,同时,当跨单元调用机制收到跨单元服务管理器推送过来的提供方信息变更的通知时,也会将该信息基于长连接推送变更数据给消费者。In a specific embodiment, for a consumer that wants to invoke services in other units, during the startup process of the consumer, the cross-unit invocation mechanism will also query the provider address list to be invoked. From the provider address list, Based on the soft load balancing algorithm, select one provider to call, and if the call fails, select another provider to call. The service call adopts the RPC method of java, and uses the long connection for point-to-point communication. In this way, it can subscribe to the cross-unit service that it needs to call. At the same time, when the cross-unit calling mechanism receives a notification of provider information change pushed by the cross-unit service manager, it will also push the change data to the consumer based on the long connection. .

本申请通过在全站所有机房中部署数个单元,任意一个单元都部署了系统所需的所有应用,然后将服务和数据设计改造让其符合单元的特征,在单元化部署架构的背景下,正常情况下,服务提供者在启动时,向本单元内的注册中心注册自己提供的服务,服务消费者在启动时,向本单元内注册中心订阅自己需要的服务,所以正常情况下,交易基本都能在本单元内实现闭环。本申请解决了在有交易对手存在或部分服务无法单元化的业务场景下,交易并不能在本单元内闭环,实现跨单元的两个服务之间的交易的问题。In this application, by deploying several units in all computer rooms of the whole station, all applications required by the system are deployed in any unit, and then the service and data are designed and transformed to conform to the characteristics of the unit. In the context of the unitized deployment architecture, Under normal circumstances, the service provider registers the services it provides with the registration center in this unit when it starts up, and the service consumer subscribes the services it needs to the registration center in this unit when it starts up. Therefore, under normal circumstances, the transaction is basically A closed loop can be realized in this unit. This application solves the problem that the transaction cannot be closed-loop within the unit to realize the transaction between two cross-unit services in a business scenario where a counterparty exists or some services cannot be unitized.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

本申请中应用了具体实施例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。In this application, specific examples are used to illustrate the principles and implementations of the application, and the descriptions of the above examples are only used to help understand the method and the core idea of the application; The idea of the application will have changes in the specific implementation and application scope. To sum up, the content of this specification should not be construed as a limitation on the application.

本申请的实施例还提供能够实现上述实施例中的方法中全部步骤的一种电子设备的具体实施方式,参见图9,所述电子设备具体包括如下内容:The embodiments of the present application also provide specific implementations of an electronic device capable of implementing all the steps in the methods in the foregoing embodiments. Referring to FIG. 9 , the electronic device specifically includes the following contents:

处理器(processor)901、内存902、通信接口(Communications Interface)903、总线904和非易失性存储器905;a processor (processor) 901, a memory 902, a communications interface (Communications Interface) 903, a bus 904 and a non-volatile memory 905;

其中,所述处理器901、内存902、通信接口903通过所述总线904完成相互间的通信;The processor 901, the memory 902, and the communication interface 903 communicate with each other through the bus 904;

所述处理器901用于调用所述内存902和非易失性存储器905中的计算机程序,所述处理器执行所述计算机程序时实现上述实施例中的方法中的全部步骤,例如,所述处理器执行所述计算机程序时实现下述步骤:The processor 901 is configured to call the computer program in the memory 902 and the non-volatile memory 905, and when the processor executes the computer program, all steps in the methods in the foregoing embodiments are implemented, for example, the The processor implements the following steps when executing the computer program:

S501:监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记。S501: Monitor the start action of the cross-unit service, and register the service provider information of the cross-unit service.

S502:将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。S502: Send the registered service provider information to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

以及as well as

S601:接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方。S601: Receive the service provider registration or modification information sent by the cross-unit service manager and forward it to the service consumer.

S602:解析服务消费方发起的服务调用请求获取服务提供方地址。S602: Parse the service invocation request initiated by the service consumer to obtain the address of the service provider.

S603:根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。S603: According to the address of the service provider, initiate a call to the server of the service provider based on the soft load balancing algorithm.

本申请的实施例还提供能够实现上述实施例中的方法中全部步骤的一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中的方法的全部步骤,例如,所述处理器执行所述计算机程序时实现下述步骤:The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the methods in the foregoing embodiments, where a computer program is stored on the computer-readable storage medium, and the computer program implements the foregoing when executed by a processor All steps of the method in the embodiment, for example, the processor implements the following steps when executing the computer program:

S501:监听跨单元服务的启动动作,并对跨单元服务的服务提供方信息进行登记。S501: Monitor the start action of the cross-unit service, and register the service provider information of the cross-unit service.

S502:将已登记的服务提供方信息发送至跨单元调用服务器中,以使跨单元调用服务器向服务消费方发送服务提供方信息。S502: Send the registered service provider information to the cross-unit invocation server, so that the cross-unit invocation server sends the service provider information to the service consumer.

以及as well as

S601:接收由跨单元服务管理器发送的服务提供方登记或变更信息并转发至服务消费方。S601: Receive the service provider registration or modification information sent by the cross-unit service manager and forward it to the service consumer.

S602:解析服务消费方发起的服务调用请求获取服务提供方地址。S602: Parse the service invocation request initiated by the service consumer to obtain the address of the service provider.

S603:根据服务提供方地址,基于软负载均衡算法向服务提供方的服务器发起调用。S603: According to the address of the service provider, initiate a call to the server of the service provider based on the soft load balancing algorithm.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于硬件+程序类实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。虽然本说明书实施例提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或终端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式数据处理环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书实施例时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书实施例的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。以上所述仅为本说明书实施例的实施例而已,并不用于限制本说明书实施例。对于本领域技术人员来说,本说明书实施例可以有各种更改和变化。凡在本说明书实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书实施例的权利要求范围之内。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware+program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the partial description of the method embodiment. Although the embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence. When an actual device or terminal product is executed, it can be executed sequentially or in parallel according to the methods shown in the embodiments or the drawings (eg, a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, product or device comprising a list of elements includes not only those elements, but also others not expressly listed elements, or also include elements inherent to such a process, method, product or device. Without further limitation, it does not preclude the presence of additional identical or equivalent elements in a process, method, product or apparatus comprising the stated elements. For the convenience of description, when describing the above device, the functions are divided into various modules and described respectively. Of course, when implementing the embodiments of this specification, the functions of each module may be implemented in the same one or more software and/or hardware, and the modules implementing the same function may be implemented by a combination of multiple sub-modules or sub-units. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms. The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram. As will be appreciated by one skilled in the art, the embodiments of the present specification may be provided as a method, a system or a computer program product. Accordingly, embodiments of this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments. In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structures, materials, or features are included in at least one example or example of embodiments of this specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other. The above descriptions are merely examples of the embodiments of the present specification, and are not intended to limit the embodiments of the present specification. For those skilled in the art, various modifications and variations can be made to the embodiments of the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification shall be included within the scope of the claims of the embodiments of the present specification.

Claims (11)

1. A method for discovering inter-unit services under a unitized deployment architecture, comprising:
monitoring the starting action of the cross-unit service, and registering the service provider information of the cross-unit service;
and sending the registered service provider information to a cross-cell calling server so that the cross-cell calling server sends the service provider information to a service consumer.
2. The method of discovering inter-unit services under a unitized deployment architecture of claim 1, further comprising:
and monitoring the information change action of the service provider, updating the service provider information of the cross-unit service, and pushing the updated service provider information to the cross-unit calling server.
3. A method for discovering inter-unit services under a unitized deployment architecture, comprising:
receiving service provider registration or change information sent by a cross-unit service manager and forwarding the service provider registration or change information to a service consumer;
analyzing a service calling request initiated by a service consumer to obtain a service provider address;
and initiating a call to a server of the service provider based on a soft load balancing algorithm according to the address of the service provider.
4. The method of discovering inter-unit services under the unitized deployment architecture of claim 3, further comprising:
and when the calling to the service provider fails, calling the servers of other service providers in the pre-stored local service provider address list in a point-to-point mode by adopting RPC long connection.
5. An inter-unit service discovery system under a unitized deployment architecture, comprising: the system comprises a plurality of monitoring units, a cross-unit service manager and a cross-unit calling server, wherein the monitoring units, the cross-unit service manager and the cross-unit calling server are respectively deployed at a service provider; the monitoring unit is in communication connection with the cross-unit service manager, and the cross-unit service manager is in communication connection with the cross-unit call server;
the monitoring unit is used for monitoring the action of the service provider;
the cross-unit service manager is used for managing and registering cross-unit services;
the cross-unit calling server is used for realizing the subscription and calling of cross-unit transaction.
6. An inter-unit service discovery apparatus under a unitized deployment architecture, comprising:
the monitoring unit is used for monitoring the starting action of the cross-unit service and registering the service provider information of the cross-unit service;
and the information sending unit is used for sending the registered service provider information to the cross-unit calling server so as to enable the cross-unit calling server to send the service provider information to the service consumer.
7. The device for discovering inter-unit services under the unitized deployment architecture of claim 6, further comprising:
and the information changing unit is used for monitoring the information changing action of the service provider, updating the service provider information of the cross-unit service and then pushing the updated service provider information to the cross-unit calling server.
8. An inter-unit service discovery apparatus under a unitized deployment architecture, comprising:
a receiving unit for receiving the service provider registration or change information sent by the cross-unit service manager and forwarding to the service consumer;
the analysis unit is used for analyzing a service calling request initiated by a service consumer to obtain an address of a service provider;
and the calling unit is used for initiating calling to the server of the service provider based on a soft load balancing algorithm according to the address of the service provider.
9. The device for discovering inter-unit services under the unitized deployment architecture of claim 8, further comprising:
and the standby calling unit is used for calling the servers of other service providers in the pre-stored address list of the local service provider in a point-to-point mode by RPC long connection when the calling to the service provider fails.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the inter-unit service discovery method under the unitized deployment architecture of any one of claims 1 to 4.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the inter-unit service discovery method under a unitized deployment architecture according to any one of claims 1 to 4.
CN202210129582.8A 2022-02-11 2022-02-11 Inter-unit service discovery method, device and system under unitized deployment architecture Pending CN114461424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210129582.8A CN114461424A (en) 2022-02-11 2022-02-11 Inter-unit service discovery method, device and system under unitized deployment architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210129582.8A CN114461424A (en) 2022-02-11 2022-02-11 Inter-unit service discovery method, device and system under unitized deployment architecture

Publications (1)

Publication Number Publication Date
CN114461424A true CN114461424A (en) 2022-05-10

Family

ID=81413554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210129582.8A Pending CN114461424A (en) 2022-02-11 2022-02-11 Inter-unit service discovery method, device and system under unitized deployment architecture

Country Status (1)

Country Link
CN (1) CN114461424A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314557A (en) * 2022-07-26 2022-11-08 厦门亿联网络技术股份有限公司 A method and system for invoking global cross-regional services

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017113355A1 (en) * 2015-12-31 2017-07-06 华为技术有限公司 Service management method, device, entity and service offering system
CN110247944A (en) * 2018-03-09 2019-09-17 阿里巴巴集团控股有限公司 Trans-regional service calling method, device, system and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017113355A1 (en) * 2015-12-31 2017-07-06 华为技术有限公司 Service management method, device, entity and service offering system
CN110247944A (en) * 2018-03-09 2019-09-17 阿里巴巴集团控股有限公司 Trans-regional service calling method, device, system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪润;方英兰;韩兵;: "服务发布与发现在面向服务的架构中的研究与应用", 电脑知识与技术, no. 06, 25 February 2018 (2018-02-25) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314557A (en) * 2022-07-26 2022-11-08 厦门亿联网络技术股份有限公司 A method and system for invoking global cross-regional services
CN115314557B (en) * 2022-07-26 2023-11-07 厦门亿联网络技术股份有限公司 Global cross-region service calling method and system

Similar Documents

Publication Publication Date Title
CN112118565B (en) Multi-tenant service gray level publishing method, device, computer equipment and storage medium
US8788565B2 (en) Dynamic and distributed queueing and processing system
CN102868729B (en) The method, client and Cloud Server of realizing software service based on cloud service
US7831734B2 (en) Method and system for remote configuration of network devices
CN110262902B (en) Information processing method and system, medium, and computing device
CN106663033B (en) System and method for supporting a wraparound domain and proxy model and updating service information for cross-domain messaging in a transactional middleware machine environment
US8914804B2 (en) Handling queues associated with web services of business processes
WO2021088641A1 (en) Data transmission method, data processing method, data reception method and device, and storage medium
CN110944067B (en) A load balancing method and server
US11991094B2 (en) Metadata driven static determination of controller availability
CN112433863A (en) Micro-service calling method and device, terminal equipment and storage medium
CN113992695B (en) Method for service cooperation between network element devices and network element device
US20120159021A1 (en) Storage topology manager
CN111274047A (en) Information processing method, terminal, system, computer device and storage medium
CN115048137A (en) Gray scale publishing method, API gateway, platform and storage medium
US20070118597A1 (en) Processing proposed changes to data
US11411812B2 (en) Dynamic service creation for microservice-based integration service
CN113760481A (en) Distributed timed task scheduling system and method
CN114461424A (en) Inter-unit service discovery method, device and system under unitized deployment architecture
US11290318B2 (en) Disaster recovery of cloud resources
CN114896130A (en) Log processing method, device, server and storage medium
US12026562B2 (en) Industry opinionated API managed service
CN115766736A (en) Independent operation system and method for multiple front-end developers
CN113992750B (en) Global transaction cooperation method, device, equipment and medium
CN116016134A (en) Cross-cluster communication deployment method, device and computer equipment

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