[go: up one dir, main page]

CN110955460B - Service process starting method and device, electronic equipment and storage medium - Google Patents

Service process starting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110955460B
CN110955460B CN201911119611.7A CN201911119611A CN110955460B CN 110955460 B CN110955460 B CN 110955460B CN 201911119611 A CN201911119611 A CN 201911119611A CN 110955460 B CN110955460 B CN 110955460B
Authority
CN
China
Prior art keywords
information
service process
configuration item
query request
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911119611.7A
Other languages
Chinese (zh)
Other versions
CN110955460A (en
Inventor
黎海兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911119611.7A priority Critical patent/CN110955460B/en
Publication of CN110955460A publication Critical patent/CN110955460A/en
Application granted granted Critical
Publication of CN110955460B publication Critical patent/CN110955460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a service process starting method, a device, electronic equipment and a storage medium, which are applied to a distributed application program coordination process of nodes in a distributed system, wherein each node comprises a distributed application program coordination process and at least one service process, the distributed application program coordination process stores information of configuration items of each service process, the distributed application program coordination process receives a first query request, and the first query request is request information for acquiring the configuration items of any service process when the service process is started; inquiring information of the configuration items corresponding to the first inquiry request from the stored information of the configuration items according to the first inquiry request; and sending the queried information of the configuration items to the service process so that the service process is started according to the information of the configuration items. Each service process can directly acquire configuration items from the distributed application program coordination process, so that the number of configuration files stored in the distributed system is reduced, and further resource waste is reduced.

Description

一种服务进程启动方法、装置、电子设备和存储介质A service process starting method, device, electronic device and storage medium

技术领域Technical field

本发明涉及分布式存储领域,特别是涉及一种服务进程启动方法、装置、电子设备和存储介质。The present invention relates to the field of distributed storage, and in particular to a service process starting method, device, electronic device and storage medium.

背景技术Background technique

在分布式系统中,服务进程启动时需要加载该服务进程所需的启动配置项的信息。其中,服务进程的启动配置项可以包括该服务的端口号、最大并发数、工作线程数、缓存大小等等。In a distributed system, when a service process starts, it needs to load the startup configuration item information required by the service process. Among them, the startup configuration items of the service process can include the port number of the service, the maximum number of concurrencies, the number of worker threads, the cache size, etc.

相关技术中,分布式系统中通常需要预先获取每个服务进程的配置文件,其中,每个服务进程的配置文件中包含该服务进程启动时需要加载的所有启动配置项的信息,这样,在启动任一服务进程时,通过读取该服务进程的配置文件,可以加载该服务进程所需的启动配置项,从而启动该服务进程。In related technologies, it is usually necessary to obtain the configuration file of each service process in advance in a distributed system. The configuration file of each service process contains information about all startup configuration items that need to be loaded when the service process starts. In this way, during startup When any service process is started, by reading the configuration file of the service process, the startup configuration items required by the service process can be loaded, thereby starting the service process.

但是,由于需要预先获取各个进程的配置文件,因此,当分布式系统内的进程数量较多时,在分布式系统内将会存储大量的配置文件,而且,配置文件中还存在大量的重复信息,导致分布式系统内的资源浪费。However, since the configuration files of each process need to be obtained in advance, when the number of processes in the distributed system is large, a large number of configuration files will be stored in the distributed system, and there is also a large amount of duplicate information in the configuration files. Leading to a waste of resources within the distributed system.

发明内容Contents of the invention

本发明实施例的目的在于提供一种服务进程启动方法、装置、电子设备和存储介质,以减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。具体技术方案如下:The purpose of the embodiments of the present invention is to provide a service process startup method, device, electronic device and storage medium to reduce the number of configuration files stored in a distributed system, thereby reducing resource waste in the distributed system. The specific technical solutions are as follows:

本发明实施例提供了一种服务进程启动方法,应用于分布式系统中节点的分布式应用程序协调进程,所述节点中包括一个分布式应用程序协调进程及至少一个服务进程,所述分布式应用程序协调进程存储有每个所述服务进程的配置项的信息,所述方法包括:Embodiments of the present invention provide a method for starting a service process, which is applied to a distributed application coordination process of a node in a distributed system. The node includes a distributed application coordination process and at least one service process. The distributed application coordination process The application coordination process stores information about the configuration items of each service process. The method includes:

接收第一查询请求,所述第一查询请求为任一所述服务进程启动时用于获取其配置项的请求信息;Receive a first query request, which is request information for obtaining configuration items of any of the service processes when they are started;

根据所述第一查询请求从所存储的配置项的信息中,查询与所述第一查询请求对应的配置项的信息;According to the first query request, query the information of the configuration item corresponding to the first query request from the stored configuration item information;

将查询到的与所述第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述第一查询请求对应的配置项的信息启动。The queried information about the configuration item corresponding to the first query request is sent to the service process, so that the service process is started according to the information about the configuration item corresponding to the first query request.

可选的,所述方法还包括:Optionally, the method also includes:

接收针对任一所述配置项的更新信息;Receive updated information for any of the configuration items;

根据所述更新信息对所存储的该配置项进行更新;Update the stored configuration item according to the update information;

将更新后的配置项同步至所述至少一个服务进程。Synchronize the updated configuration item to the at least one service process.

可选的,所述方法还包括:Optionally, the method also includes:

接收任一所述服务进程的注册信息;Receive the registration information of any of the service processes;

所述将更新后的配置项同步至所述至少一个服务进程包括:Synchronizing the updated configuration items to the at least one service process includes:

根据所述注册信息,将更新后的配置项的信息发送至所述至少一个服务进程,以使任一所述服务进程根据所述更新后的配置项的信息,对其配置项进行更新。According to the registration information, the updated configuration item information is sent to the at least one service process, so that any of the service processes updates its configuration item based on the updated configuration item information.

可选的,所述将更新后的配置项同步至所述至少一个服务进程,包括:Optionally, synchronizing the updated configuration items to the at least one service process includes:

接收第二查询请求,所述第二查询请求为任一所述服务进程按照预设时间间隔发送的用于查询其配置项的请求信息;Receive a second query request, which is request information sent by any of the service processes according to a preset time interval for querying its configuration items;

根据所述第二查询请求,从所存储的配置项的信息中,查询与所述第二查询请求对应的配置项的信息;According to the second query request, query the information of the configuration item corresponding to the second query request from the stored information of the configuration item;

将查询到的与所述第二查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述与所述第二查询请求对应的配置项的信息,对其配置项进行更新。Send the queried information on the configuration item corresponding to the second query request to the service process, so that the service process performs the configuration on the configuration item based on the information on the configuration item corresponding to the second query request. renew.

本发明实施例还提供了一种服务进程启动装置,应用于分布式系统中节点的分布式应用程序协调进程,所述节点中包括一个分布式应用程序协调进程及至少一个服务进程,所述分布式应用程序协调进程存储有每个所述服务进程的配置项的信息,所述装置包括:Embodiments of the present invention also provide a service process starting device, which is applied to the distributed application coordination process of a node in a distributed system. The node includes a distributed application coordination process and at least one service process. The distribution process The application coordination process stores information about the configuration items of each service process, and the device includes:

接收模块,用于接收第一查询请求,所述第一查询请求为任一服务进程启动时用于获取其配置项的请求信息;A receiving module, configured to receive a first query request, which is a request information for obtaining configuration items of any service process when it is started;

查询模块,用于根据所述第一查询请求,从所存储的配置项的信息中,查询与所述第一查询请求对应的配置项的信息;A query module, configured to query the information of the configuration item corresponding to the first query request from the stored information of the configuration item according to the first query request;

发送模块,用于将查询到的与所述第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述第一查询请求对应的配置项的信息启动。A sending module, configured to send the queried information about the configuration item corresponding to the first query request to the service process, so that the service process is started according to the information about the configuration item corresponding to the first query request.

可选的,所述装置还包括:Optionally, the device also includes:

更新模块,用于接收针对任一所述配置项的更新信息;根据所述更新信息,对所存储的该配置项进行更新;将更新后的配置项同步至所述至少一个服务进程。An update module, configured to receive update information for any of the configuration items; update the stored configuration item according to the update information; and synchronize the updated configuration item to the at least one service process.

可选的,所述接收模块,还用于接收任一所述服务进程的注册信息;Optionally, the receiving module is also used to receive registration information of any of the service processes;

所述更新模块,还用于根据所述注册信息,将更新后的配置项的信息发送至所述至少一个服务进程,以使所述至少一个服务进程根据所述更新后的配置项的信息,对其配置项进行更新。The update module is also configured to send updated configuration item information to the at least one service process according to the registration information, so that the at least one service process can, according to the updated configuration item information, Update its configuration items.

可选的,所述更新模块,还用于:Optionally, the update module is also used for:

接收第二查询请求,所述第二查询请求为任一所述服务进程按照预设时间间隔发送的用于查询其配置项的请求信息;Receive a second query request, which is request information sent by any of the service processes according to a preset time interval for querying its configuration items;

根据所述第二查询请求,从所存储的配置项的信息中,查询与所述第二查询请求对应的配置项的信息;According to the second query request, query the information of the configuration item corresponding to the second query request from the stored information of the configuration item;

将查询到的与所述第二查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述与所述第二查询请求对应的配置项的信息,对其配置项进行更新。Send the queried information on the configuration item corresponding to the second query request to the service process, so that the service process performs the configuration on the configuration item based on the information on the configuration item corresponding to the second query request. renew.

本发明实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;An embodiment of the present invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;

存储器,用于存放计算机程序;Memory, used to store computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述任一所述的服务进程启动方法。The processor is used to implement any of the above service process starting methods when executing the program stored in the memory.

本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的服务进程启动方法。Embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, any one of the above service process starting methods is implemented.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一所述的服务进程启动方法。Embodiments of the present invention also provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any one of the above service process starting methods.

本发明实施例提供的服务进程启动方法及装置,应用于分布式系统中节点的分布式应用程序协调进程,每个节点中包括一个分布式应用程序协调进程及至少一个服务进程,分布式应用程序协调进程存储有每个服务进程的配置项的信息,在该方法中,分布式应用程序协调进程接收第一查询请求,第一查询请求为任一服务进程启动时用于获取其配置项的请求信息;根据第一查询请求从所存储的配置项的信息中,查询与第一查询请求对应的配置项的信息;将查询到的与第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据配置项的信息启动。这样,通过分布式应用程序协调进程中存储的每个服务器进程的配置项,各个服务进程可以直接从分布式应用程序协调进程获取所需的配置项,而不需要为每个服务进程存储对应的配置文件,从而减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。The service process startup method and device provided by embodiments of the present invention are applied to the distributed application coordination process of nodes in a distributed system. Each node includes a distributed application coordination process and at least one service process. The distributed application program The coordination process stores information about the configuration items of each service process. In this method, the distributed application coordination process receives the first query request. The first query request is a request for obtaining the configuration items of any service process when it is started. information; query the information of the configuration item corresponding to the first query request from the stored configuration item information according to the first query request; send the queried information of the configuration item corresponding to the first query request to the service process , so that the service process starts based on the information of the configuration item. In this way, through the configuration items of each server process stored in the distributed application coordination process, each service process can directly obtain the required configuration items from the distributed application coordination process, without the need to store the corresponding configuration items for each service process. Configuration files, thereby reducing the number of configuration files stored in the distributed system, thereby reducing the waste of resources in the distributed system. Of course, implementing any product or method of the present invention does not necessarily require achieving all the above-mentioned advantages simultaneously.

附图说明Description of the drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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 be obtained based on these drawings without exerting creative efforts.

图1为本发明实施例提供的一种服务进程启动方法的流程示意图;Figure 1 is a schematic flowchart of a service process starting method provided by an embodiment of the present invention;

图2为本发明实施例提供的另一种服务进程启动方法的流程示意图;Figure 2 is a schematic flow chart of another service process starting method provided by an embodiment of the present invention;

图3为本发明实施例提供的一种服务进程启动装置的结构示意图;Figure 3 is a schematic structural diagram of a service process starting device provided by an embodiment of the present invention;

图4为本发明实施例提供的一种电子设备的结构示意图。Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式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 some of the embodiments of the present invention, rather than all 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 fall within the scope of protection of the present invention.

相关技术中,分布式系统中通常需要预先获取每个服务进程的配置文件,其中,每个服务进程的配置文件中包含该服务进程启动时需要加载的所有启动配置项的信息,这样,在启动任一服务进程时,通过读取该服务进程的配置文件,可以加载该服务进程所需的启动配置项,从而启动该服务进程。In related technologies, it is usually necessary to obtain the configuration file of each service process in advance in a distributed system. The configuration file of each service process contains information about all startup configuration items that need to be loaded when the service process starts. In this way, during startup When any service process is started, by reading the configuration file of the service process, the startup configuration items required by the service process can be loaded, thereby starting the service process.

但是,由于需要预先获取各个进程的配置文件,因此,当分布式系统内的进程数量较多时,在分布式系统内将会存储大量的配置文件,而且,配置文件中还存在大量的重复信息,导致分布式系统内的资源浪费。However, since the configuration files of each process need to be obtained in advance, when the number of processes in the distributed system is large, a large number of configuration files will be stored in the distributed system, and there is also a large amount of duplicate information in the configuration files. Leading to a waste of resources within the distributed system.

下面从总体上对本发明实施例提供的服务进程启动方法进行说明,该方法应用于分布式系统中节点的分布式应用程序协调进程,在节点中包括一个分布式应用程序协调进程及至少一个服务进程,分布式应用程序协调进程存储有每个服务进程的配置项的信息,该方法包括:The following is an overall description of the service process starting method provided by the embodiment of the present invention. This method is applied to the distributed application coordination process of the node in the distributed system. The node includes a distributed application coordination process and at least one service process. , the distributed application coordination process stores information about the configuration items of each service process. The method includes:

接收第一查询请求,第一查询请求为任一服务进程启动时用于获取其配置项的请求信息;Receive the first query request, which is the request information used to obtain the configuration items of any service process when it is started;

根据第一查询请求从所存储的配置项的信息中,查询与第一查询请求对应的配置项的信息;According to the first query request, query the information of the configuration item corresponding to the first query request from the stored configuration item information;

将查询到的与第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据配置项的信息启动。The queried information about the configuration item corresponding to the first query request is sent to the service process, so that the service process is started according to the information about the configuration item.

由以上可见,本发明实施例提供的服务进程启动方法,通过分布式应用程序协调进程中存储的每个服务器进程的配置项,各个服务进程可以直接从分布式应用程序协调进程获取所需的配置项,而不需要为每个服务进程存储对应的配置文件,从而减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。As can be seen from the above, the service process startup method provided by the embodiment of the present invention uses the configuration items of each server process stored in the distributed application coordination process. Each service process can directly obtain the required configuration from the distributed application coordination process. It is not necessary to store corresponding configuration files for each service process, thereby reducing the number of configuration files stored in the distributed system, thereby reducing the waste of resources in the distributed system.

下面通过具体实施例,对本发明实施例提供的服务进程启动方法进行详细说明,该方法应用于分布式系统中节点的分布式应用程序协调进程,在节点中包括一个分布式应用程序协调进程及至少一个服务进程,分布式应用程序协调进程存储有每个服务进程的配置项的信息。The service process startup method provided by the embodiment of the present invention is described in detail below through specific embodiments. This method is applied to the distributed application coordination process of the node in the distributed system. The node includes a distributed application coordination process and at least A service process, the distributed application coordination process stores information about the configuration items of each service process.

分布式应用程序协调进程是一种分布式的可协调系统,可以部署在分布式系统的各个节点中。分布式应用程序协调进程可以直接通过与用户的交互,存储每个服务进程的配置项的信息,或者,也可以通过与分布式系统中其他设备之间的通信,存储每个服务进程的配置项的信息。比如,分布式应用程序协调进程可以为zookeeper进程。The distributed application coordination process is a distributed coordinated system that can be deployed in various nodes of the distributed system. The distributed application coordination process can store information about the configuration items of each service process directly through interaction with the user, or it can also store the configuration items of each service process through communication with other devices in the distributed system. Information. For example, the distributed application coordination process can be the zookeeper process.

其中,配置项可以包括线程数、缓存大小、端口号及队列最大长度等等,本发明实施例对此不做限定。The configuration items may include the number of threads, cache size, port number, maximum queue length, etc., which are not limited in this embodiment of the present invention.

举例而言,在分布式应用程序协调进程中,多个配置项的信息可以是以数据库的形式存储的,也可以是以链表的形式存储的,本发明实施例对此不做限定。其中,每个配置项的取值都是唯一的。For example, in the distributed application coordination process, the information of multiple configuration items may be stored in the form of a database or in the form of a linked list, which is not limited in this embodiment of the present invention. Among them, the value of each configuration item is unique.

如图1所示,为本发明实施例提供的一种服务进程启动方法的流程示意图,该方法应用于分布式系统中节点的分布式应用程序协调进程,包括如下步骤:As shown in Figure 1, it is a schematic flow chart of a service process startup method provided by an embodiment of the present invention. This method is applied to the distributed application coordination process of nodes in a distributed system and includes the following steps:

S101:接收第一查询请求,第一查询请求为任一服务进程启动时用于获取其配置项的请求信息。S101: Receive the first query request, which is the request information used to obtain the configuration items of any service process when it is started.

其中,第一查询请求可以是服务进程在接收到启动指令后,向分布式应用程序协调进程发送的,启动指令可以是通过节点与用户之间的交互获取的,或者,也可以是分布式系统中的其他节点发送给该节点的,另外,还可以是该节点按照预设的规则生成的。The first query request may be sent by the service process to the distributed application coordination process after receiving the startup instruction. The startup instruction may be obtained through interaction between the node and the user, or it may be a distributed system Sent to this node by other nodes in , in addition, it can also be generated by this node according to preset rules.

服务进程在接收到启动指令之后,可以根据自身启动时所需要获取的配置项,生成第一查询请求,也就是说,在第一查询请求中,包括服务进程启动时所需的配置项。这样,分布式应用程序协调进程可以根据第一查询请求确定该服务进程需要获取哪些配置项的信息。After receiving the startup instruction, the service process can generate a first query request based on the configuration items it needs to obtain when it starts. That is to say, the first query request includes the configuration items needed when the service process starts. In this way, the distributed application coordination process can determine which configuration item information the service process needs to obtain based on the first query request.

S102:根据第一查询请求,从所存储的配置项的信息中,查询与第一查询请求对应的配置项的信息。S102: According to the first query request, query the information of the configuration item corresponding to the first query request from the stored information of the configuration item.

在本发明实施例中,分布式应用程序协调进程接收第一查询请求之后,可以对第一查询请求进行分析,确定服务进程启动时所需的启动配置项,然后,从所存储的多个配置项的信息中,查询这些启动配置项的信息。In the embodiment of the present invention, after the distributed application coordination process receives the first query request, it can analyze the first query request to determine the startup configuration items required when the service process is started, and then, from the multiple stored configurations In the item information, query the information of these startup configuration items.

在分布式系统中,服务进程可能包括多个,每个服务进程的配置项可能有一个,也可能有多个,不同的服务进程的配置项可能是相同的,也可能是不同的。这样,每个服务进程生成的第一查询请求也不同。In a distributed system, there may be multiple service processes. Each service process may have one or more configuration items. The configuration items of different service processes may be the same or different. In this way, the first query request generated by each service process is also different.

在分布式应用程序协调进程中,存储着每个服务进程的的配置项的信息,这样,每个服务进程都可以通过第一查询请求,向分布式应用程序协调进程获取自身的配置项的信息。In the distributed application coordination process, the configuration item information of each service process is stored. In this way, each service process can obtain its own configuration item information from the distributed application coordination process through the first query request. .

S103:将查询到的与第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据配置项的信息启动。S103: Send the queried information about the configuration item corresponding to the first query request to the service process, so that the service process is started based on the information about the configuration item.

服务进程在获取到其配置项的信息之后,就可以根据配置项的信息启动,开始运行,从而为用户提供相应的服务。在本发明实施例中,服务进程的启动过程中,可以直接从分布式应用程序协调进程获取配置项的信息,而不需要从预先获取的配置文件中获取配置项的信息,也就是说,一方面,可以减少在分布式系统内存储的配置文件的数量,另一方面,对于任一配置项的信息,只需在分布式应用程序协调进程中进行设置,而不需要存储在各个服务进程分别对应的多个配置文件中,从而减少分布式系统的资源浪费。After the service process obtains the information of its configuration items, it can be started and run according to the information of the configuration items, thereby providing corresponding services to users. In the embodiment of the present invention, during the startup process of the service process, the information of the configuration items can be obtained directly from the distributed application coordination process, without obtaining the information of the configuration items from the pre-obtained configuration file. That is to say, a On the one hand, it can reduce the number of configuration files stored in the distributed system. On the other hand, the information of any configuration item only needs to be set in the distributed application coordination process, and does not need to be stored in each service process separately. Corresponding multiple configuration files, thereby reducing resource waste in distributed systems.

如图2所示,为本发明实施例提供的另一种服务进程启动方法的流程示意图,应用于分布式系统中节点的分布式应用程序协调进程,在图1所示的服务进程启动方法的基础上,该服务进程启动方法还包括:As shown in Figure 2, it is a schematic flow chart of another service process startup method provided by an embodiment of the present invention, which is applied to the distributed application coordination process of nodes in a distributed system. In the service process startup method shown in Figure 1 Basically, the service process startup method also includes:

S104:接收针对任一配置项的更新信息。S104: Receive update information for any configuration item.

举例而言,针对任一配置项的更新信息可以是通过与用户的交互生成的,当用户对任一配置项进行修改时,可以根据用户的修改内容,生成针对该配置项的更新信息。For example, update information for any configuration item can be generated through interaction with the user. When the user modifies any configuration item, update information for the configuration item can be generated based on the user's modification content.

S105:根据更新信息,对所存储的该配置项进行更新。S105: Update the stored configuration item according to the update information.

接收到更新信息之后,分布式应用程序协调进程可以在所存储的配置项中查找更新信息对应的配置项,进而对所存储的该配置项进行更新。这样,当任一服务进程从分布式应用程序协调进程请求其配置项时,可以直接获取到更新后的配置项,而不需要在启动后再对其配置项进行更新,从而使得分布式系统的运行效率更高。After receiving the update information, the distributed application coordination process can search for the configuration item corresponding to the update information in the stored configuration items, and then update the stored configuration item. In this way, when any service process requests its configuration items from the distributed application coordination process, it can directly obtain the updated configuration items without having to update its configuration items after startup, thus making the distributed system Run more efficiently.

S106:将更新后的配置项同步至至少一个服务进程。S106: Synchronize the updated configuration items to at least one service process.

分布式应用程序协调进程对所存储的配置项进行更新之后,可以将更新后的配置项同步至至少一个服务进程。也就是说,服务进程可以直接从分布式应用程序协调进程同步更新后的配置项,不需要通过重新启动的方式,重新获取更新后的配置文件中的配置项的信息,这样,使得分布式系统中对配置项的更新更简单,配置项的更新生效更快,从而提高了分布式系统中配置项更新的效率。After the distributed application coordination process updates the stored configuration items, the updated configuration items can be synchronized to at least one service process. In other words, the service process can directly synchronize the updated configuration items from the distributed application coordination process without re-obtaining the information of the configuration items in the updated configuration file through restarting. In this way, the distributed system It is simpler to update configuration items and take effect faster, thus improving the efficiency of configuration item updates in distributed systems.

举例而言,一种实现方式中,分布式应用程序协调进程可以接收任一服务进程的注册信息,这样,在对所存储的配置项进行更新之后,分布式应用程序协调进程可以根据接收到的注册信息,将更新后的配置项的信息发送至已发送注册信息的服务进程。进而,服务进程可以根据分布式应用程序协调进程返回的更新后的配置项的信息,对自身的配置项进行更新。For example, in one implementation, the distributed application coordination process can receive the registration information of any service process. In this way, after updating the stored configuration items, the distributed application coordination process can receive the registration information based on the received configuration items. Registration information, sending the updated configuration item information to the service process that has sent the registration information. Furthermore, the service process can update its own configuration items based on the updated configuration item information returned by the distributed application coordination process.

另一种实现方式中,服务进程可以在启动之后,按照预设时间间隔,向分布式应用程序协调进程发送第二查询请求,其中,第二查询请求为用于查询任一服务进程的配置项的请求信息。分布式应用程序协调服务在接收到第二查询请求之后,可以根据第二查询请求,从所存储的配置项的信息中,查询与第二查询请求对应的配置项的信息,然后,将查询到的与第二查询请求对应的配置项的信息发送给该服务进程。这样,服务进程可以根据与第二查询请求对应的配置项的信息,对其配置项进行更新。In another implementation, the service process can send a second query request to the distributed application coordination process at a preset time interval after being started, where the second query request is used to query the configuration items of any service process. request information. After receiving the second query request, the distributed application coordination service can query the information of the configuration item corresponding to the second query request from the stored configuration item information according to the second query request, and then query the The information of the configuration item corresponding to the second query request is sent to the service process. In this way, the service process can update its configuration item based on the information of the configuration item corresponding to the second query request.

其中,第二查询请求也可以为用于查询服务进程的一部分配置项的请求信息,比如,服务进程可以仅向分布式应用程序协调进程查询重要等级较高的一个或多个配置项,而不需要查询所有启动配置项的信息,这样,可以减少需要传输的数据量,从而进一步减少分布式系统的资源浪费。The second query request may also be request information for querying a part of the configuration items of the service process. For example, the service process may only query one or more configuration items with a higher importance level from the distributed application coordination process without Information about all startup configuration items needs to be queried, which can reduce the amount of data that needs to be transmitted, thereby further reducing the waste of resources in the distributed system.

通过服务进程发送第二查询请求的方式,服务进程可以监测每一次发送第二查询请求后,分布式应用程序协调进程的反馈,如果在一段较长的时间内,没有接收到分布式应用程序协调进程的反馈,则判断当前服务进程与分布式应用程序协调进程之间的通信发生故障,进而采取重新发送第二查询请求或报错等措施,减少由于服务进程发送的第二查询请求或分布式应用程序协调进程返回的与第二查询请求对应的配置项的信息而丢失导致的分布式系统的运行错误。By sending the second query request by the service process, the service process can monitor the feedback of the distributed application coordination process after each second query request is sent. If no distributed application coordination is received for a long period of time, process feedback, it is judged that the communication between the current service process and the distributed application coordination process has failed, and then measures such as resending the second query request or reporting an error are taken to reduce the number of second query requests or distributed applications sent by the service process. The running error of the distributed system is caused by the loss of the configuration item information corresponding to the second query request returned by the program coordination process.

另外,在一种实现方式中,还可以将上述两种待更新配置项的同步方法同时应用,即,分布式应用程序协调进程可以根据接收到的注册信息,将更新后的配置项的信息发送至服务进程,同时,服务进程可以在启动之后,按照预设时间间隔,向分布式应用程序协调进程发送第二查询请求。这样,可以进一步减少由于服务进程发送的第二查询请求或分布式应用程序协调进程返回的与第二查询请求对应的配置项的信息而丢失导致的分布式系统的运行错误。In addition, in one implementation, the above two synchronization methods of configuration items to be updated can also be applied at the same time, that is, the distributed application coordination process can send the updated configuration item information based on the received registration information. to the service process. At the same time, the service process can send a second query request to the distributed application coordination process according to a preset time interval after being started. In this way, running errors of the distributed system caused by the loss of the second query request sent by the service process or the information of the configuration item corresponding to the second query request returned by the distributed application coordination process can be further reduced.

由以上可见,本发明实施例提供的服务进程启动方法,通过分布式应用程序协调进程中存储的每个服务器进程的配置项,各个服务进程可以直接从分布式应用程序协调进程获取所需的配置项,而不需要为每个服务进程存储对应的配置文件,从而减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。As can be seen from the above, the service process startup method provided by the embodiment of the present invention uses the configuration items of each server process stored in the distributed application coordination process. Each service process can directly obtain the required configuration from the distributed application coordination process. It is not necessary to store corresponding configuration files for each service process, thereby reducing the number of configuration files stored in the distributed system, thereby reducing the waste of resources in the distributed system.

与上述服务进程启动方法相对应,本申请实施例还提供了一种服务进程启动装置,该装置应用于分布式系统中节点的分布式应用程序协调进程,在节点中包括一个分布式应用程序协调进程及至少一个服务进程,分布式应用程序协调进程存储有每个服务进程的配置项的信息。Corresponding to the above service process starting method, the embodiment of the present application also provides a service process starting device, which is applied to the distributed application coordination process of the node in the distributed system, and the node includes a distributed application coordination process. process and at least one service process. The distributed application coordination process stores information about the configuration items of each service process.

如图3所示,为本发明实施例提供的一种服务进程启动装置的结构示意图,该装置应用于分布式系统中节点的分布式应用程序协调进程,包括:As shown in Figure 3, it is a schematic structural diagram of a service process starting device provided by an embodiment of the present invention. The device is applied to the distributed application coordination process of nodes in a distributed system, and includes:

接收模块301,用于接收第一查询请求,第一查询请求为任一服务进程启动时用于获取其配置项的请求信息;The receiving module 301 is used to receive the first query request, which is the request information used to obtain the configuration items of any service process when it is started;

查询模块302,用于根据第一查询请求,从所存储的配置项的信息中,查询与第一查询请求对应的配置项的信息;The query module 302 is configured to query the information of the configuration item corresponding to the first query request from the stored configuration item information according to the first query request;

发送模块303,用于将查询到的与第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据第一查询请求对应的配置项的信息启动。The sending module 303 is configured to send the queried information about the configuration item corresponding to the first query request to the service process, so that the service process is started based on the information about the configuration item corresponding to the first query request.

一种实现方式中,该装置还包括:In one implementation, the device further includes:

更新模块(图中未示出),用于接收针对任一配置项的更新信息;根据更新信息,对所存储的该配置项进行更新;将更新后的配置项同步至至少一个服务进程。An update module (not shown in the figure) is used to receive update information for any configuration item; update the stored configuration item according to the update information; and synchronize the updated configuration item to at least one service process.

一种实现方式中,接收模块301,还用于接收任一服务进程的注册信息;In one implementation, the receiving module 301 is also used to receive the registration information of any service process;

更新模块,还用于根据注册信息,将更新后的配置项的信息发送至至少一个服务进程,以使至少一个服务进程根据更新后的配置项的信息,对其配置项进行更新。The update module is also configured to send updated configuration item information to at least one service process based on the registration information, so that at least one service process updates its configuration item based on the updated configuration item information.

一种实现方式中,更新模块,还用于:In one implementation, the update module is also used for:

接收第二查询请求,第二查询请求为任一服务进程按照预设时间间隔发送的用于查询其配置项的请求信息;Receive a second query request, which is request information sent by any service process at a preset time interval for querying its configuration items;

根据第二查询请求,从所存储的配置项的信息中,查询与第二查询请求对应的配置项的信息;According to the second query request, query the information of the configuration item corresponding to the second query request from the stored information of the configuration item;

将查询到的与第二查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据与第二查询请求对应的配置项的信息,对其配置项进行更新。The queried information about the configuration item corresponding to the second query request is sent to the service process, so that the service process updates the configuration item according to the information about the configuration item corresponding to the second query request.

由以上可见,本发明实施例提供的服务进程启动装置,通过分布式应用程序协调进程中存储的每个服务器进程的配置项,各个服务进程可以直接从分布式应用程序协调进程获取所需的配置项,而不需要为每个服务进程存储对应的配置文件,从而减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。It can be seen from the above that the service process starting device provided by the embodiment of the present invention uses the configuration items of each server process stored in the distributed application coordination process. Each service process can directly obtain the required configuration from the distributed application coordination process. It is not necessary to store corresponding configuration files for each service process, thereby reducing the number of configuration files stored in the distributed system, thereby reducing the waste of resources in the distributed system.

本发明实施例还提供了一种电子设备,如图4所示,包括处理器401、通信接口402、存储器403和通信总线404,其中,处理器401,通信接口402,存储器403通过通信总线404完成相互间的通信,An embodiment of the present invention also provides an electronic device, as shown in Figure 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, the communication interface 402, and the memory 403 communicate through the communication bus 404. complete mutual communication,

存储器403,用于存放计算机程序;Memory 403, used to store computer programs;

处理器401,用于执行存储器403上所存放的程序时,实现如下步骤:When the processor 401 is used to execute the program stored in the memory 403, it implements the following steps:

接收第一查询请求,第一查询请求为任一服务进程启动时用于获取其配置项的请求信息;Receive the first query request, which is the request information used to obtain the configuration items of any service process when it is started;

根据第一查询请求从所存储的配置项的信息中,查询与第一查询请求对应的配置项的信息;According to the first query request, query the information of the configuration item corresponding to the first query request from the stored configuration item information;

将查询到的与第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据配置项的信息启动。The queried information about the configuration item corresponding to the first query request is sent to the service process, so that the service process is started according to the information about the configuration item.

上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above-mentioned electronic equipment may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above-mentioned electronic devices and other devices.

存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital SignalProcessing, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

由以上可见,本发明实施例提供的电子设备,通过分布式应用程序协调进程中存储的每个服务器进程的配置项,各个服务进程可以直接从分布式应用程序协调进程获取所需的配置项,而不需要为每个服务进程存储对应的配置文件,从而减少在分布式系统内所存储的配置文件的数量,进而减少分布式系统的资源浪费。It can be seen from the above that in the electronic device provided by the embodiment of the present invention, through the configuration items of each server process stored in the distributed application coordination process, each service process can directly obtain the required configuration items from the distributed application coordination process. There is no need to store corresponding configuration files for each service process, thereby reducing the number of configuration files stored in the distributed system, thereby reducing resource waste in the distributed system.

在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的服务进程启动方法。In yet another embodiment provided by the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute any one of the above embodiments. The service process starting method.

在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的服务进程启动方法。In yet another embodiment provided by the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the service process starting method described in any of the above embodiments.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations are mutually exclusive. any such actual relationship or sequence exists between them. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例、电子设备实施例、存储介质实施例和计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner. The same and similar parts between the various embodiments can be referred to each other. Each embodiment focuses on its differences from other embodiments. In particular, for the device embodiment, electronic equipment embodiment, storage medium embodiment and computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment. That’s it.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (10)

1.一种服务进程启动方法,其特征在于,应用于分布式系统中节点的分布式应用程序协调进程,所述节点中包括一个分布式应用程序协调进程及至少一个服务进程,所述分布式应用程序协调进程存储有每个所述服务进程的配置项的信息,所述方法包括:1. A method for starting a service process, characterized in that it is applied to a distributed application coordination process of a node in a distributed system. The node includes a distributed application coordination process and at least one service process. The distributed application coordination process is The application coordination process stores information about the configuration items of each service process. The method includes: 接收第一查询请求,所述第一查询请求为任一所述服务进程启动时用于获取其配置项的请求信息,所述配置项包括以下至少一项:线程数、缓存大小、端口号及队列最大长度;Receive a first query request. The first query request is the request information used to obtain the configuration items of any of the service processes when they are started. The configuration items include at least one of the following: number of threads, cache size, port number, and The maximum length of the queue; 根据所述第一查询请求从所存储的配置项的信息中,查询与所述第一查询请求对应的配置项的信息;According to the first query request, query the information of the configuration item corresponding to the first query request from the stored configuration item information; 将查询到的与所述第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述第一查询请求对应的配置项的信息启动。The queried information about the configuration item corresponding to the first query request is sent to the service process, so that the service process is started according to the information about the configuration item corresponding to the first query request. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, characterized in that, the method further comprises: 接收针对任一所述配置项的更新信息;Receive updated information for any of the configuration items; 根据所述更新信息对所存储的该配置项进行更新;Update the stored configuration item according to the update information; 将更新后的配置项同步至所述至少一个服务进程。Synchronize the updated configuration item to the at least one service process. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, characterized in that, the method further comprises: 接收任一所述服务进程的注册信息;Receive the registration information of any of the service processes; 所述将更新后的配置项同步至所述至少一个服务进程包括:Synchronizing the updated configuration items to the at least one service process includes: 根据所述注册信息,将更新后的配置项的信息发送至所述至少一个服务进程,以使任一所述服务进程根据所述更新后的配置项的信息,对其配置项进行更新。According to the registration information, the updated configuration item information is sent to the at least one service process, so that any of the service processes updates its configuration item based on the updated configuration item information. 4.根据权利要求2所述的方法,其特征在于,所述将更新后的配置项同步至所述至少一个服务进程,包括:4. The method of claim 2, wherein synchronizing the updated configuration items to the at least one service process includes: 接收第二查询请求,所述第二查询请求为任一所述服务进程按照预设时间间隔发送的用于查询其配置项的请求信息;Receive a second query request, which is request information sent by any of the service processes according to a preset time interval for querying its configuration items; 根据所述第二查询请求,从所存储的配置项的信息中,查询与所述第二查询请求对应的配置项的信息;According to the second query request, query the information of the configuration item corresponding to the second query request from the stored information of the configuration item; 将查询到的与所述第二查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述与所述第二查询请求对应的配置项的信息,对其配置项进行更新。Send the queried information on the configuration item corresponding to the second query request to the service process, so that the service process performs the configuration on the configuration item based on the information on the configuration item corresponding to the second query request. renew. 5.一种服务进程启动装置,其特征在于,应用于分布式系统中节点的分布式应用程序协调进程,所述节点中包括一个分布式应用程序协调进程及至少一个服务进程,所述分布式应用程序协调进程存储有每个所述服务进程的配置项的信息,所述装置包括:5. A service process starting device, characterized in that it is applied to a distributed application coordination process of a node in a distributed system. The node includes a distributed application coordination process and at least one service process. The distributed application coordination process is The application coordination process stores information about the configuration items of each service process. The device includes: 接收模块,用于接收第一查询请求,所述第一查询请求为任一服务进程启动时用于获取其配置项的请求信息,所述配置项包括以下至少一项:线程数、缓存大小、端口号及队列最大长度;A receiving module, configured to receive a first query request. The first query request is the request information used to obtain the configuration items of any service process when it is started. The configuration items include at least one of the following: number of threads, cache size, Port number and maximum queue length; 查询模块,用于根据所述第一查询请求,从所存储的配置项的信息中,查询与所述第一查询请求对应的配置项的信息;A query module, configured to query the information of the configuration item corresponding to the first query request from the stored information of the configuration item according to the first query request; 发送模块,用于将查询到的与所述第一查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述第一查询请求对应的配置项的信息启动。A sending module, configured to send the queried information about the configuration item corresponding to the first query request to the service process, so that the service process is started according to the information about the configuration item corresponding to the first query request. 6.根据权利要求5所述的装置,其特征在于,所述装置还包括:6. The device according to claim 5, characterized in that the device further comprises: 更新模块,用于接收针对任一所述配置项的更新信息;根据所述更新信息,对所存储的该配置项进行更新;将更新后的配置项同步至所述至少一个服务进程。An update module, configured to receive update information for any of the configuration items; update the stored configuration item according to the update information; and synchronize the updated configuration item to the at least one service process. 7.根据权利要求6所述的装置,其特征在于:7. The device according to claim 6, characterized in that: 所述接收模块,还用于接收任一所述服务进程的注册信息;The receiving module is also used to receive the registration information of any of the service processes; 所述更新模块,还用于根据所述注册信息,将更新后的配置项的信息发送至所述至少一个服务进程,以使所述至少一个服务进程根据所述更新后的配置项的信息,对其配置项进行更新。The update module is also configured to send updated configuration item information to the at least one service process according to the registration information, so that the at least one service process can, according to the updated configuration item information, Update its configuration items. 8.根据权利要求6所述的装置,其特征在于,所述更新模块,还用于:8. The device according to claim 6, characterized in that the update module is also used to: 接收第二查询请求,所述第二查询请求为任一所述服务进程按照预设时间间隔发送的用于查询其配置项的请求信息;Receive a second query request, which is request information sent by any of the service processes according to a preset time interval for querying its configuration items; 根据所述第二查询请求,从所存储的配置项的信息中,查询与所述第二查询请求对应的配置项的信息;According to the second query request, query the information of the configuration item corresponding to the second query request from the stored information of the configuration item; 将查询到的与所述第二查询请求对应的配置项的信息发送给该服务进程,以使该服务进程根据所述与所述第二查询请求对应的配置项的信息,对其配置项进行更新。Send the queried information on the configuration item corresponding to the second query request to the service process, so that the service process performs the configuration on the configuration item based on the information on the configuration item corresponding to the second query request. renew. 9.一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;9. An electronic device, characterized in that it includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求1-4任一所述的方法步骤。The processor is used to implement the method steps described in any one of claims 1-4 when executing a program stored in the memory. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-4任一所述的方法步骤。10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of claims 1-4 are implemented.
CN201911119611.7A 2019-11-15 2019-11-15 Service process starting method and device, electronic equipment and storage medium Active CN110955460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911119611.7A CN110955460B (en) 2019-11-15 2019-11-15 Service process starting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911119611.7A CN110955460B (en) 2019-11-15 2019-11-15 Service process starting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110955460A CN110955460A (en) 2020-04-03
CN110955460B true CN110955460B (en) 2023-10-03

Family

ID=69977554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911119611.7A Active CN110955460B (en) 2019-11-15 2019-11-15 Service process starting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110955460B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708586B (en) * 2020-06-22 2023-06-20 平安养老保险股份有限公司 Application starting configuration item loading method and device, computer equipment and storage medium
CN112118298A (en) * 2020-09-03 2020-12-22 杭州海康威视数字技术股份有限公司 Configuration management method and device for distributed service

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6944857B1 (en) * 2000-10-12 2005-09-13 International Business Machines Corporation Method, system, computer program product, and article of manufacture for updating a computer program according to a stored configuration
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN102710554A (en) * 2012-06-25 2012-10-03 深圳中兴网信科技有限公司 Distributed message system and service status detection method thereof
CN104660689A (en) * 2015-02-04 2015-05-27 中国南方电网有限责任公司 Distributed computing system
WO2017185961A1 (en) * 2016-04-26 2017-11-02 中兴通讯股份有限公司 Method and apparatus for processing service discovery
CN107347093A (en) * 2017-07-03 2017-11-14 北京京东尚科信息技术有限公司 Collocation method and device for distributed server system
CN107544828A (en) * 2017-09-01 2018-01-05 北京奇虎科技有限公司 Configuring load application method and device
US9998551B1 (en) * 2016-10-24 2018-06-12 Palantir Technologies Inc. Automatic discovery and registration of service application for files introduced to a user interface
US10055421B1 (en) * 2017-04-14 2018-08-21 Xactly Corporation Pre-execution query optimization
CN108874549A (en) * 2018-07-19 2018-11-23 北京百度网讯科技有限公司 resource multiplexing method, device, terminal and computer readable storage medium
CN109002350A (en) * 2018-05-23 2018-12-14 中国石油天然气集团有限公司 Way of Process Communication and device in a kind of group system
CN109039730A (en) * 2018-07-25 2018-12-18 网宿科技股份有限公司 Server cluster and server cluster configuration information management method
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN109347675A (en) * 2018-10-31 2019-02-15 新华三大数据技术有限公司 Server configuration method, device and electronic equipment
WO2019154353A1 (en) * 2018-02-07 2019-08-15 中兴通讯股份有限公司 System running parameter query method, matching method and apparatus, and node device
CN110333939A (en) * 2019-06-17 2019-10-15 腾讯科技(成都)有限公司 Task mixed scheduling method, device, dispatch server and Resource Server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133086B (en) * 2016-02-29 2020-09-04 阿里巴巴集团控股有限公司 Task processing method, device and system based on distributed system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6944857B1 (en) * 2000-10-12 2005-09-13 International Business Machines Corporation Method, system, computer program product, and article of manufacture for updating a computer program according to a stored configuration
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN102710554A (en) * 2012-06-25 2012-10-03 深圳中兴网信科技有限公司 Distributed message system and service status detection method thereof
CN104660689A (en) * 2015-02-04 2015-05-27 中国南方电网有限责任公司 Distributed computing system
WO2017185961A1 (en) * 2016-04-26 2017-11-02 中兴通讯股份有限公司 Method and apparatus for processing service discovery
US9998551B1 (en) * 2016-10-24 2018-06-12 Palantir Technologies Inc. Automatic discovery and registration of service application for files introduced to a user interface
US10055421B1 (en) * 2017-04-14 2018-08-21 Xactly Corporation Pre-execution query optimization
CN107347093A (en) * 2017-07-03 2017-11-14 北京京东尚科信息技术有限公司 Collocation method and device for distributed server system
CN107544828A (en) * 2017-09-01 2018-01-05 北京奇虎科技有限公司 Configuring load application method and device
WO2019154353A1 (en) * 2018-02-07 2019-08-15 中兴通讯股份有限公司 System running parameter query method, matching method and apparatus, and node device
CN109002350A (en) * 2018-05-23 2018-12-14 中国石油天然气集团有限公司 Way of Process Communication and device in a kind of group system
CN108874549A (en) * 2018-07-19 2018-11-23 北京百度网讯科技有限公司 resource multiplexing method, device, terminal and computer readable storage medium
CN109039730A (en) * 2018-07-25 2018-12-18 网宿科技股份有限公司 Server cluster and server cluster configuration information management method
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN109347675A (en) * 2018-10-31 2019-02-15 新华三大数据技术有限公司 Server configuration method, device and electronic equipment
CN110333939A (en) * 2019-06-17 2019-10-15 腾讯科技(成都)有限公司 Task mixed scheduling method, device, dispatch server and Resource Server

Also Published As

Publication number Publication date
CN110955460A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
CN109885786B (en) Data caching processing method and device, electronic equipment and readable storage medium
WO2020173080A1 (en) Method and apparatus for querying call chain information
CN110543448A (en) Data synchronization method, device, equipment and computer-readable storage medium
CN104636437B (en) A kind of processing method and processing device of event notification method, monitor
CN111400777B (en) Network storage system, user authentication method, device and equipment
US12001450B2 (en) Distributed table storage processing method, device and system
CN111277847A (en) Method, device, server and system for displaying chat messages in live broadcast
US10474185B2 (en) Timestamp alignment across a plurality of computing devices
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN114328029B (en) A backup method, device, electronic device and storage medium for application resources
WO2020029588A1 (en) Data reading method, device, system, and distributed system
CN110046178A (en) The method and apparatus of distributed data inquiry
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN115080272A (en) A business data processing method, electronic device and storage medium
CN108173839A (en) Rights management method and system
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN105656643B (en) A method and device for compatible management based on network configuration protocol
CN111355765B (en) A method and device for processing and sending network requests
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN117592097A (en) Data processing method and device, electronic equipment and storage medium
CN116756241A (en) Data synchronization method, device, electronic equipment and storage medium
US20240089339A1 (en) Caching across multiple cloud environments
CN110868477A (en) Task scheduling method, device and system
CN116880870A (en) An SDK update method, device and electronic equipment
CN109120692B (en) Method and apparatus for processing requests

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
GR01 Patent grant
GR01 Patent grant