Container management scheduling platform message transmission method and device and storage medium
By using ConfigMap and Kubernetes Operator for centralized message processing in the K8S cluster, the problems of transmission latency and maintenance difficulties of Kafka in the K8S cluster are solved, and lightweight and easy-to-manage message transmission is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-06-27
- Publication Date
- 2026-05-29
AI Technical Summary
When using Kafka extensively as a consumer queue in a Kubernetes cluster, issues arise such as transmission latency and difficulties in system debugging and maintenance.
ConfigMap is used as the message exchange medium, and Kubernetes Operator is used for centralized message processing. Agent containers are used to assist in message exchange and Kubernetes API for management and monitoring.
It enables centralized message processing, avoids the network and storage resource consumption of Kafka, and simplifies the debugging and maintenance process.
Smart Images

Figure CN116684241B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of message transmission, specifically to a container management and scheduling platform, a method, apparatus, and storage medium. Background Technology
[0002] Currently, if a Kubernetes cluster heavily utilizes Kafka as its consumer queue, all application containers within the cluster need to configure Kafka clients, and the production, use, configuration, and destruction of these clients must be managed separately. Their number and location can change at any time. If a large number of Pods use Kafka, this can increase the difficulty and complexity of maintenance.
[0003] There is currently no effective solution to the problems of transmission latency and difficulties in system debugging and maintenance when using distributed messaging systems for data transmission in container management and scheduling platforms. Summary of the Invention
[0004] The main objective of this application is to provide a message transmission method, apparatus, and storage medium for a container management and scheduling platform, in order to solve the problems of transmission delay and difficulty in system debugging and maintenance when using a distributed message system for data transmission in related technologies.
[0005] To achieve the above objectives, according to one aspect of this application, a message transmission method for a container management and scheduling platform is provided. The method includes: creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, the distributed messaging system being configured within the container management and scheduling platform; receiving a message to be transmitted using the message exchange medium; and processing the message to be transmitted using a message handler to complete the transmission processing of the message to be transmitted, wherein the message handler is an application program that manages the container management and scheduling platform.
[0006] Optionally, before creating the message exchange medium, the method further includes: determining the scheduling unit in the distributed messaging system; and obtaining the configuration information of the scheduling unit, wherein the configuration information is used to determine the distributed messaging system to which the scheduling unit belongs.
[0007] Optionally, the creation of the message exchange medium includes: determining the medium name, medium space, and data content based on the above configuration information; and creating the message exchange medium based on the above medium name, the above medium space, and the above data content.
[0008] Optionally, the above-mentioned method of receiving a message to be transmitted using the message exchange medium includes: obtaining the message to be transmitted using a message broker container and determining the message category of the message to be transmitted, wherein the message broker container is used to assist the message exchange medium in processing the message to be transmitted, and the message category includes: a message to be received and a message to be sent; if the message to be transmitted is a message to be sent, generating a key-value pair for the message to be sent using the message broker container and storing the key-value pair in the message exchange medium; if the message to be transmitted is a message to be received, storing the message to be received in the message exchange medium.
[0009] Optionally, after storing the message to be received in the message exchange medium, the method further includes: determining the read status of the message to be received, wherein the read status is used to indicate whether the message to be received has been read by the message broker container; if the read status of the message to be received is that it has been read, deleting the message to be received from the message exchange medium.
[0010] Optionally, the above-mentioned message processing program is used to process the message to be transmitted and complete the transmission processing of the message to be transmitted, including: monitoring the message exchange medium, wherein the monitoring process is used to determine whether the message to be transmitted exists in the message exchange medium; if the message to be transmitted exists in the message exchange medium, acquiring and parsing the message to be transmitted, determining the message content and transmission object of the message to be transmitted; and using the message processing program to transmit the message content to the transmission object.
[0011] Optionally, after processing the message to be transmitted using a message processing program and completing the transmission processing of the message to be transmitted, the method further includes: disconnecting the message exchange medium from the distributed messaging system.
[0012] To achieve the above objectives, according to another aspect of this application, a message transmission apparatus for a container management and scheduling platform is provided. The apparatus includes: a creation module for creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, which is located within the container management and scheduling platform; a receiving module for receiving a message to be transmitted using the message exchange medium; and a processing module for processing the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted, wherein the message processing program is an application program that manages the container management and scheduling platform.
[0013] To achieve the above objectives, according to another aspect of this application, a processor is provided for running a program, wherein the program executes any of the above-described container management scheduling platform message transmission methods during runtime.
[0014] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described container management scheduling platform message transmission methods.
[0015] This application employs the following steps: creating a message exchange medium, wherein the message exchange medium is used in a distributed messaging system, which is set up in a container management and scheduling platform; receiving messages to be transmitted using the message exchange medium; and processing the messages to be transmitted using a message processing program to complete the transmission of the messages. The message processing program is an application that manages the container management and scheduling platform. This solves the problems of transmission latency and system debugging and maintenance difficulties encountered when using distributed messaging systems in container management and scheduling platforms in related technologies. Furthermore, it achieves centralized message processing, avoiding the network and storage resource consumption, debugging and maintenance difficulties associated with using Kafka. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 This is a flowchart of a message transmission method for a container management and scheduling platform provided according to embodiments of this application; and
[0018] Figure 2 This is a schematic diagram of a message transmission device for a container management and scheduling platform provided according to an embodiment of this application;
[0019] Figure 3 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0024] K8S: Short for Kubernetes cluster, a container management and scheduling platform.
[0025] Kafka: A distributed message consumption system.
[0026] Agent: Auxiliary container, message broker container.
[0027] ConfigMap: Message exchange medium.
[0028] Kubernetes Operator: Automates the management and scaling of Kubernetes applications.
[0029] Pod: The smallest schedulable unit.
[0030] API: Application Programming Interface.
[0031] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.
[0032] Extensive use of Kafka in Kubernetes clusters presents challenges such as network bottlenecks, excessive system resource consumption, difficulties in debugging, and challenges in maintenance.
[0033] Kafka is a distributed messaging system that needs to transfer large amounts of data between different nodes. In Kubernetes, this data needs to be transmitted over the network. Insufficient network bandwidth or high network latency can lead to message transmission delays and performance issues. Kafka consumes significant system resources, such as CPU and memory. In Kubernetes, a Pod is the smallest schedulable unit. If a large number of Pods use Kafka, it can cause cluster resource strain and shortages. Containers in Kubernetes are isolated, which can make problem localization and debugging more difficult. Furthermore, all Kafka addresses, key APIs, and topics need to be configured individually. Their number and location can change at any time. If a large number of Pods use Kafka, it can increase the difficulty and complexity of maintenance.
[0034] In Kubernetes clusters, when processing large volumes of messages, distributed messaging systems like Kafka are typically used. However, Kafka requires significant network and storage resources and is difficult to debug and maintain, thus necessitating a more lightweight and easily manageable solution. This solution proposes using ConfigMap as the message exchange medium and then employing KubernetesOperator for centralized message processing to address these issues. The following description, in conjunction with preferred implementation steps, illustrates this invention. Figure 1 This is a flowchart of a message transmission method for a container management and scheduling platform provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0035] Step S101: Create a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, and the distributed messaging system is set in a container management and scheduling platform;
[0036] Step S102: Receive the message to be transmitted using the aforementioned message exchange medium;
[0037] Step S103: The message to be transmitted is processed by a message processing program to complete the transmission of the message to be transmitted. The message processing program is an application that manages the container management and scheduling platform.
[0038] In this embodiment of the invention, the execution entity of the container management and scheduling platform message transmission method provided in steps S101 to S103 is the container management and scheduling platform message transmission system. The system is used to create a message exchange medium, wherein the message exchange medium is applied to a distributed message system, and the distributed message system is set in the container management and scheduling platform. The message exchange medium is used to receive messages to be transmitted; a message processing program is used to process the messages to be transmitted, thereby completing the transmission processing of the messages to be transmitted, wherein the message processing program is an application program that manages the container management and scheduling platform.
[0039] As an optional implementation, a ConfigMap is created as a message exchange medium, and KubernetesOperator is used for centralized message processing to achieve centralized management and monitoring. That is, by using KubernetesOperator for centralized message processing, messages can be managed and monitored more conveniently.
[0040] Optionally, alarm rules can be configured in the Kubernetes Operator to perform comprehensive analysis and statistics of Kubernetes information across the entire cluster using alarmalrt, enabling timely identification and resolution of issues. This includes monitoring key metrics such as message processing rate and processing time for performance optimization.
[0041] In this embodiment of the invention, using ConfigMap and Kubernetes Operator to implement centralized message processing can avoid the problems of network and storage resource consumption, debugging and maintenance difficulties when using Kafka, while being more lightweight and easier to manage.
[0042] In an optional embodiment, before creating the message exchange medium, the method further includes: determining a scheduling unit in the distributed messaging system; and obtaining configuration information of the scheduling unit, wherein the configuration information is used to determine the distributed messaging system to which the scheduling unit belongs.
[0043] As an optional implementation, before creating a ConfigMap as a message exchange medium, it is necessary to obtain the Kafka information that the smallest scheduling unit (POD) depends on and configure it in the POD's environment variables as registration information so that the Kafkatopic can be used smoothly.
[0044] In one optional embodiment, the creation of the message exchange medium includes: determining the medium name, medium space, and data content based on the configuration information; and creating the message exchange medium based on the medium name, medium space, and data content.
[0045] As an optional embodiment, a message broker container Agent is used to determine the media name, media space, and data content based on the above configuration information; and to create the above message exchange media based on the above media name, media space, and data content.
[0046] Optionally, the Agent needs to create a ConfigMap object to store messages. The Agent can use the Kubernetes API to create a ConfigMap object and specify the ConfigMap's name, namespace, and data content.
[0047] It should be noted that Agent refers to a self-developed topic in the solution, which can be used as an auxiliary container in the Pod for handling the interaction between the business container and the ConfigMap.
[0048] In an optional embodiment, the above-mentioned method of receiving a message to be transmitted using the message exchange medium includes: obtaining the message to be transmitted using a message broker container and determining the message category of the message to be transmitted, wherein the message broker container is used to assist the message exchange medium in processing the message to be transmitted, and the message category includes: a message to be received and a message to be sent; if the message to be transmitted is a message to be sent, generating a key-value pair for the message to be sent using the message broker container and storing the key-value pair in the message exchange medium; if the message to be transmitted is a message to be received, storing the message to be received in the message exchange medium.
[0049] As an optional implementation, when a message needs to be sent, the application can send the message to the Agent, which then writes the message into a ConfigMap object. The Agent can treat the message as a key-value pair in the ConfigMap object, where the key represents the message's ID or type, and the value represents the message's content.
[0050] Optionally, when a message needs to be received, the application can request the Agent to read messages from the ConfigMap. The Agent will read all messages stored in the ConfigMap object and return the appropriate message based on the request type or ID.
[0051] In an optional embodiment, after storing the message to be received in the message exchange medium, the method further includes: determining the read status of the message to be received, wherein the read status is used to indicate whether the message to be received has been read by the message broker container; and deleting the message to be received from the message exchange medium if the read status of the message to be received is that it has been read.
[0052] As an optional implementation, once a message is successfully read, the Agent needs to remove it from the ConfigMap to free up storage space. The Agent can use the Kubernetes API to delete messages from the ConfigMap and keep the ConfigMap object up-to-date.
[0053] As an optional implementation, centralized message processing includes creating a Kubernetes Operator for centralized processing of messages in a ConfigMap. The Operator can read and process messages in the ConfigMap within a Pod. Custom business logic code can be written within this Kubernetes Operator to process the messages in the ConfigMap. Messages can be distributed to different Pods using the registration information of different Pods (the registration information is a unique code for the Kafka address / topic), and processed differently according to message type, including filtering and deduplication.
[0054] In an optional embodiment, the above-mentioned processing of the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted includes: monitoring the message exchange medium, wherein the monitoring process is used to determine whether the message to be transmitted exists in the message exchange medium; if the message to be transmitted exists in the message exchange medium, acquiring and parsing the message to be transmitted to determine the message content and transmission object of the message to be transmitted; and using a message processing program to transmit the message content to the transmission object.
[0055] Optionally, monitor ConfigMap resources: The Operator monitors the ConfigMap resources of the Kubernetes API server to perform corresponding operations when the ConfigMap is created or updated.
[0056] Optional, retrieve ConfigMap data: The Operator retrieves the latest ConfigMap data from the Kubernetes API server after the ConfigMap is updated.
[0057] Optionally, parse the ConfigMap data: The Operator parses the ConfigMap data to determine the messages that need to be delivered to the Kafka topic.
[0058] Optional, establish a Kafka connection: The Operator establishes a connection to the Kafka cluster so that messages can be sent.
[0059] Optional, send message: The Operator uses the Kafka producer API to send the parsed message to the specified topic.
[0060] In an optional embodiment, after the message to be transmitted is processed by the message processing program and the transmission processing of the message to be transmitted is completed, the method further includes: disconnecting the message exchange medium from the distributed messaging system.
[0061] As an optional implementation, the Operator should close the Kafka connection, release resources, and perform any necessary cleanup work after completing the message sending operation.
[0062] In one alternative implementation, centralized message processing using the Kubernetes Operator facilitates easier message management and monitoring. For example, alarm rules can be set in the Kubernetes Operator, and alarmalrt can be used to perform comprehensive analysis and statistics of Kubernetes information across the entire cluster, enabling timely identification and resolution of issues. Key metrics such as message processing rate and processing time can be monitored for performance optimization.
[0063] The message transmission method for a container management and scheduling platform provided in this application creates a message exchange medium, which is applied to a distributed messaging system located within the container management and scheduling platform. The method receives messages to be transmitted using the message exchange medium and processes these messages using a message processing program, thus completing the transmission process. The message processing program is an application that manages the container management and scheduling platform. This method solves the problems of transmission latency and system debugging and maintenance difficulties associated with using distributed messaging systems in container management and scheduling platforms. Furthermore, it achieves centralized message processing, avoiding the network and storage resource consumption, debugging and maintenance difficulties associated with using Kafka.
[0064] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0065] This application also provides a message transmission device for a container management and scheduling platform. It should be noted that this message transmission device can be used to execute the message transmission method for a container management and scheduling platform provided in this application. The following describes the message transmission device for a container management and scheduling platform provided in this application.
[0066] Figure 2 This is a schematic diagram of a message transmission device for a container management and scheduling platform according to an embodiment of this application. Figure 2 As shown, the device includes: a creation module 20 for creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, and the distributed messaging system is set in a container management and scheduling platform; a receiving module 21 for receiving a message to be transmitted using the message exchange medium; and a processing module 22 for processing the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted, wherein the message processing program is an application program that manages the container management and scheduling platform.
[0067] Optionally, in the message transmission device of the container management and scheduling platform provided in this application embodiment, a message exchange medium is created, wherein the message exchange medium is applied to a distributed message system, and the distributed message system is set in the container management and scheduling platform; the message exchange medium is used to receive messages to be transmitted; and a message processing program is used to process the messages to be transmitted, thereby completing the transmission processing of the messages to be transmitted. The message processing program is an application program that manages the container management and scheduling platform. This solves the problem of transmission delay in data transmission using a distributed message system in the container management and scheduling platform in related technologies, as well as the problems of difficult system debugging and maintenance. This achieves centralized message processing, avoiding the network and storage resource consumption, debugging and maintenance difficulties encountered when using Kafka.
[0068] The message transmission device for a container management and scheduling platform provided in this application creates a message exchange medium, wherein the message exchange medium is applied to a distributed message system, which is set in the container management and scheduling platform; it uses the message exchange medium to receive messages to be transmitted; and it uses a message processing program to process the messages to be transmitted, thereby completing the transmission processing of the messages to be transmitted. The message processing program is an application program that manages the container management and scheduling platform. This solves the problem of transmission delay in data transmission using a distributed message system in the container management and scheduling platform, as well as the problems of system debugging and maintenance difficulties, in related technologies. It achieves centralized message processing, avoiding the network and storage resource consumption, debugging and maintenance difficulties associated with using Kafka.
[0069] The aforementioned container management and scheduling platform message transmission device includes a processor and a memory. All of the aforementioned units are stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0070] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the transmission latency issues and difficulties in system debugging and maintenance associated with distributed messaging systems used in container management and scheduling platforms are addressed. This achieves centralized message processing, avoiding the network and storage resource consumption, debugging, and maintenance difficulties encountered when using Kafka.
[0071] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0072] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the aforementioned message transmission method for a container management and scheduling platform.
[0073] This invention provides a processor for running a program, wherein the program executes the container management scheduling platform message transmission method during runtime.
[0074] like Figure 3 As shown, this embodiment of the invention provides an electronic device. The device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, and the distributed messaging system is set in a container management and scheduling platform; receiving a message to be transmitted using the message exchange medium; and processing the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted, wherein the message processing program is an application program that manages the container management and scheduling platform. The device in this document can be a server, PC, PAD, mobile phone, etc.
[0075] Optionally, when the processor executes the program, it performs the following steps: determining the scheduling unit in the above-mentioned distributed messaging system; obtaining the configuration information of the above-mentioned scheduling unit, wherein the configuration information is used to determine the above-mentioned distributed messaging system to which the above-mentioned scheduling unit belongs.
[0076] Optionally, when the processor executes the program, it performs the following steps: based on the above configuration information, it determines the media name, media space, and data content; based on the above media name, media space, and data content, it creates the above message exchange media.
[0077] Optionally, when the processor executes the program, it performs the following steps: using a message broker container to obtain the message to be transmitted and determining the message category of the message to be transmitted, wherein the message broker container is used to assist the message exchange medium in processing the message to be transmitted, and the message category includes: message to be received and message to be sent; if the message to be transmitted is the message to be sent, using the message broker container to generate a key-value pair for the message to be sent and storing the key-value pair in the message exchange medium; if the message to be transmitted is the message to be received, storing the message to be received in the message exchange medium.
[0078] Optionally, when the processor executes the program, it performs the following steps: determining the read status of the message to be received, wherein the read status is used to indicate whether the message to be received has been read by the message broker container; if the read status of the message to be received is that it has been read, deleting the message to be received from the message exchange medium.
[0079] Optionally, when the processor executes the program, it performs the following steps: listening to the message exchange medium, wherein the listening process is used to determine whether the message to be transmitted exists in the message exchange medium; if the message to be transmitted exists in the message exchange medium, the message to be transmitted is acquired and parsed to determine the message content and the transmission object of the message to be transmitted; and a message processing program is used to transmit the message content to the transmission object.
[0080] Optionally, when the processor executes the program, it performs the following steps: disconnecting the above message exchange medium from the above distributed messaging system.
[0081] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, the distributed messaging system being set in a container management and scheduling platform; receiving a message to be transmitted using the message exchange medium; and processing the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted, wherein the message processing program is an application program that manages the container management and scheduling platform.
[0082] Optionally, when executed on a data processing device, it is suitable to execute an initialization program with the following method steps: determining the scheduling unit in the aforementioned distributed messaging system; obtaining the configuration information of the aforementioned scheduling unit, wherein the configuration information is used to determine the aforementioned distributed messaging system to which the aforementioned scheduling unit belongs.
[0083] Optionally, when executed on a data processing device, it is suitable to execute an initialization program with the following method steps: determining the media name, media space, and data content based on the above configuration information; and creating the above message exchange media based on the above media name, media space, and data content.
[0084] Optionally, when executed on a data processing device, it is suitable to execute an initialization program with the following method steps: using a message broker container to obtain the message to be transmitted and determining the message category of the message to be transmitted, wherein the message broker container is used to assist the message exchange medium in processing the message to be transmitted, and the message category includes: a message to be received and a message to be sent; if the message to be transmitted is a message to be sent, using the message broker container to generate a key-value pair for the message to be sent and storing the key-value pair in the message exchange medium; if the message to be transmitted is a message to be received, storing the message to be received in the message exchange medium.
[0085] Optionally, when executed on a data processing device, it is suitable to execute an initialization program with the following method steps: determining the read status of the message to be received, wherein the read status is used to indicate whether the message to be received has been read by the message broker container; if the read status of the message to be received is that it has been read, deleting the message to be received from the message exchange medium.
[0086] Optionally, when executed on a data processing device, it is suitable to execute a program that initializes the following steps: listening to the message exchange medium, wherein the listening process is used to determine whether the message to be transmitted exists in the message exchange medium; if the message to be transmitted exists in the message exchange medium, acquiring and parsing the message to be transmitted, determining the message content and transmission object of the message to be transmitted; and using a message processing program to transmit the message content to the transmission object.
[0087] Optionally, when executed on a data processing device, it is suitable to execute an initialization procedure with the following steps: disconnecting the aforementioned message exchange medium from the aforementioned distributed messaging system.
[0088] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0092] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0093] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0094] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0095] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0096] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A message transmission method for a container management and scheduling platform, characterized in that, include: Create a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, and the distributed messaging system is set up in a container management and scheduling platform; The message exchange medium is used to receive the message to be transmitted; The message to be transmitted is processed by a message handler to complete the transmission of the message to be transmitted, wherein the message handler is an application that manages the container management and scheduling platform; The message exchange medium is a ConfigMap, and the message processing program is a Kubernetes Operator.
2. The method according to claim 1, characterized in that, Prior to creating the message exchange medium, the method further includes: Determine the scheduling unit in the distributed messaging system; Obtain the configuration information of the scheduling unit, wherein the configuration information is used to determine the distributed messaging system to which the scheduling unit belongs.
3. The method according to claim 2, characterized in that, The creation of the message exchange medium includes: Based on the configuration information, the media name, media space, and data content are determined; The message exchange medium is created based on the media name, the media space, and the data content.
4. The method according to claim 1, characterized in that, The step of receiving the message to be transmitted using the message exchange medium includes: The message broker container is used to obtain the message to be transmitted and determine the message category of the message to be transmitted. The message broker container is used to assist the message exchange medium in processing the message to be transmitted. The message category includes: message to be received and message to be sent. When the message to be transmitted is the message to be sent, the message broker container is used to generate key-value pairs for the message to be sent, and the key-value pairs are stored in the message exchange medium. If the message to be transmitted is the message to be received, the message to be received is stored in the message exchange medium.
5. The method according to claim 4, characterized in that, After storing the message to be received in the message exchange medium, the method further includes: Determine the read status of the message to be received, wherein the read status is used to indicate whether the message to be received has been read by the message broker container; If the read status of the message to be received is "read", then delete the message to be received from the message exchange medium.
6. The method according to claim 1, characterized in that, The step of processing the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted includes: The message exchange medium is monitored, wherein the monitoring process is used to determine whether the message to be transmitted exists in the message exchange medium; If the message to be transmitted exists in the message exchange medium, the message to be transmitted is acquired and parsed to determine the message content and transmission object of the message to be transmitted. The message content is transmitted to the transmission object using a message processing program.
7. The method according to any one of claims 1 to 6, characterized in that, After processing the message to be transmitted using a message handler and completing the transmission processing of the message to be transmitted, the method further includes: Disconnect the message exchange medium from the distributed messaging system.
8. A message transmission device for a container management and scheduling platform, characterized in that, include: A creation module is provided for creating a message exchange medium, wherein the message exchange medium is applied to a distributed messaging system, and the distributed messaging system is set up in a container management and scheduling platform; The receiving module is used to receive messages to be transmitted using the message exchange medium. The processing module is used to process the message to be transmitted using a message processing program to complete the transmission processing of the message to be transmitted, wherein the message processing program is an application that manages the container management and scheduling platform; The message exchange medium is a ConfigMap, and the message processing program is a Kubernetes Operator.
9. A processor, characterized in that, The processor is used to run a program, wherein the program executes the container management scheduling platform message transmission method according to any one of claims 1 to 7 when it runs.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the message transmission method of the container management scheduling platform according to any one of claims 1 to 7.