CN115437710A - WebIDE container management method, webIDE container management apparatus, and computer storage medium - Google Patents
WebIDE container management method, webIDE container management apparatus, and computer storage medium Download PDFInfo
- Publication number
- CN115437710A CN115437710A CN202211060779.7A CN202211060779A CN115437710A CN 115437710 A CN115437710 A CN 115437710A CN 202211060779 A CN202211060779 A CN 202211060779A CN 115437710 A CN115437710 A CN 115437710A
- Authority
- CN
- China
- Prior art keywords
- webide
- container
- user
- server
- running
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application discloses a WebIDE container management method, a WebIDE container management device and a computer storage medium. The WebIDE container management device can receive a starting request input by a user for the WebIDE container, forwards the starting request to the WebIDE server, so that the WebIDE server can start the WebIDE container in response to the starting request and display a front-end page corresponding to the WebIDE container, and then stops the operation of the WebIDE container if the WebIDE server does not receive the input of the user on the front-end page and the WebIDE container does not have background tasks in operation, so that the occupation of the WebIDE container on server resources is eliminated, the resources occupied by the WebIDE container are released, the released resources can be used by other WebIDE containers conveniently, the utilization rate of the server resources is improved, and the efficient utilization of the server resources is ensured.
Description
Technical Field
The embodiment of the application relates to the field of code development, in particular to a WebIDE container management method, a WebIDE container management device and a computer storage medium.
Background
As telecommuting becomes more and more demanding, programmers can utilize WebIDE technology at home for code development and debugging on-line. The carrier of WebIDE technology is typically a container running on a server, which can be used by programmers for code writing and development.
The operation of the WebIDE container occupies resources of the server, including CPU processing resources, memory resources, and the like. When the programmer does not use the WebIDE container, such as when the programmer is shut down or is busy with other things but does not use the WebIDE container for a long time, the WebIDE container still continues to occupy the resources of the server at the moment, which causes waste of server resources, the server does not have sufficient resources for more WebIDE containers, and the server resources cannot be efficiently utilized.
Disclosure of Invention
The embodiment of the application provides a WebIDE container management method, a WebIDE container management device and a computer storage medium, which are used for stopping the operation of a WebIDE container when the WebIDE container is idle so as to release occupied server resources.
The first aspect of the embodiments of the present application provides a WebIDE container management method, which is applied to a WebIDE container management device in an online integrated development environment, where the WebIDE container management device is in communication connection with a WebIDE server; the method comprises the following steps:
receiving a starting request for the WebIDE container input by a user, and forwarding the starting request to the WebIDE server so that the WebIDE server can start the WebIDE container in response to the starting request;
displaying a front-end page corresponding to the WebIDE container, wherein the front-end page is used for providing a window for code writing;
and if the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stopping the running of the WebIDE container.
A second aspect of the embodiments of the present application provides a WebIDE container management apparatus, where the WebIDE container management apparatus is in communication connection with a WebIDE server; the WebIDE container management apparatus includes:
the WebIDE server is used for receiving a WebIDE container starting request input by a user and forwarding the starting request to the WebIDE server so that the WebIDE server can respond to the starting request to start the WebIDE container;
the display unit is used for displaying a front-end page corresponding to the WebIDE container, and the front-end page is used for providing a window for code writing;
and the control unit is used for stopping the operation of the WebIDE container if the input of the user on the front-end page is not received and the WebIDE container does not have a background task in operation.
A third aspect of embodiments of the present application provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method of the foregoing first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of the first aspect.
A fifth aspect of embodiments of the present application provides a computer program product, which when run on a computer device, causes the computer device to perform the method of the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
in this embodiment, the WebIDE container management apparatus may receive a start request for the WebIDE container input by a user, and forward the start request to the WebIDE server, so that the WebIDE server starts the WebIDE container in response to the start request, and displays a front-end page corresponding to the WebIDE container, and then, if the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stops running the WebIDE container, thereby removing occupation of the WebIDE container on server resources, releasing resources occupied by the WebIDE container, so that the released resources can be used by other WebIDE containers, improving utilization rate of the server resources, and ensuring efficient utilization of the server resources.
Drawings
FIG. 1 is a schematic diagram of a network framework in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a WebIDE container management method in an embodiment of the present application;
FIG. 3 is another flowchart of the WebIDE container management method in the embodiment of the present application;
FIG. 4 is a schematic structural diagram of a WebIDE container management device in an embodiment of the present application;
fig. 5 is another schematic structural diagram of the WebIDE container management apparatus in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a WebIDE container management method, a WebIDE container management device and a computer storage medium, which are used for stopping the operation of a WebIDE container when the WebIDE container is idle so as to release occupied server resources.
Referring to fig. 1, the network framework in the embodiment of the present application includes:
a service server 100 and a terminal cluster; the terminal cluster may include: terminal device 200a, terminal device 200b, terminal device 200c, \8230;, terminal device 200n, etc.
The service server 100 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud database, a cloud service, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The terminal device (including terminal device 200a, terminal device 200b, terminal device 200c, \8230;, terminal device 200 n) may be a smart terminal such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a palm computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart bracelet, etc.), a smart computer, a smart car, etc.
The service server 100 may establish a communication connection with each terminal device in the terminal cluster, and a communication connection may also be established between each terminal device in the terminal cluster. In other words, the service server 100 may establish a communication connection with each of the terminal devices 200a, 200b, 200c, \8230, 200n, for example, the terminal device 200a and the service server 100. A communication connection may be established between the terminal device 200a and the terminal device 200b, and a communication connection may also be established between the terminal device 200a and the terminal device 200 c. The communication connection is not limited to a connection manner, and may be directly or indirectly connected through a wired communication manner, or may be directly or indirectly connected through a wireless communication manner, and the like, and may be determined according to an actual application scenario, and the present application is not limited herein.
It should be understood that each terminal device in the terminal cluster shown in fig. 1 may be installed with an application client, and when the application client runs in each terminal device, the application client may perform data interaction with the service server 100 respectively, so that the service server 100 may receive service data from each terminal device (for example, financial management data uploaded by a user through the terminal device). The application client may be an application client having a function of displaying data information such as text, images, audio, and video, such as a financial management application, an enterprise transaction management application, a social application, an instant messaging application, a live broadcast application, a game application, a short video application, a music application, a shopping application, a novel application, and a payment application, and may be specifically determined according to requirements of an actual application scene, which is not limited herein. The application client may be an independent client, or may be an embedded sub-client integrated in a certain client (for example, a financial management client, an enterprise transaction management client, or the like), which may be specifically determined according to an actual application scenario, and is not limited herein.
The service server 100 can serve as a server to provide one or more service functions to the application client of each terminal device shown in fig. 1. When the service end provides the service function service for the client, the service end provides an interface so that the client can call the interface and use the service function service corresponding to the interface, where the interface is of a wide variety, such as an account login interface, an authority authentication interface, an information storage interface, and the like. The client can initiate an interface request to call an interface provided by the server, for example, initiate an interface request, the interface request carries account login information such as a user name and a password, and the server allows the client user to log in the client based on the account login information after receiving the interface request.
In the related scheme, a user can log in the WebIDE server by using a browser client on the terminal device, the browser client can display a front-end page of WebIDE to the user, the user can send a request for creating a WebIDE container to the WebIDE server by the front-end page, the WebIDE server responds to the request to create the WebIDE container, and the user can write codes and develop codes by using the WebIDE container on the front-end page.
However, when the user does not use the WebIDE container for a long time, the WebIDE container still remains in the running state when the user leaves the work post or is busy doing other things, and still occupies resources of the server, such as CPU processing resources or memory resources of the server, which causes waste of server resources, and causes the server to be unable to use more resources to other clients that really need to use the WebIDE container, and causes the server resources to be unable to be efficiently utilized.
In order to solve the above technical problem, a WebIDE container management method according to an embodiment of the present application is particularly proposed. The WebIDE container management method in the embodiment of the present application will be described below with reference to the network framework of fig. 1:
referring to fig. 2, an embodiment of a WebIDE container management method in the embodiment of the present application includes:
201. receiving a starting request for the WebIDE container input by a user, and forwarding the starting request to the WebIDE server so that the WebIDE server can start the WebIDE container in response to the starting request;
the method of the present embodiment is applicable to a WebIDE container management apparatus in an online integrated development environment, which may be a service server 100 or each terminal device in a network framework as shown in fig. 1. The user can log in a front-end page of the WebIDE container management device on the terminal device through the browser, and inputs a starting request for the WebIDE container on the front-end page after the login is completed so as to request for starting the WebIDE container. The WebIDE container management device responds to the starting request, the starting request is forwarded to the WebIDE server through the communication connection established with the WebIDE server, and the WebIDE server starts the corresponding WebIDE container, so that a user can use the WebIDE container to write and develop codes on line in the WebIDE container management device.
202. Displaying a front-end page corresponding to the WebIDE container, wherein the front-end page is used for providing a window for code writing;
in order to facilitate a user to use the WebIDE container to write codes in a terminal device, the WebIDE container management device can display a front-end page corresponding to the WebIDE container, the front-end page is used for providing a window for writing the codes, namely, the user can write the codes in the front-end page, the codes written in the front-end page by the user can be transmitted to a rear-end platform of the WebIDE container, and the rear-end platform of the WebIDE container runs the codes written by the user.
203. If the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stopping the running of the WebIDE container;
in the process of writing codes by a user, the WebIDE container is not used for a long time due to the fact that the user is busy in other things midway or has gone off work, and the WebIDE container still occupies resources of the WebIDE server, so that if the user input on a front-end page is not received and the WebIDE container does not have background tasks running, the running of the WebIDE container is stopped, the occupation of the WebIDE container on the server resources is eliminated, the resources occupied by the WebIDE container are released, the resources occupied by the WebIDE container can be conveniently used by other WebIDE containers, the utilization rate of the server resources is improved, and efficient utilization of the server resources is guaranteed.
In this embodiment, the WebIDE container management apparatus may receive a start request for the WebIDE container input by a user, and forward the start request to the WebIDE server, so that the WebIDE server starts the WebIDE container in response to the start request, and displays a front-end page corresponding to the WebIDE container, and then, if the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stops running the WebIDE container, thereby removing occupation of the WebIDE container on server resources, releasing resources occupied by the WebIDE container, so that the released resources can be used by other WebIDE containers, improving utilization rate of the server resources, and ensuring efficient utilization of the server resources.
The embodiments of the present application will be described in further detail below on the basis of the aforementioned embodiment shown in fig. 2. Referring to fig. 3, another embodiment of the WebIDE container management method in the embodiment of the present application includes:
301. receiving a starting request for the WebIDE container input by a user, and forwarding the starting request to the WebIDE server so that the WebIDE server can start the WebIDE container in response to the starting request;
the WebIDE is an online integrated development environment for programming developers, the programming developers can immediately develop the WebIDE without locally installing the development environment by opening a browser, and meanwhile, breakpoint debugging, version management, team development and the like are supported. In this embodiment, the WebIDE container management apparatus may be configured as a service platform, and when a user needs to perform code development in the WebIDE, that is, needs to execute a code development task in the WebIDE, the WebIDE container management apparatus serving as the service platform may be logged in at a browser client of the terminal device for the code development task, and a start request for the WebIDE container is input to the WebIDE container management apparatus, and the WebIDE container management apparatus forwards the start request to the WebIDE server, and the server may open a WebIDE container for executing the code development task for the user in response to the start request after receiving the start request.
The WebIDE container can be managed and deployed by using a container orchestration system Kubernates, the Kubernates is an open-source application which can be used for managing containerization on a plurality of hosts in a cloud platform, the goal of the Kubernates is to enable the containerization application to be deployed simply and efficiently, and the Kubernates provides a mechanism for deploying, planning, updating and maintaining the application, so that one or more functional modules in the Kubernates can be used for starting or stopping the WebIDE container.
The WebIDE container may be any container of WebIDE products based on WebIDE technology, such as Theia container, code-server container, etc., and the specific type of WebIDE container is not limited in this embodiment.
In one embodiment, the WebIDE container that is launched may associate a user identification (user ID) of the user, and create a container identification for the WebIDE container to facilitate identifying the WebIDE container from the unique container identification and to facilitate determining a user using the WebIDE container from the user identification associated with the WebIDE container.
302. Displaying a front-end page corresponding to the WebIDE container, wherein the front-end page is used for providing a window for code writing;
the WebIDE container management device can display a browser page on a browser client of a user, and display a front-end page corresponding to the WebIDE container on the browser page, wherein the front-end page is used as a code writing window, and the user can write codes on the front-end page.
303. Intercepting communication data between a front-end page and a back-end platform of the WebIDE container by using the management plug-in, and receiving a judgment result of judging whether a background task runs in the WebIDE container or not by the management plug-in according to the communication data;
different from the related scheme, in the embodiment, the management plug-in corresponding to each WebIDE container can be configured, the management plug-in has data interception and data processing functions, the management plug-in can be used for intercepting communication data between a front-end page and a back-end platform of the WebIDE container, judging whether a background task runs in the WebIDE container or not according to the communication data, and sending a judgment result to the WebIDE container management device. The WebIDE container management means may determine whether or not the operation of the WebIDE container needs to be stopped in the subsequent step based on this determination result.
The front-end page of the WebIDE container and the back-end platform can perform data interaction based on a WebSocket communication protocol, so that the communication data intercepted by the management plug-in between the front-end page of the WebIDE container and the back-end platform can be WebSocket communication data. The management plug-in judges whether the WebIDE container has a background task to run according to the WebSocket communication data in a mode that whether the WebIDE container has the background task to run is judged, and if the WebSocket communication data is not empty, the WebIDE container is determined to have the background task to run; and if the WebIDE container is empty, determining that no background task is running in the WebIDE container.
304. If the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stopping the running of the WebIDE container;
the WebIDE container management device can analyze a judgment result sent by the management plug-in and judges whether the WebIDE container has a background task running according to communication data between a front-end page and a rear-end platform of the WebIDE container, and when a user does not input any operation on the front-end page of the WebIDE container and the judgment result shows that the WebIDE container does not have the background task running, the WebIDE container is stopped from running; and when the user does not input any operation on the front-end page of the WebIDE container and the judgment result shows that the WebIDE container has the background task running, the WebIDE container is kept running.
In one embodiment, a timer may be set to time the running of the background task of the WebIDE container, that is, when the management plug-in determines that the WebIDE container has the background task running, the timer is set, and when the countdown of the timer is finished, if the WebIDE container still has the background task running, the timer is reset until the countdown of the timer is finished and the WebIDE container has no background task running, the timer is stopped from being set. When the countdown of the timer is finished and no background task of the WebIDE container runs, the management plug-in sends a stop request for the WebIDE container to the WebIDE container management device, and the WebIDE container management device responds to the stop request and stops the running of the WebIDE container.
In another embodiment, when the user closes the browser or closes the browser page displaying the front page of the WebIDE container, indicating that the user has exited the operation of writing code in the WebIDE container, the WebIDE container is not already in use, and the running of the WebIDE container should be stopped to release the resources it occupies. For this purpose, the management plug-in can be used for intercepting a first event that a user closes a browser page displaying a front-end page of the WebIDE container and a second event that the user closes the browser, the management plug-in sends a stop request for the WebIDE container to the WebIDE container management device based on the intercepted first event or second event, and the WebIDE container management device stops the operation of the WebIDE container in response to the stop request of the management plug-in.
In another embodiment, the management plug-in may periodically collect the related information of the WebIDE container and send the related information to the WebIDE container management device so as to update the information of the WebIDE container, that is, the management plug-in may call an API interface of the WebIDE container management device to send heartbeat data to the WebIDE container management device, where the heartbeat data includes the related information of the WebIDE container, and the WebIDE container management device parses the heartbeat data to obtain the user identifier corresponding to the WebIDE container, the container identifier of the WebIDE container, and the last time of use of the WebIDE container. The WebIDE container is used for storing the user identification corresponding to the WebIDE container, and the WebIDE container is used for storing the user identification corresponding to the WebIDE container.
When the WebIDE container management device receives the heartbeat data, the user identification corresponding to the WebIDE container, the container identification of the WebIDE container and the latest time of using the WebIDE container, which are obtained by analyzing the heartbeat data, can be stored in the storage module, so that the running state of the WebIDE container can be managed according to the information of the WebIDE container. The storage module may be a cache or a persistent storage module, such as a Redis cache, a storage hard disk or a database, and the like.
It can be understood that, because the heartbeat data is periodically collected and sent to the WebIDE container management device, the heartbeat data has real-time performance, and each heartbeat data reflects the latest state of the WebIDE container at the sending time, when the storage module stores the information of a certain WebIDE container, if the heartbeat data is received later, the information of the WebIDE container stored in the storage module is updated according to the newly received heartbeat data, such as the latest time of using the WebIDE container; if the storage module does not store the related information of a certain WebIDE container, and the newly received heartbeat data is the related information of the WebIDE container, the related information of the WebIDE container is created in the storage module, namely the related information of the WebIDE container is stored in the storage module.
For example, the value format of the key can be designed as heartbeat-work- { ws _ id }, where a prefix "heartbeat-work-" indicates heartbeat data and the type of information carried by the heartbeat data is related information about a workspace (work), and the related information about the workspace (work) is related information about the WebIDE container; the suffix "ws _ id" denotes the identification of the corresponding workspace, i.e. the container identification of the corresponding WebIDE container.
And the specific value of the value can be designed as follows:
object: {
AutomaticSleep:2h
Timeout:xx
UID: "user ID"
}
Wherein, the AutomaticSleep represents the time length from the last time of use to the time of being stopped of the WebIDE container, such as 2 hours shown above; timeout, which represents the point in time at which the WebIDE container is stopped running without being used. For example, if the last time the WebIDE container was used is 17 00, then the Timeout time is 19. And as for the UID, the user identification corresponding to the WebIDE container is represented.
Therefore, the related information of the WebIDE container included in the heartbeat data can be stored in the storage module according to the format, the information retrieval and query of each WebIDE container can be facilitated by storing the related information in the format of the key value pairs, and the information query efficiency of the WebIDE container is improved.
When the browser is closed under an abnormal condition, for example, the abnormal condition may be that a user does not manually close the browser but directly closes a terminal device (such as a computer) running the browser, or that the terminal device running the browser has no power access, such as power failure, power damage, and the like, at this time, the WebIDE container management device may scan a user identifier, a container identifier, and a last time of use corresponding to at least one WebIDE container in the storage module to determine a target WebIDE container whose time from the last time of use to the current time exceeds a preset time. And when the target WebIDE container is found, stopping the running of the target WebIDE container.
For example, if the preset time duration is 2 hours, the last time a certain WebIDE container was used is 17, 00, and the current time is already 19, 00, 17.
In this embodiment, the WebIDE server may be configured with a container controller for managing the WebIDE container, and this container controller may be used as a control program kubernets Operator in the container arrangement system Kubernates for managing the WebIDE container, so that this container controller Operator may be called to stop the operation of the WebIDE container when the operation of the WebIDE container is stopped.
For example, when the operation of the target WebIDE container needs to be stopped, the container controller Operator may be called, and a stop instruction for the target WebIDE container is sent to the container controller Operator, where the stop instruction carries the user identifier corresponding to the target WebIDE container and the container identifier of the target WebIDE container, and under the instruction of the stop instruction, the container controller Operator finds the target WebIDE container in the cache according to the container identifier in the stop instruction and the corresponding user identifier, and stops the operation of the target WebIDE container.
As described above with respect to the WebIDE container management method in the embodiment of the present application, the WebIDE container management apparatus in the embodiment of the present application is described below with reference to fig. 4, and an embodiment of the WebIDE container management apparatus in the embodiment of the present application includes:
the WebIDE container management device is in communication connection with a WebIDE server; the WebIDE container management apparatus includes:
a receiving unit 401, configured to receive a start request for a WebIDE container input by a user, and forward the start request to the WebIDE server, so that the WebIDE server starts the WebIDE container in response to the start request;
a display unit 402, configured to display a front-end page corresponding to the WebIDE container, where the front-end page is used to provide a window for code writing;
a control unit 403, configured to stop running the WebIDE container if no input from the user on the front-end page is received and the WebIDE container has no background task running.
In a preferred implementation manner of this embodiment, the WebIDE container is configured with a management plug-in;
the receiving unit 401 is further configured to intercept, by using the management plugin, communication data between a front-end page of the WebIDE container and a backend platform, and receive a determination result that the management plugin determines whether a background task is running in the WebIDE container according to the communication data;
the control unit 403 is specifically configured to stop the operation of the WebIDE container if the input of the user on the front-end page is not received and the determination result indicates that the WebIDE container does not have a background task in operation; and if the input of the user on the front-end page is not received and the judgment result shows that the WebIDE container has a background task running, maintaining the running of the WebIDE container.
In a preferred implementation manner of this embodiment, the control unit 403 is specifically configured to set a timer when the determination result indicates that the WebIDE container has a background task running, and reset the timer when the countdown of the timer is finished and the WebIDE container still has the background task running, until the countdown of the timer is finished and no background task runs in the WebIDE container, stop setting the timer; and when the countdown of the timer is finished and no background task of the WebIDE container runs, stopping the running of the WebIDE container.
In a preferred implementation manner of this embodiment, the WebIDE container is configured with a management plug-in, where the management plug-in is configured to intercept a first event that a user closes the browser page or a second event that the user closes the browser when the user closes the browser page or the user closes the browser;
the receiving unit 401 is further configured to receive a stop request for the WebIDE container sent by the management plugin based on the intercepted first event or second event;
the control unit 403 is specifically configured to stop the operation of the WebIDE container in response to the stop request.
In a preferred implementation manner of this embodiment, the WebIDE container is configured with a management plug-in;
the receiving unit 401 is further configured to receive heartbeat data sent by the management plug-in, where the heartbeat data is used to represent relevant information of the WebIDE container;
the WebIDE container management apparatus further includes:
a storage unit 404, configured to parse the heartbeat data to obtain a user identifier corresponding to the WebIDE container, a container identifier of the WebIDE container, and a time when the WebIDE container is used last time; and storing the user identification corresponding to the WebIDE container, the container identification of the WebIDE container and the last use time of the WebIDE container in a storage module.
In a preferred implementation manner of this embodiment, after receiving the heartbeat data sent by the management plug-in, the control unit 403 is further configured to scan, when the user closes the browser, a user identifier, a container identifier, and the last time of use corresponding to at least one WebIDE container in the storage module, so as to determine a target WebIDE container whose duration from the last time of use to the current time exceeds a preset duration; and stopping the running of the target WebIDE container.
In a preferred implementation manner of this embodiment, the WebIDE server is configured with a container controller for managing the WebIDE container;
the control unit 403 is specifically configured to invoke the container controller, and send a stop instruction for the target WebIDE container to the container controller, where the stop instruction carries a user identifier corresponding to the target WebIDE container and a container identifier of the target WebIDE container, so that the container controller stops the operation of the target WebIDE container according to the container identifier of the target WebIDE container and the corresponding user identifier under the instruction of the stop instruction.
In this embodiment, operations performed by each unit in the WebIDE container management apparatus are similar to those described in the embodiments shown in fig. 2 to fig. 3, and are not described again here.
In this embodiment, the WebIDE container management apparatus may receive a start request for the WebIDE container input by a user, and forward the start request to the WebIDE server, so that the WebIDE server starts the WebIDE container in response to the start request, and displays a front-end page corresponding to the WebIDE container, and then, if the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stops running of the WebIDE container, thereby removing occupation of the WebIDE container on server resources, releasing resources occupied by the WebIDE container, so that the released resources can be used by other WebIDE containers, improving utilization rate of the server resources, and ensuring efficient utilization of the server resources.
Referring to fig. 5, the WebIDE container management apparatus in this embodiment of the present application is described below, where an embodiment of the WebIDE container management apparatus in this embodiment of the present application includes:
the WebIDE container management apparatus 500 may include one or more Central Processing Units (CPUs) 501 and a memory 505, where one or more applications or data are stored in the memory 505.
The WebIDE container management device 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input-output interfaces 504, and/or one or more operating systems, such as Windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
The central processing unit 501 may perform the operations performed by the WebIDE container management apparatus in the embodiments shown in fig. 2 to fig. 3, which are not described herein again.
An embodiment of the present application further provides a computer storage medium, where one embodiment includes: the computer storage medium has instructions stored therein, which when executed on a computer, cause the computer to perform the operations performed by the WebIDE container management apparatus in the embodiments illustrated in fig. 2-3.
An embodiment of the present application further provides a computer program product, where an embodiment includes: the computer program product, when executed on a computer device, causes the computer device to perform the operations performed by the WebIDE container management means in the embodiments illustrated in fig. 2-3 and described above.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Claims (10)
1. The WebIDE container management method is characterized by being applied to a WebIDE container management device in an online integrated development environment, wherein the WebIDE container management device is in communication connection with a WebIDE server; the method comprises the following steps:
receiving a starting request for the WebIDE container input by a user, and forwarding the starting request to the WebIDE server so that the WebIDE server can start the WebIDE container in response to the starting request;
displaying a front-end page corresponding to the WebIDE container, wherein the front-end page is used for providing a window for code writing;
and if the input of the user on the front-end page is not received and the WebIDE container does not have a background task running, stopping the running of the WebIDE container.
2. The method of claim 1, wherein the WebIDE container is configured with a management plug-in; the method further comprises the following steps:
intercepting communication data between a front-end page and a back-end platform of the WebIDE container by using the management plug-in, and receiving a judgment result of judging whether a background task runs in the WebIDE container or not by the management plug-in according to the communication data;
the stopping the operation of the WebIDE container comprises:
if the input of the user on the front-end page is not received and the judgment result shows that the WebIDE container does not have a background task running, stopping the running of the WebIDE container;
and if the input of the user on the front-end page is not received and the judgment result shows that the WebIDE container has a background task running, maintaining the running of the WebIDE container.
3. The method of claim 2, wherein stopping the WebIDE container if no user input is received at the front-end page and the determination result indicates that no background task is running for the WebIDE container, comprises:
when the judgment result shows that the WebIDE container has the background task running, setting a timer, and resetting the timer when the countdown of the timer is finished and the WebIDE container still has the background task running until the countdown of the timer is finished and the WebIDE container does not have the background task running, and stopping setting the timer;
and when the countdown of the timer is finished and the WebIDE container does not have a background task running, stopping the running of the WebIDE container.
4. The method according to claim 1, wherein the WebIDE container is configured with an administration plug-in for intercepting a first event that a user closes the browser page or intercepting a second event that a user closes a browser when the user closes the browser page or the user closes the browser;
the method further comprises the following steps:
receiving a stop request for the WebIDE container sent by the management plugin based on the intercepted first event or second event;
in response to the stop request, stopping operation of the WebIDE container.
5. The method of claim 1, wherein the WebIDE container is configured with a management plug-in; the method further comprises the following steps:
receiving heartbeat data sent by the management plug-in, wherein the heartbeat data is used for representing relevant information of the WebIDE container;
analyzing the heartbeat data to obtain a user identification corresponding to the WebIDE container, a container identification of the WebIDE container and the latest time of using the WebIDE container;
and storing the user identification corresponding to the WebIDE container, the container identification of the WebIDE container and the latest use time of the WebIDE container to a storage module.
6. The method of claim 5, wherein after receiving heartbeat data sent by the management plugin, the method further comprises:
when a user closes a browser, scanning a user identifier, a container identifier and the last use time corresponding to at least one WebIDE container in the storage module to determine a target WebIDE container with the time length from the last use time to the current time exceeding a preset time length;
and stopping the running of the target WebIDE container.
7. The method of any of claims 1-6, wherein the WebIDE server is configured with a container controller for managing the WebIDE container;
the stopping the running of the target WebIDE container comprises the following steps:
calling the container controller, and sending a stop instruction for the target WebIDE container to the container controller, wherein the stop instruction carries a user identifier corresponding to the target WebIDE container and a container identifier of the target WebIDE container, so that the container controller stops the operation of the target WebIDE container according to the container identifier of the target WebIDE container and the corresponding user identifier under the instruction of the stop instruction.
8. The WebIDE container management device is characterized in that the WebIDE container management device is in communication connection with a WebIDE server; the WebIDE container management apparatus includes:
the receiving unit is used for receiving a starting request for the WebIDE container input by a user and forwarding the starting request to the WebIDE server so that the WebIDE server can respond to the starting request to start the WebIDE container;
the display unit is used for displaying a front-end page corresponding to the WebIDE container, and the front-end page is used for providing a code compiling window;
and the control unit is used for stopping the operation of the WebIDE container if the input of the user on the front-end page is not received and the WebIDE container does not have a background task in operation.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211060779.7A CN115437710A (en) | 2022-08-31 | 2022-08-31 | WebIDE container management method, webIDE container management apparatus, and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211060779.7A CN115437710A (en) | 2022-08-31 | 2022-08-31 | WebIDE container management method, webIDE container management apparatus, and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115437710A true CN115437710A (en) | 2022-12-06 |
Family
ID=84244937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211060779.7A Pending CN115437710A (en) | 2022-08-31 | 2022-08-31 | WebIDE container management method, webIDE container management apparatus, and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115437710A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024183548A1 (en) * | 2023-03-06 | 2024-09-12 | 华为云计算技术有限公司 | Webide instance management method, apparatus and system |
-
2022
- 2022-08-31 CN CN202211060779.7A patent/CN115437710A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024183548A1 (en) * | 2023-03-06 | 2024-09-12 | 华为云计算技术有限公司 | Webide instance management method, apparatus and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10277697B2 (en) | Method and system for pushing web application message | |
US9015315B2 (en) | Identification and monitoring of distributed business transactions | |
US9117019B2 (en) | Debugging remote software applications across WAN connections | |
US20120117139A1 (en) | Method and apparatus for obtaining feedback from a device | |
CN109672580B (en) | Full link monitoring method, device, terminal equipment and storage medium | |
US20160226728A1 (en) | Automatic capture of detailed analysis information for web application outliers with very low overhead | |
CN111182065A (en) | Message processing method and device based on MQTT protocol and computer equipment | |
US10067862B2 (en) | Tracking asynchronous entry points for an application | |
CN113626882A (en) | Method, device and medium for generating equipment identifier | |
CN112769876B (en) | Method, device, equipment and medium for acquiring equipment channel information | |
CN115437710A (en) | WebIDE container management method, webIDE container management apparatus, and computer storage medium | |
CN111294288A (en) | Traffic identification method and device, application program interface gateway and storage medium | |
CN110727523A (en) | Service request processing method, processing device and readable storage medium | |
CN109218338B (en) | Information processing system, method and device | |
CN113821254A (en) | Interface data processing method, device, storage medium and equipment | |
US20170034030A1 (en) | Monitoring single content page application transitions | |
CN112416698B (en) | Expansion method and device of monitoring system, storage medium and electronic equipment | |
CN109189652A (en) | A kind of acquisition method and system of close network terminal behavior data | |
CN112491940B (en) | Request forwarding method and device of proxy server, storage medium and electronic equipment | |
CN109218286B (en) | Method and device for realizing agent-free EDR (enhanced data Rate) in virtualization environment | |
CN110893616B (en) | Remote control method and device, computer equipment and storage medium | |
CN111935092A (en) | Information interaction method and device based on third-party application and electronic equipment | |
US12020039B2 (en) | Compute instance warmup operations | |
CN109101253B (en) | Management method and device for host in cloud computing system | |
CN113656378A (en) | Server management method, device and medium |
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 |