CN113326108A - Method and device for managing application service - Google Patents

Method and device for managing application service Download PDF

Info

Publication number
CN113326108A
CN113326108A CN202010128349.9A CN202010128349A CN113326108A CN 113326108 A CN113326108 A CN 113326108A CN 202010128349 A CN202010128349 A CN 202010128349A CN 113326108 A CN113326108 A CN 113326108A
Authority
CN
China
Prior art keywords
service
node
application system
application
services
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
CN202010128349.9A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010128349.9A priority Critical patent/CN113326108A/en
Publication of CN113326108A publication Critical patent/CN113326108A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

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 discloses a method and a device for managing application services, and relates to the technical field of computers. One embodiment of the method comprises: acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center; storing the service attribute and the node state of each service into a directory node of the registration center; modifying the node state of any one or more of the services. The embodiment can solve the technical problem of high maintenance cost of the application service.

Description

Method and device for managing application service
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing application services.
Background
With the increasing development of internet technology, software development engineers have gained great benefits from various open-source frameworks that are continuously iterative and continuously optimized. For example, distributed message frameworks rocktmq, RabbitMq, ActiveMq, Kafka, etc., distributed task frameworks ElasticJob, saturn, Its, Quartz, etc. When the application is maintained online, a software developer can select the following two modes.
Mode 1: the service under the application system defaults to a full open state; mode 2: the service under the application system defaults to a complete closed state, and after the application program is successfully started, a software developer needs to log in a management console of each application system to manually start services such as message subscription or job scheduling.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
mode 1: after the application is sent and upgraded, all services are started to operate immediately, if the new on-line logic is not verified effectively, once the new logic has problems, a large amount of error data can appear in a short time.
Mode 2: each time an application is updated iteratively, it is limited by various business scenarios and software developers need to expend significant effort to configure the individual services under each application system.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for managing an application service, so as to solve the technical problem of high maintenance cost of the application service.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for managing an application service, applied to a management center, including:
acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center;
storing the service attribute and the node state of each service into a directory node of the registration center;
modifying the node state of any one or more of the services.
Optionally, storing the service attribute and the node status of each service in a directory node of the registry includes:
for each service, storing the service attribute and the node state of the service into a directory node corresponding to the service of the registry;
the service attribute comprises a name, a type, a description and an IP address of a physical machine for deploying the service, and the node state comprises opening and closing.
In addition, according to another aspect of the embodiments of the present invention, there is provided a method for managing an application service, applied to an application system, including:
according to a preset label standard, a label corresponding to the service under the application system is quoted; wherein the tag criteria comprises a business attribute;
and monitoring the node state stored in the directory node corresponding to the service of the registration center.
Optionally, the method further comprises:
if the node state stored in the directory node corresponding to the service of the registration center is monitored to be changed, updating the state information of the service according to the changed node state;
wherein the status information is turned on and off.
Optionally, the method further comprises:
and after the application system is restarted, controlling the service to be started or closed according to the state information of the service.
Optionally, according to a predefined label standard, before referring to a label corresponding to a service under the application system, the method further includes:
registering the application system with the registry.
In addition, according to another aspect of the embodiments of the present invention, there is provided an apparatus for managing an application service, which is provided in a management center, and includes:
the acquisition module is used for acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center;
the storage module is used for storing the service attribute and the node state of each service into the directory node of the registration center;
a modification module for modifying the node state of any one or more of the services.
Optionally, the storage module is further configured to:
for each service, storing the service attribute and the node state of the service into a directory node corresponding to the service of the registry;
the service attribute comprises a name, a type, a description and an IP address of a physical machine for deploying the service, and the node state comprises opening and closing.
In addition, according to another aspect of the embodiments of the present invention, there is provided an apparatus for managing an application service, which is disposed at an application system side, and includes:
the reference module is used for referencing a label corresponding to the service under the application system according to a preset label standard; wherein the tag criteria comprises a business attribute;
and the monitoring module is used for monitoring the node state stored in the directory node corresponding to the service of the registration center.
Optionally, the listening module is further configured to:
if the node state stored in the directory node corresponding to the service of the registration center is monitored to be changed, updating the state information of the service according to the changed node state;
wherein the status information is turned on and off.
Optionally, the method further comprises:
and the starting module is used for controlling the service to be started or closed according to the state information of the service after the application system is restarted.
Optionally, the method further comprises:
and the registration module is used for registering the application system to the registration center before the label corresponding to the service under the application system is quoted according to the preset label standard.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: the technical means of storing the service attributes and the node states of each service in the directory nodes of the registry and modifying the node states of any one or more services is adopted, so the technical problem of high maintenance cost of application services in the prior art is solved. The embodiment of the invention enables the application system to correspondingly modify the state information of the service after monitoring the change of the node state by modifying the node state stored in the directory node of the registration center, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of managing application services according to an embodiment of the present invention;
FIG. 2 is a schematic view of a management interface of a management center according to an embodiment of the present invention;
FIG. 3 is a bottom level schematic diagram according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a main flow of a method of managing application services according to an embodiment of the invention;
fig. 5 is a schematic diagram of a main flow of a method of managing application services according to a referential embodiment of the present invention;
fig. 6 is a schematic diagram of main modules of an apparatus for managing application services according to an embodiment of the present invention;
fig. 7 is a schematic diagram of main modules of an apparatus for managing application services according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method of managing application services according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 1, the method for managing an application service is applied to a management center, and may include:
and step 101, acquiring the service attribute of each service under each application system according to the label.
In the embodiment of the present invention, the management center needs to create tags (such as a timing task tag, a message monitoring tag, and the like) first, establish a usage standard for each tag, and then publish the supported tags to the outside, and each service under each application system refers to a tag corresponding to each service according to the standard. For example, when a service in an application system refers to a tag, a service unique identifier, a service name, a service type, a description, an IP address of a physical machine for deploying the service, an execution cycle, and the like need to be provided according to a label, so that a management center can distinguish characteristics of each service according to the tag, and different management mechanisms are implemented. In an embodiment of the invention, each said service references said tag, and said management centre and each said application system are registered in the same registry. Alternatively, the registry may be a Zookeeper, a distributed, open source distributed application coordination service.
The services provided by the application systems can be different due to different responsibility division. For example, system a is a task scheduling system, system B is a message production/subscription system, and system C provides only Remote Procedure Call (RPC) services. The system A executes a timing task, for example, a daily report is sent to a user at 8 points per night; the system B processes the message generated at the upstream, for example, the upstream order system sends a message of [ order is created ], and the system B starts to calculate the charging details of the order after receiving the message. The C system generally refers to a common service provider, for example, C is an inventory system, which needs to provide RPC services such as inventory modification, query, etc. to the front end.
The label has rich attributes such as service type, service name, description, unique identification and the like, and can be expanded according to needs, and the service under the application system needs to be managed by the management center, so that the label is referred to, and the service attributes such as the name, the type and the like of the service are exposed. In order to distinguish and manage different services, the embodiment of the invention utilizes Spring self-defined tags, provides flexible and changeable tags and defines a use standard for each application system to use, so as to distinguish different types of services, thereby realizing the distinguishing management of different services under each application system.
And 102, storing the service attribute and the node state of each service into a directory node of the registration center.
Since each service under each application system refers to a label, when the application system is started, the toolkit of the management center automatically finds out the service that refers to the label, and persists the service attribute of the service to the directory node (such as the directory node Znode of Zookeeper) of the registry, so that the management center can read and manage the information in the registry. The information of each service can also be graphically displayed, and a management interface schematic diagram of the management center is shown in fig. 2, and batch processing can be performed through the upper left side [ policy open ] and the upper left side [ one key close ]. Optionally, the service attributes include a name, a type, a description, and an IP address of a physical machine that deploys the service.
In order to facilitate the management of the on state and the off state of each service, the management center also stores the node state of the service which refers to the label into the directory node of the registry and manages the node state. Optionally, the node state comprises on and off.
Optionally, step 102 comprises: for each service, storing the service attribute and the node state of the service in a directory node corresponding to the service of the registry. Because the management center and each application system are registered in the same registration center, the management center can discover the application systems registered in the registration center and acquire configuration information (such as system names, services under the system, service attributes and node states of each service, and the like) of the application systems, thereby achieving the purpose of managing each service under each application system.
It should be noted that the creation paths of the directory nodes of the registry are regular, for example, the root node is a machine, and whenever a new system application accesses, a new secondary node is created under the machine. Therefore, the management center can find out all the application systems and manage the application systems only by traversing the machine to have a plurality of secondary nodes.
Alternatively, a directory node, i.e., a machine + a system name + an application name + a service name, may be created using the system name, the application name, and the service name, so that each service may be viewed and managed.
For example, the directory node may be as follows:
/machine/xstore/xstore-settle-center/settleStatementRecPayStatsConsumer
alternatively, a directory node, i.e., baseTask + system name + application name + service name + IP, may be created using the system name, application name, service name, and IP address of the physical machine on which the service is deployed, so that it is possible to view and manage on which machines the service is deployed.
For example, the directory node may be as follows:
/baseTask/xstore/xstore-settle-center/settleStatementRecPayStatsConsumer/128.11.9.1
according to the embodiment of the invention, the application system, the service and the IP are mapped into the zookeeper directory nodes, and the directory nodes are stored in a dictionary manner through the tree data structure, so that the comprehensive management of the multi-application system is realized.
Optionally, in the embodiment of the present invention, the characteristics of the Zookeeper are utilized to store the configuration information of each application system in a directory node (Znode) of the Zookeeper, and the application systems monitor the configuration information, and once the configuration information changes, each application system receives a notification sent by the Zookeeper, and then obtains new configuration information from the Zookeeper to the application systems. In an embodiment of the invention, the path of the Znode is globally unique; the contents of Znode can always exist in the memory, and the reading is convenient; the znode can isolate each application system, thereby realizing the safety management of each application system.
Curater is a Zookeeper open source client framework that encapsulates many interfaces. The embodiment of the invention utilizes CuratorFramework (a customer service end of Zookeeper, which can discover and manage a znode node) to realize service discovery. Znode is isolated for each accessed application system, and is the system path of each system. Each application system has its own root path, and services hosted under the application (such as a message listener or a job) as an instance service also have globally unique Znode, so that all the application systems hosted to the registry and the services under the application can be acquired through an interface provided by the CuratorFramework, and the services are uniformly managed. In the embodiment of the invention, the message listener refers to a subscriber of the distributed message, and monitors the message sent by the message sender and processes the service logic; the operation refers to a system timing task.
It should be noted that when the application system accesses the registry, the registry needs to be configured like the management center, and declares a service (such as a message listener or a job) to be hosted by using a namespace provided by the management center, the hosted application system and the management center share a set of registry, otherwise, the management center cannot discover the service that needs to be uniformly managed. Specifically, after the Zookeeper cluster is built, the management center introduces the dependency on the Zookeeper and points to the Zookeeper cluster address in the configuration file. If an application system wants to be hosted in a management center, the same Zookeeper cluster address must be configured.
Step 103, modifying the node state of any one or more of the services.
The developer can modify the node state of any one or more services through the management center according to the requirement, such as modifying on to off and modifying off to on. The method can perform batch operation on the node states of a plurality of services, thereby improving the management efficiency, reducing the maintenance cost of the application services, and solving the problem that developers are tired of distributed management caused by scattered consoles of a plurality of application systems in each system in the prior art.
As shown in fig. 3, each application system (for example, application system a, application system B, application system C, and the like) monitors the node state stored in the corresponding directory node in real time, and if it is monitored that the node state stored in the directory node of the registry changes, updates the state information of the service under the application system according to the changed node state; wherein the status information is turned on and off. If the node state of the service is open, the state information of the service is open, and when the application system of the service is started, the service is in the open state; and if the node state of the service is closed, the state information of the service is closed, and after the application system of the service is started, the service is in a closed state.
According to the various embodiments described above, it can be seen that the technical means of the embodiments of the present invention, which stores the service attributes and node states of each service in the directory node of the registry and modifies the node states of any one or more services, solves the technical problem of high maintenance cost of application services in the prior art. The embodiment of the invention enables the application system to correspondingly modify the state information of the service after monitoring the change of the node state by modifying the node state stored in the directory node of the registration center, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
Fig. 4 is a schematic diagram of a main flow of a method of managing application services according to an embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 4, the method for managing application services is applied to an application system side, and may include the following steps:
step 401, according to a pre-established label standard, a label corresponding to a service under an application system is referred.
In the embodiment of the present invention, the management center needs to create tags (such as a timing task tag, a message monitoring tag, and the like) first, establish a usage standard for each tag, then publish the supported tags to the outside, and each service in the application system refers to the tag corresponding to each service according to the standard. For example, when a service in an application system refers to a tag, a service unique identifier, a service name, a service type, a description, an IP address of a physical machine for deploying the service, an execution cycle, and the like need to be provided according to a label, so that a management center can distinguish characteristics of each service according to the tag, and different management mechanisms are implemented. The tag standard includes a service attribute, and the service attribute may include a service unique identifier, a service name, a service type, a description, an IP address of a physical machine that deploys the service, and the like. The label has rich attributes such as service type, service name, description, unique identification and the like, and can be expanded according to needs, and the service under the application system needs to be managed by the management center, so that the label is referred to, and the service attributes such as the name, the type and the like of the service are exposed.
Step 402, monitoring node states stored in directory nodes corresponding to the services of the registry.
Since each service under the application system refers to a label, when the application system is started, the toolkit of the management center automatically finds out the service which refers to the label, and persists the service attribute of the service to the directory node (such as the directory node Znode of Zookeeper) of the registry, so that the management center can read and manage the information in the registry. In order to facilitate the management of the on state and the off state of each service, the management center also stores the node state of the service which refers to the label into the directory node of the registry and manages the node state. Optionally, the node state comprises on and off.
For each service, storing the service attribute and the node state of the service in a directory node corresponding to the service of the registry. Because the management center and the application systems are registered in the same registration center, the management center can discover the application systems registered in the registration center and acquire configuration information (such as system names, services under the system, service attributes and node states of the services) of the application systems, thereby achieving the purpose of managing the services under the application systems.
The application system monitors the node state stored in the corresponding directory node in real time, and if the node state stored in the directory node of the registration center is monitored to be changed, the state information of the service under the application system is updated according to the changed node state; wherein the status information is turned on and off. If the node state of the service is open, the state information of the service is open, and when the application system of the service is started, the service is in the open state; and if the node state of the service is closed, the state information of the service is closed, and after the application system of the service is started, the service is in a closed state.
According to the various embodiments described above, it can be seen that the technical problem of high maintenance cost of the application service in the prior art is solved by the technical means of introducing the label corresponding to the service in the application system according to the pre-established label standard and monitoring the node state stored in the directory node corresponding to the service in the registration center in the embodiments of the present invention. The embodiment of the invention monitors the node state stored in the directory node corresponding to the service of the registration center, so that the application system correspondingly modifies the state information of the service after monitoring the change of the node state, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
Fig. 5 is a schematic diagram of a main flow of a method of managing application services according to a referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 5, the method for managing an application service is applied to an application system side, and may include:
step 501, according to a pre-established label standard, a label corresponding to a service under an application system is quoted.
Step 502, monitoring node states stored in directory nodes corresponding to the services of the registry.
Step 503, if it is monitored that the node state stored in the directory node corresponding to the service of the registry changes, updating the state information of the service according to the changed node state.
And step 504, after the application system is restarted, controlling the service to be started or closed according to the state information of the service.
The application system monitors the node state stored in the corresponding directory node in real time, and if the node state stored in the directory node of the registration center is monitored to be changed, the state information of the service under the application system is updated according to the changed node state; wherein the status information is turned on and off. If the node state of the service is open, the state information of the service is open, and when the application system of the service is started, the service is in the open state; and if the node state of the service is closed, the state information of the service is closed, and after the application system of the service is started, the service is in a closed state.
In addition, in one embodiment of the present invention, the detailed implementation of the method for managing application services is described in detail above, and therefore the repeated description is omitted here.
Fig. 6 is a schematic diagram of main modules of an apparatus for managing application services according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for managing application services is disposed in a management center and includes an obtaining module 601, a storing module 602, and a modifying module 603. The obtaining module 601 is configured to obtain a service attribute of each service under each application system according to the tag; wherein each service refers to the label, and the management center and each application system are registered in the same registration center; the storage module 602 is configured to store the service attribute and the node state of each service in a directory node of the registry; the modification module 603 is configured to modify a node state of any one or more of the services.
Optionally, the storage module 602 is further configured to:
for each service, storing the service attribute and the node state of the service into a directory node corresponding to the service of the registry;
the service attribute comprises a name, a type, a description and an IP address of a physical machine for deploying the service, and the node state comprises opening and closing.
According to the various embodiments described above, it can be seen that the technical means of the embodiments of the present invention, which stores the service attributes and node states of each service in the directory node of the registry and modifies the node states of any one or more services, solves the technical problem of high maintenance cost of application services in the prior art. The embodiment of the invention enables the application system to correspondingly modify the state information of the service after monitoring the change of the node state by modifying the node state stored in the directory node of the registration center, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
It should be noted that, in the implementation of the apparatus for managing application services according to the present invention, the details of the method for managing application services are already described in detail above, and therefore, the repeated descriptions herein are not repeated.
Fig. 7 is a schematic diagram of main blocks of an apparatus for managing application services according to an embodiment of the present invention. As shown in fig. 7, the apparatus 700 for managing application services is disposed at an application system side and includes a reference module 701 and a listening module 702. The reference module 701 is configured to reference a tag corresponding to a service in an application system according to a pre-established tag standard; wherein the tag criteria comprises a business attribute; the monitoring module 702 is configured to monitor a node state stored in a directory node corresponding to the service of the registry.
Optionally, the listening module 702 is further configured to:
if the node state stored in the directory node corresponding to the service of the registration center is monitored to be changed, updating the state information of the service according to the changed node state;
wherein the status information is turned on and off.
Optionally, the method further comprises:
and the starting module is used for controlling the service to be started or closed according to the state information of the service after the application system is restarted.
Optionally, the method further comprises:
and the registration module is used for registering the application system to the registration center before the label corresponding to the service under the application system is quoted according to the preset label standard.
According to the various embodiments described above, it can be seen that the technical problem of high maintenance cost of the application service in the prior art is solved by the technical means of introducing the label corresponding to the service in the application system according to the pre-established label standard and monitoring the node state stored in the directory node corresponding to the service in the registration center in the embodiments of the present invention. The embodiment of the invention monitors the node state stored in the directory node corresponding to the service of the registration center, so that the application system correspondingly modifies the state information of the service after monitoring the change of the node state, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
It should be noted that, in the implementation of the apparatus for managing application services according to the present invention, the details of the method for managing application services are already described in detail above, and therefore, the repeated descriptions herein are not repeated.
Fig. 8 illustrates an exemplary system architecture 800 of a method of managing application services or an apparatus for managing application services to which embodiments of the present invention may be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server that provides various services, such as a back-office management server (for example only) that supports shopping-like websites browsed by users using the terminal devices 801, 802, 803. The background management server may analyze and otherwise process the received data such as the item information query request, and feed back a processing result (for example, target push information, item information — just an example) to the terminal device.
It should be noted that the method for managing the application service provided by the embodiment of the present invention is generally performed by the server 805, and accordingly, the apparatus for managing the application service is generally disposed in the server 805. The method for managing the application service provided by the embodiment of the present invention may also be executed by the terminal devices 801, 802, and 803, and accordingly, the apparatus for managing the application service may be disposed in the terminal devices 801, 802, and 803.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a storage module, and a modification module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a reference module and a snoop module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center; storing the service attribute and the node state of each service into a directory node of the registration center; modifying the node state of any one or more of the services.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: according to a preset label standard, a label corresponding to the service under the application system is quoted; wherein the tag criteria comprises a business attribute; and monitoring the node state stored in the directory node corresponding to the service of the registration center.
According to the technical scheme of the embodiment of the invention, because the technical means of storing the service attributes and the node states of each service in the directory node of the registration center and modifying the node states of any one or more services is adopted, the technical problem of high maintenance cost of the application service in the prior art is solved. The embodiment of the invention enables the application system to correspondingly modify the state information of the service after monitoring the change of the node state by modifying the node state stored in the directory node of the registration center, thereby facilitating the management of different types of services and reducing the maintenance cost of the online application service.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for managing application services is applied to a management center, and comprises the following steps:
acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center;
storing the service attribute and the node state of each service into a directory node of the registration center;
modifying the node state of any one or more of the services.
2. The method of claim 1, wherein storing the service attributes and node states for each of the services in a directory node of the registry comprises:
for each service, storing the service attribute and the node state of the service into a directory node corresponding to the service of the registry;
the service attribute comprises a name, a type, a description and an IP address of a physical machine for deploying the service, and the node state comprises opening and closing.
3. A method for managing application services is applied to an application system side, and comprises the following steps:
according to a preset label standard, a label corresponding to the service under the application system is quoted; wherein the tag criteria comprises a business attribute;
and monitoring the node state stored in the directory node corresponding to the service of the registration center.
4. The method of claim 3, further comprising:
if the node state stored in the directory node corresponding to the service of the registration center is monitored to be changed, updating the state information of the service according to the changed node state;
wherein the status information is turned on and off.
5. The method of claim 4, further comprising:
and after the application system is restarted, controlling the service to be started or closed according to the state information of the service.
6. The method of claim 3, wherein before referring to the label corresponding to the service under the application system according to the pre-established label standard, further comprising:
registering the application system with the registry.
7. An apparatus for managing application services, disposed in a management center, includes:
the acquisition module is used for acquiring the service attribute of each service under each application system according to the label; wherein each service refers to the label, and the management center and each application system are registered in the same registration center;
the storage module is used for storing the service attribute and the node state of each service into the directory node of the registration center;
a modification module for modifying the node state of any one or more of the services.
8. An apparatus for managing application services, disposed at an application system side, includes:
the reference module is used for referencing a label corresponding to the service under the application system according to a preset label standard; wherein the tag criteria comprises a business attribute;
and the monitoring module is used for monitoring the node state stored in the directory node corresponding to the service of the registration center.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, implement the method of any of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010128349.9A 2020-02-28 2020-02-28 Method and device for managing application service Pending CN113326108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010128349.9A CN113326108A (en) 2020-02-28 2020-02-28 Method and device for managing application service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010128349.9A CN113326108A (en) 2020-02-28 2020-02-28 Method and device for managing application service

Publications (1)

Publication Number Publication Date
CN113326108A true CN113326108A (en) 2021-08-31

Family

ID=77412665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010128349.9A Pending CN113326108A (en) 2020-02-28 2020-02-28 Method and device for managing application service

Country Status (1)

Country Link
CN (1) CN113326108A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102945249A (en) * 2012-10-10 2013-02-27 北京邮电大学 Policy rule matching query tree generating method, matching method and device
US20130058358A1 (en) * 2010-07-06 2013-03-07 Bryan J. Fulton Network control apparatus and method with quality of service controls
CN103200225A (en) * 2013-02-25 2013-07-10 汉柏科技有限公司 Method and system of centralized management of services in server cluster
CN105407161A (en) * 2015-11-30 2016-03-16 北京奇艺世纪科技有限公司 Application service management method and system as well as application service discovery method and system
CN108182087A (en) * 2018-01-26 2018-06-19 郑州云海信息技术有限公司 A kind of method and apparatus for being used to manage distributed software configuration concentratedly
CN108804119A (en) * 2018-04-28 2018-11-13 北京金山云网络技术有限公司 Configure update method, device, system, configuration center, application node and medium
CN109816321A (en) * 2018-11-27 2019-05-28 深圳市汇邦企业服务有限公司 A kind of service management, device, equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130058358A1 (en) * 2010-07-06 2013-03-07 Bryan J. Fulton Network control apparatus and method with quality of service controls
CN102945249A (en) * 2012-10-10 2013-02-27 北京邮电大学 Policy rule matching query tree generating method, matching method and device
CN103200225A (en) * 2013-02-25 2013-07-10 汉柏科技有限公司 Method and system of centralized management of services in server cluster
CN105407161A (en) * 2015-11-30 2016-03-16 北京奇艺世纪科技有限公司 Application service management method and system as well as application service discovery method and system
CN108182087A (en) * 2018-01-26 2018-06-19 郑州云海信息技术有限公司 A kind of method and apparatus for being used to manage distributed software configuration concentratedly
CN108804119A (en) * 2018-04-28 2018-11-13 北京金山云网络技术有限公司 Configure update method, device, system, configuration center, application node and medium
CN109816321A (en) * 2018-11-27 2019-05-28 深圳市汇邦企业服务有限公司 A kind of service management, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
顾乾斌;潘善亮;: "基于Zookeeper的国土资源档案分布式查询框架设计与实现", 移动通信, no. 05, 15 March 2017 (2017-03-15) *

Similar Documents

Publication Publication Date Title
US10735345B2 (en) Orchestrating computing resources between different computing environments
CN109976667B (en) Mirror image management method, device and system
US20200226185A1 (en) Publishing rest api changes based on subscriber's customized request
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
CN109995801B (en) Message transmission method and device
CN108984544B (en) Method and device for modifying configuration information of distributed system
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111427701A (en) Workflow engine system and business processing method
WO2024077885A1 (en) Management method, apparatus and device for container cluster, and non-volatile readable storage medium
CN111090423A (en) Webhook framework system and method for realizing active calling and event triggering
CN113760324A (en) Method and device for constructing micro front-end application
CN112612467A (en) Method and device for processing micro front-end architecture based on qiankun
CN113377626A (en) Visual unified alarm method, device, equipment and medium based on service tree
CN110795741A (en) Method and device for carrying out security processing on data
CN114968406A (en) Plug-in management method and device, electronic equipment and storage medium
CN112817562A (en) Service processing method and device
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN112463251A (en) Method and device for configuring hot publishing by uliweb framework
CN113541987A (en) Method and device for updating configuration data
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN113326108A (en) Method and device for managing application service
CN112559001B (en) Method and device for updating application
CN112099841A (en) Method and system for generating configuration file
CN112463616A (en) Chaos testing method and device for Kubernetes container platform

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