CN112685458B - Method and system for realizing cloud native application controller - Google Patents
Method and system for realizing cloud native application controller Download PDFInfo
- Publication number
- CN112685458B CN112685458B CN202110060383.1A CN202110060383A CN112685458B CN 112685458 B CN112685458 B CN 112685458B CN 202110060383 A CN202110060383 A CN 202110060383A CN 112685458 B CN112685458 B CN 112685458B
- Authority
- CN
- China
- Prior art keywords
- module
- processing
- resource
- data
- controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a system for realizing a cloud native application controller, belonging to the field of cloud native application; the system specifically comprises a resource acquisition module, an event processing module, a resource processing module, a data updating module, a data processing module, a resource integration module, a data indexing module and a data integration module; the invention discloses a method and a system for realizing a cloud native application controller, which can effectively improve the development efficiency of application, reduce the operation and maintenance cost and perform declarative management on application resources.
Description
Technical Field
The invention discloses a method and a system for realizing a cloud native application controller, and relates to the technical field of cloud native application.
Background
The container technology is a popular PaaS technology for providing micro services, kubernets is the most popular container arrangement management technology in the near term and is a brand-new container technology-based distributed architecture leading scheme, a series of functions such as deployment operation, resource scheduling, service discovery, dynamic expansion and the like are provided for containerized applications on the basis of the Docker technology, a container cloud platform provided on the basis of the Kubernets is the first choice of various cloud manufacturers, and cloud native applications provided on the basis of the Kubernets is a technology which must be mastered by various cloud manufacturers or cloud developers and needs to be applied from the traditional application to the cloud native application.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for realizing a cloud native application controller, wherein the adopted technical scheme is as follows: a method for realizing a cloud-native application controller comprises the following specific steps:
s1, acquiring and caching monitoring resource information from an Api server by using a controller periodically;
s2, utilizing the controller to perform event processing on the acquired resources;
s3, processing the asynchronous resources;
s4, processing and updating the queue data by using the controller;
s5, calling a processing method for processing the event by the process monitor;
s6, executing the operations of the List and the Watch, calling a resource set to realize and putting the inquired number into a queue;
s7, calling a security thread to cache all metadata, and defaulting to take a name space as an index function;
s8, operating the metadata in a json format by utilizing a K8S client tool.
The step S2 of performing event processing on the acquired resource by using the controller includes:
s201, acquiring a reading object through a defined data sharing factory;
s202, adding an event processor to process operation events;
s203 defines a resource queue for asynchronously processing resource events.
The specific step of S3 processing the asynchronous resource includes:
s301, defining a work queue for supporting resource asynchronous processing;
s302, the factory reads the reader of the resource by a start method;
the shared index reader read in S303 processes the process and the controller task.
The step S4 of processing and updating the queue data by using the controller includes:
s401, the controller processes the queue data at intervals and updates the metadata to an index cache;
s402, calling a queue method of a shared index reader and distributing a notice to a shared process;
s403 starts the timing processing logic of the reflector.
The system specifically comprises a resource acquisition module, an event processing module, a resource processing module, a data updating module, a data processing module, a resource integration module, a data indexing module and a data integration module:
a resource acquisition module: acquiring and caching monitoring resource information from an Api server by using a controller periodically;
an event processing module: utilizing a controller to perform event processing on the acquired resources;
the resource processing module: processing the asynchronous resources;
a data updating module: processing and updating the queue data by using the controller;
a data processing module: calling a processing method for processing events by a process monitor;
resource integration module: executing operations of List and Watch, calling a resource set to realize and putting the inquired number into a queue;
a data indexing module: calling a security thread to cache all metadata, and defaulting to take a name space as an index function;
a data collection module: the metadata is manipulated in json format using the K8S client tool.
The event processing module specifically comprises an acquisition module, an adding module and a distribution module:
an acquisition module: acquiring a reading object through a defined data sharing factory;
adding a module: adding an event processor to process the operation event;
a distribution module: a resource queue is defined for asynchronously processing resource events.
The resource processing module specifically comprises a definition module, a reading module A and a reading module B:
a definition module: defining a work queue for supporting resource asynchronous processing;
a reading module A: the factory reads the reader of the resource by a start method;
a reading module B: the read shared index reader processes the process and controller tasks.
The data updating module specifically comprises an updating module, a calling module and a starting module:
an updating module: the controller processes the queue data at intervals and updates the metadata to the index cache;
a calling module: calling a queue method of a shared index reader and distributing a notice to a shared process;
a starting module: the timing processing logic of the reflector is initiated.
The beneficial effects of the invention are as follows: the invention discloses a method and a system for realizing a cloud native application controller, which can effectively improve the development efficiency of application, reduce the operation and maintenance cost and perform declarative management on application resources;
meanwhile, the method is applied to the wave cloud, and various services of the wave cloud are organized and managed in an audible mode, so that the wave cloud service development efficiency can be improved, the high application availability is improved, the operation and maintenance cost is further reduced, and the operation and maintenance efficiency of cloud application is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of the method of the present invention; FIG. 2 is a schematic diagram of the system of the present invention; FIG. 3 is a schematic structural diagram of a distributed technology architecture; fig. 4 is a schematic diagram of an embodiment of the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The first embodiment is as follows:
an implementation method of a cloud native application controller includes the following specific steps:
s1, acquiring and caching monitoring resource information from an Api server by using a controller periodically;
s2, utilizing the controller to perform event processing on the acquired resources;
s3, processing the asynchronous resources;
s4, processing and updating the queue data by using the controller;
s5, calling a processing method for processing the event by the process monitor;
s6, executing the operations of the List and the Watch, calling a resource set to realize and putting the inquired number into a queue;
s7, calling a security thread to cache all metadata, and defaulting to take a namespace as an index function;
s8, operating the metadata according to a json format by using a K8S client tool;
the cloud native application controller needs to support functions of event queues, synchronous cache and the like, and obtains a function of monitoring resource information from the Api server periodically by using the controller according to the step S1, and stores the function into a local cache, and performs event processing on the obtained resource, for example, adding a resource, modifying a resource, deleting a resource and the like, and performs corresponding actions;
then, according to S2, the controller is used for carrying out event processing on the acquired resources, according to S3, asynchronous resources are processed, and according to S4, the controller is used for carrying out processing and updating on queue data;
after the notification is acquired, calling a processing method for processing the event by the process monitor according to S5, then executing operations of List and Watch by the reflector every 1 second according to S6, calling a resource set to realize the processing, and putting the inquired number into a queue;
caching all metadata of K8S according to S7, calling a security thread to realize caching, defaulting to take a name space as an index function, and finally operating the metadata according to a json format by utilizing a K8S client tool according to S8;
further, the step S2 of performing event processing on the acquired resource by using the controller includes:
s201, acquiring a reading object through a defined data sharing factory;
s202, adding an event processor to process operation events;
s203 defines a resource queue for asynchronously processing resource events;
defining a shared data factory according to S201, acquiring a read object of a resource through the factory, adding an event processor for processing an operation event to the resource according to S202, and defining a queue of the resource according to S203 for the resource event of an asynchronous fox;
further, the step S3 of processing the asynchronous resource specifically includes:
s301, defining a work queue for supporting resource asynchronous processing;
s302, the factory reads the reader of the resource by a start method;
s303, the shared index reader which is read processes the tasks of the process and the controller;
defining a work queue according to S301 for supporting asynchronous processing of resources, reading a resource reader by a reading factory of all resources of K8S according to an S302start method, and processing a process and a controller task by the read shared index reader according to S303 by the resource reader loaded in the factory;
still further, the step S4 of processing and updating the queue data by using the controller includes:
s401, the controller processes the queue data at intervals and updates the metadata to an index cache;
s402, calling a queue method of a shared index reader and distributing a notice to a shared process;
s403, starting timing processing logic of the reflector;
the controller processes the queue data every 1 second according to S401, updates the metadata to the index cache, calls a queue method of the shared index reader according to S402, allocates a notification to the shared process, and starts the timing processing logic of the reflector according to S403.
Example two:
the system specifically comprises a resource acquisition module, an event processing module, a resource processing module, a data updating module, a data processing module, a resource integration module, a data indexing module and a data integration module:
a resource acquisition module: periodically acquiring and caching monitoring resource information from an Api server by using a controller;
an event processing module: utilizing the controller to perform event processing on the acquired resources;
the resource processing module: processing the asynchronous resources;
a data updating module: processing and updating the queue data by using a controller;
a data processing module: calling a processing method for processing events by a process monitor;
resource integration module: executing operations of List and Watch, calling a resource set to realize and putting the inquired number into a queue;
a data indexing module: calling a security thread to cache all metadata, and defaulting to take a name space as an index function;
a data collection module: operating the metadata in a json format by using a K8S client tool;
the cloud native application controller needs to support functions of event queues, synchronous cache and the like, and periodically acquires a function of monitoring resource information from the Api server through the resource acquisition module by using the controller, stores the function into a local cache, and performs event processing on the acquired resource, such as adding a resource, modifying the resource, deleting the resource and the like, to perform corresponding actions;
then, the event processing module utilizes the controller to process the events of the acquired resources, the resource processing module processes the asynchronous resources, and the data updating module utilizes the controller to process and update the queue data;
after the notification is obtained, the data processing module calls a processing method for processing events by the process monitor, then the reflector executes the operations of List and Watch once every 1 second through the resource collection module, calls the resource collection to realize the event processing, and puts the inquired number into a queue;
then, the data indexing module caches all metadata of K8S, a safety thread is called to realize caching, a naming space is used as an index function in a default mode, and finally the data aggregation module operates the metadata according to a json format by utilizing a K8S client tool;
further, the event processing module specifically includes an acquisition module, an add-on module, and a distribution module:
an acquisition module: acquiring a reading object through a defined data sharing factory;
the module is added: adding an event processor to process the operation event;
a distribution module: defining a resource queue for asynchronously processing resource events;
further, the resource processing module specifically includes a definition module, a reading module a, and a reading module B:
a definition module: defining a work queue for supporting resource asynchronous processing;
reading the module A: a factory reads a reader of resources by a start method;
a reading module B: the read shared index reader processes the process and controller tasks.
Still further, the data updating module specifically includes an updating module, a calling module and a starting module:
an updating module: the controller processes the queue data at intervals and updates the metadata to the index cache;
a calling module: calling a queue method of a shared index reader and distributing a notice to a shared process;
a starting module: initiating timing processing logic of the reflector;
remarks are made to some of the operations therein:
and (3) start: starting the method;
list: a view resource list method;
watch: monitoring a resource change method;
json: javascript object identification method.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (8)
1. A method for realizing a cloud native application controller is characterized by comprising the following specific steps:
s1, acquiring and caching monitoring resource information from an Api server by using a controller periodically;
s2, utilizing the controller to perform event processing on the acquired resources;
s3, processing the asynchronous resources;
s4, processing and updating the queue data by using the controller;
s5, calling a processing method for processing the event by the process monitor;
s6, executing the operations of the List and the Watch, calling a resource set to realize and putting the inquired number into a queue;
s7, calling a security thread to cache all metadata, and defaulting to take a name space as an index function;
s8, operating the metadata in a json format by utilizing the K8S client tool.
2. The method as claimed in claim 1, wherein the step S2 of processing the event of the acquired resource by using the controller comprises:
s201, acquiring a reading object through a defined data sharing factory;
s202, adding an event processor to process operation events;
s203 defines a resource queue for asynchronously processing resource events.
3. The method as claimed in claim 2, wherein the step S3 of processing the asynchronous resource comprises:
s301, defining a work queue for supporting resource asynchronous processing;
s302, the factory reads the reader of the resource by a start method;
the shared index reader read in S303 processes the process and the controller task.
4. The method as claimed in claim 3, wherein the step S4 of processing and updating the queue data by the controller includes:
s401, the controller processes the queue data at intervals and updates the metadata to an index cache;
s402, calling a queue method of a shared index reader and distributing a notice to a shared process;
s403 starts the timing processing logic of the reflector.
5. A realization system of a cloud native application controller is characterized by specifically comprising a resource acquisition module, an event processing module, a resource processing module, a data updating module, a data processing module, a resource integration module, a data indexing module and a data integration module:
a resource acquisition module: acquiring and caching monitoring resource information from an Api server by using a controller periodically;
an event processing module: utilizing the controller to perform event processing on the acquired resources;
the resource processing module: processing the asynchronous resources;
a data updating module: processing and updating the queue data by using a controller;
a data processing module: calling a processing method for processing events by a process monitor;
resource integration module: executing operations of List and Watch, calling a resource set to realize and putting the inquired number into a queue;
a data indexing module: calling a security thread to cache all metadata, and defaulting to take a name space as an index function;
a data collection module: the metadata is manipulated in json format using the K8S client tool.
6. The system according to claim 5, wherein the event processing module specifically comprises an acquisition module, an add-up module, and an allocation module:
an acquisition module: acquiring a reading object through a defined data sharing factory;
adding a module: adding an event processor to process the operation event;
a distribution module: a resource queue is defined for asynchronously processing resource events.
7. The system according to claim 6, wherein said resource handling module comprises in particular a definition module, a reading module a and a reading module B:
a definition module: defining a work queue for supporting asynchronous processing of resources;
reading the module A: the factory reads the reader of the resource by a start method;
a reading module B: the read shared index reader processes the process and controller tasks.
8. The system of claim 7, wherein the data update module specifically comprises an update module, a call module, and a start module:
an update module: the controller processes the queue data at intervals and updates the metadata to the index cache;
a calling module: calling a queue method of a shared index reader and distributing a notice to a shared process;
a starting module: the timing processing logic of the reflector is initiated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110060383.1A CN112685458B (en) | 2021-01-18 | 2021-01-18 | Method and system for realizing cloud native application controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110060383.1A CN112685458B (en) | 2021-01-18 | 2021-01-18 | Method and system for realizing cloud native application controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112685458A CN112685458A (en) | 2021-04-20 |
CN112685458B true CN112685458B (en) | 2023-01-20 |
Family
ID=75458473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110060383.1A Active CN112685458B (en) | 2021-01-18 | 2021-01-18 | Method and system for realizing cloud native application controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112685458B (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067828B (en) * | 2018-06-22 | 2022-01-04 | 杭州才云科技有限公司 | Kubernetes and OpenStack container-based cloud platform multi-cluster construction method, medium and equipment |
US11190619B2 (en) * | 2019-03-21 | 2021-11-30 | International Business Machines Corporation | Generation and application of meta-policies for application deployment environments |
CN110928930B (en) * | 2020-02-10 | 2020-06-02 | 北京东方通科技股份有限公司 | Software development behavior monitoring system |
-
2021
- 2021-01-18 CN CN202110060383.1A patent/CN112685458B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112685458A (en) | 2021-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3876100A2 (en) | Method and apparatus for sharing gpu, electronic device and readable storage medium | |
CN113641457B (en) | Container creation method, device, apparatus, medium, and program product | |
CN110569250B (en) | Management method and device for analysis library of Internet of things network element | |
CN114461393A (en) | Multitask scheduling method, multitask scheduling device, electronic equipment, multitask scheduling system and automatic driving vehicle | |
CN114936173B (en) | Read-write method, device, equipment and storage medium of eMMC device | |
CN115421787A (en) | Instruction execution method, apparatus, device, system, program product, and medium | |
US20210326170A1 (en) | Method to set up and tear down cloud environments based on a schedule obtained from one or more hosted calendars | |
CN112685458B (en) | Method and system for realizing cloud native application controller | |
CN114490048A (en) | Task execution method and device, electronic equipment and computer storage medium | |
CN111290842A (en) | Task execution method and device | |
CN116010065A (en) | Distributed task scheduling method, device and equipment | |
CN112486638A (en) | Method, apparatus, device and storage medium for executing processing task | |
CN108075989B (en) | Extensible protocol-based load balancing network middleware implementation method | |
CN112416414A (en) | Micro-service architecture containerized lightweight workflow system based on state machine | |
CN113347430B (en) | Distributed scheduling device of hardware transcoding acceleration equipment and use method thereof | |
CN113377360B (en) | Task execution method, device, electronic equipment, storage medium and program product | |
CN113391821B (en) | Asymmetric multiprocessor embedded operating system | |
CN114995970A (en) | Task processing method and device, storage medium and electronic equipment | |
CN113742065A (en) | Distributed reinforcement learning method and device based on kubernets container cluster | |
CN113296913A (en) | Data processing method, device and equipment based on single cluster and storage medium | |
CN113626163A (en) | Lightweight distributed increment self-scheduling method, system, equipment and medium | |
CN107562527B (en) | Real-time task scheduling method for SMP (symmetric multi-processing) on RTOS (remote terminal operating system) | |
CN112181724A (en) | Big data disaster tolerance method and device and electronic equipment | |
CN113377489A (en) | Construction and operation method and device of remote sensing intelligent monitoring application based on cloud platform | |
CN109358970A (en) | A kind of method of cloud data center task management and task center |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |