CN109783197A - Dispatching method and device for program runtime environment - Google Patents
Dispatching method and device for program runtime environment Download PDFInfo
- Publication number
- CN109783197A CN109783197A CN201910049841.4A CN201910049841A CN109783197A CN 109783197 A CN109783197 A CN 109783197A CN 201910049841 A CN201910049841 A CN 201910049841A CN 109783197 A CN109783197 A CN 109783197A
- Authority
- CN
- China
- Prior art keywords
- run
- program
- environment
- runtime environment
- container
- 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
Abstract
The embodiment of the present application discloses the dispatching method and device for program runtime environment.One specific embodiment of this method includes: to receive the operation request for the program to be run that client is sent;Environment when object run needed for determining the program wait run;The operation request is sent to the container of environment when can provide object run, in the above-described container based on the object run when environment operation program to be run.The embodiment can simplify the exploitation and maintenance difficulties of runtime environment.The processing speed of runtime environment exception can also be improved, to improve the stability of cloud computing service.
Description
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field, more particularly, to journey
The dispatching method and device of environment when sort run.
Background technique
In the cloud service epoch, the user program code of oneself editor can be stored in Cloud Server by network by user
In, without user program code is stored in local hard drive space.On the one hand the load of local computer can be reduced,
It on the other hand can be to avoid the phenomenon that data is lost because caused by damaging local hard drive.In addition, Cloud Server can also be use
Family program code provides program runtime environment so that user program code is run in Cloud Server.
Above-mentioned runtime environment may include basic environment (such as library function needed for operation user program code), operation
Operation logic required for user program code (such as the logic for collecting log) etc..
In general, Cloud Server can provide the runtime environment of multilingual.These runtime environments can be located at container
In.Match for the runtime environment needs that user program code provides with development language used in user program code.
Summary of the invention
The embodiment of the present application proposes a kind of dispatching method and device for program runtime environment.
In a first aspect, the embodiment of the present application provides a kind of dispatching method for program runtime environment, this method packet
It includes: receiving the operation request for the program to be run that client is sent;Ring when object run needed for determining the program wait run
Border;Operation request is sent to the container of environment when can provide object run, environment is transported when being based on object run in a reservoir
Row program to be run.
In some embodiments, environment includes: based on to be run when object run needed for determining the program wait run
The development language of code in program, runtime environment needed for determining program to be run.
In some embodiments, process manager module is deployed in container, process manager module is to be run for monitoring
The executive condition of program environment in object run.
In some embodiments, fortune needed for process manager module, and determining program to be run are deployed in container
Environment comprises determining that in default runtime environment list ring when with the presence or absence of object run needed for the program wait run when row
Border, wherein default runtime environment list includes the identification information for all runtime environments having been provided;If so, by default fortune
Environment when runtime environment needed for the already present program wait run of environment list is determined as object run when row;If it is not, then
The instruction of environment when being used to indicate creation object run is sent to default container so that the process manager module of default container according to
Environment construction operates when instruction execution following object run: creating the program for running program to be run and runs process, benefit
With program run process from default warehouse by run time file mirror image needed for program to be run to default container to be formed
Environment when object run, and the identification information of feedback target runtime environment;It stores and is connect in default runtime environment list
The identification information of environment when the object run received.
In some embodiments, this method further include: the corresponding standard of environment is defeated when object run based on the received
The handle information of outgoing interface obtains operation pre-set programs log generated.
In some embodiments, this method further include: the information being operating abnormally in response to receiving program to be run is broken
Open and program to be run where container between communication connection, and at runtime in environment list delete target run when ring
The identification information in border;Wherein line program to be shipped is operating abnormally information and is detected by the process manager module of container and pass through communication connection
It sends.
Second aspect, the embodiment of the present application provide a kind of dispatching device for program runtime environment, the device packet
Include: receiving unit is configured to receive the operation request of the program to be run of client transmission;Determination unit is configured to
Environment when object run needed for determining the program wait run;Transmission unit is configured to run and requests to be sent to can provide
The container of environment when object run, in a reservoir based on object run when environment run program to be run.
In some embodiments, determination unit is further configured to: the exploitation based on the code in program to be run
Language, runtime environment needed for determining program to be run.
In some embodiments, process manager module is deployed in container, process manager module is to be run for monitoring
The executive condition of program environment in object run.
In some embodiments, it is deployed with process manager module in container and determination unit is further configured to: really
Environment when in surely default runtime environment list with the presence or absence of object run needed for the program wait run, wherein default operation
When environment list include all runtime environments having been provided identification information;If so, default runtime environment list has been deposited
The program wait run needed for runtime environment be determined as object run when environment;It is used if it is not, then being sent to default container
The instruction of environment when instruction creates object run, so that the process manager module of default container is according to the following target of instruction execution
Runtime environment building operation: create for run program to be run program run process, using program run process from
In default warehouse by run time file mirror image needed for the program wait run to default container to form object run when environment, and
The identification information of feedback target runtime environment;Ring when storing received object run in default runtime environment list
The identification information in border.
In some embodiments, which further includes acquiring unit, and acquiring unit is configured to: mesh based on the received
The handle information of the corresponding standard output interface of runtime environment is marked, operation pre-set programs log generated is obtained.
In some embodiments, which further includes exception processing unit, and exception processing unit is configured to: in response to connecing
Receive the information that program to be run is operating abnormally, disconnect and program to be run where container between communication connection, and
At runtime in environment list delete target runtime environment identification information;Wherein line program to be shipped is operating abnormally information by holding
The process manager module of device detects and passes through communication connection and sends.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processing
Device;Storage device is stored thereon with one or more programs, when said one or multiple programs are by said one or multiple processing
When device executes, so that said one or multiple processors realize the method as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program,
In, the method as described in implementation any in first aspect is realized when which is executed by processor.
Dispatching method and device provided by the embodiments of the present application for program runtime environment, by receiving client hair
The operation for the program to be run sent is requested, then environment when object run needed for the determining program wait run, finally will fortune
Row request is sent to the container of environment when can provide object run, and environment is run wait run when being based on object run in a reservoir
Program.So as to simplify the exploitation and maintenance difficulties of runtime environment.The processing of runtime environment exception can also be improved
Speed, to improve the stability of cloud computing service.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
It is therein that Fig. 1 is that the dispatching method for program runtime environment of one embodiment of the application can be applied to
Exemplary system architecture figure;
Fig. 2 is the flow chart according to one embodiment of the dispatching method for program runtime environment of the application;
Fig. 3 is the flow chart according to another embodiment of the dispatching method for program runtime environment of the application;
Fig. 4 is an exemplary timing diagram according to the dispatching method for program runtime environment of the present embodiment;
Fig. 5 is the structural representation according to one embodiment of the dispatching device for program runtime environment of the application
Figure;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
The dispatching method for program runtime environment that Fig. 1 shows one embodiment of the application can be applied to it
In exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, first server 104 and second
Server 105.Between terminal device 101,102,103 and first server 104 and first server 104 and each second service
It is communicated to connect between device 105,106,107 by network implementations.Here network may include various connection types, such as have
Line, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network with first server 104, to receive or send out
Send message etc..Various client applications, such as web browser applications, cloud can be installed on terminal device 101,102,103
Calculate service client application, the application of program editing class, searching class application, instant messaging tools etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard
When part, it can be the various electronic equipments with display screen and supported web page browsing, information browse, including but not limited to intelligently
Mobile phone, tablet computer, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software,
It may be mounted in above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing in it
The software or software module of Distributed Services), single software or software module also may be implemented into.It is not specifically limited herein.
First server 104 can provide various services, such as the information that receiving terminal apparatus 101,102,103 is sent,
Here information for example can be program execution request;Above- mentioned information are analyzed and processed, from second server 105,106,
107 determinations can run a second server of program indicated by PROGRAMMED REQUESTS, by journey indicated by operation PROGRAMMED REQUESTS
Sequence is sent to identified second server, and the program operation result that received identified second server is returned
Feed back to terminal device 101,102,103.
Second server 105,106,107 can provide various services, such as can receive the transmission of first server 104
Program execution request;The indicated program of operation above procedure operation request later;Then program operation result is sent to
One server 104.
It should be noted that first server 104 can be hardware, it is also possible to software.When first server 104 is hard
When part, the distributed server cluster of multiple server compositions may be implemented into, individual server also may be implemented into.When first
When server 104 is software, may be implemented into multiple softwares or software module (such as provide the software of Distributed Services or
Software module), single software or software module also may be implemented into.It is not specifically limited herein.
It should be noted that second server 105,106,107 can be hardware, it is also possible to software.Work as second service
When device 105,106,107 is hardware, the distributed server cluster of multiple server compositions may be implemented into, also may be implemented into
Individual server.When second server 105,106,107 is software, may be implemented into multiple softwares or software module (such as
For providing the software or software module of Distributed Services), single software or software module also may be implemented into.It does not do and has herein
Body limits.
It should be noted that for the dispatching method of program runtime environment generally by the provided by the embodiment of the present application
One server 104 executes, and correspondingly, the dispatching device for program runtime environment is generally positioned in first server 104.
It should be understood that the number of terminal device, first server and second server in Fig. 1 is only schematical.
According to needs are realized, any number of terminal device, first server and second server can have.
With continued reference to Fig. 2, it illustrates a realities according to the dispatching method for program runtime environment of the application
Apply the process 200 of example.This is used for the dispatching method of program runtime environment, comprising the following steps:
Step 201, the operation request for the program to be run that client is sent is received.
In the present embodiment, for the executing subject of the dispatching method of program runtime environment (such as shown in FIG. 1 first
Server) user can be received from the client being installed on terminal device by wired connection mode or radio connection
The operation request of the program to be run issued.Here client for example can be the client of cloud computing service.
Above-mentioned program to be run can be what user edited in advance, to realize the program of the custom function of user.On
Stating program to be run can be pre-stored in the electronic equipment for realizing communication connection with above-mentioned executing subject.
It is interacted in general, user can use the client installed in terminal with above-mentioned executing subject, at this moment, Yong Huke
To pass through the mark for directly inputting program to be run in above-mentioned client, or the program to be run that click client provides
Mark with sent to above-mentioned executing subject program to be run operation request.
Step 202, environment when object run needed for determining the program wait run.
In the present embodiment, the operation request based on line program to be shipped obtained in step 201, above-mentioned executing subject (example
First server as shown in Figure 1) ring when can use object run needed for various analysis means determine program wait run
Border.
In application scenes, the operation of the program to be run in above-mentioned steps 201 request can indicate operation to
Runtime environment corresponding to the program of operation.In other application scenarios, above-mentioned executing subject can be based on wait run
Program code development language, environment when object run needed for determining program wait run.
The runtime environment (abbreviation runtime environment) of program runtime environment namely program, can be deployed in container.
Said vesse can be deployed in electronic equipment (such as the second service shown in FIG. 1 that communication connection is realized with above-mentioned executing subject
Device) in.Each second server can dispose at least one container.It may include at least one constructed in one container
Runtime environment.One runtime environment can correspond to a kind of development language.Above-mentioned development language for example may include nodejs,
Python, golang, java, php etc..
Said vesse for example can include but is not limited to the appearance created using Docker container engine, Rocket container engine
Device, the container created by Hyper container engine etc..
Each container can be deployed with process manager module.Process manager module, which can star, monitors and exit, restarts
The corresponding program of runtime environment runs process.
Said vesse can realize communication connection between above-mentioned executing subject.
The relevant information of the runtime environment wherein constructed can be sent to above-mentioned executing subject by each container.On
Stating executing subject can be by the identification information associated storage of the identification information of the runtime environment constructed and corresponding container
In default runtime environment list.The identification information of above-mentioned runtime environment for example may include corresponding development language,
In application scenes, the identification information of above-mentioned runtime environment for example may include program corresponding to runtime environment
Identification information.
In application scenes, said vesse can run program operation corresponding with constructed runtime environment
Process.Process can be run by the program of runtime environment and the relevant information of runtime environment is sent to above-mentioned executing subject,
So that upper executing subject deposits the information of the information of the mark of runtime environment and the mark of the corresponding container of runtime environment
Storage is in the operation of default environment in list.
In application scenes, runtime environment needed for above-mentioned program to be run has been fabricated, and is deployed in one
In default container in a second server shown in FIG. 1.In these application scenarios, that safeguards in above-mentioned executing subject is default
The identification information of environment when may include above-mentioned object run in runtime environment list.
In other application scenarios, runtime environment needed for above-mentioned program to be run is not fabricated.At these
In application scenarios, fortune needed for needing to construct above-mentioned program to be run in the default container of second server shown in Fig. 1
Environment when row.Above-mentioned default container can be container specified in advance.Further, if having disposed in above-mentioned second server
The load of container is limited, then can dispose in above-mentioned second server for operation needed for providing program to be run
When environment needed for default container.
Environment when object run needed for program of the above-mentioned determination wait run, may include steps of:
Firstly, determining in default runtime environment list ring when with the presence or absence of object run needed for the program wait run
Border.
Secondly, if so, runtime environment needed for the already present program to be run of default runtime environment list is true
Environment when being set to object run.
Again, if it is not, being then used to indicate the instruction of environment when creating object run to default container, so that default hold
The process manager module of device is constructed according to above-metioned instruction performance objective runtime environment and is operated.
Environment construction operation may include: the program created for running above-mentioned program to be run when above-mentioned object run
Operation process, using above procedure run process from default warehouse by run time file mirror image needed for program to be run to
Environment when default container is to form object run, and the identification information of feedback target runtime environment.Above-mentioned executing subject can be with
The identification information of environment when storing received object run in default runtime environment list.
Above-mentioned creation is used to run the program operation process of above-mentioned program to be run, and may include process manager module benefit
Process is run with bifurcated function (fork function) creation program.
It, can be by presetting the process manager module in container and between above-mentioned executing subject at runtime after environment construction
Communication connection, by the identification information feedback of environment when object run give above-mentioned executing subject.
Step 203, operation request is sent to the container of environment when can provide object run, to be based in said vesse
Environment runs program to be run when object run.
In the present embodiment, the dispatching method when object run has been determined after environment, for program runtime environment
Executing subject can by the above-mentioned program wait run operation request be sent to can provide object run when environment container, with
Environment runs program to be run when in said vesse based on object run.It specifically, can be according to environment when object run
The container of environment when the identification information of corresponding container can provide object run to determine.
In some optional implementations of the present embodiment, the process manager module disposed in container can be used for supervising
Control the executive condition of the above-mentioned environment in object run of the program wait run, such as whether program operation is abnormal etc..When it is above-mentioned to
When the program of operation is operating abnormally in above-mentioned runtime environment, exception information can be sent to by above-mentioned process manager module
State executing subject.In addition, the operation result of program to be run can be passed through above-mentioned communication connection by above-mentioned process manager module
It is sent to above-mentioned executing subject.
In some optional implementations of the present embodiment, in response to receiving the letter of program operation exception to be run
Breath, the communication connection between container where disconnection and program to be run.And mesh is deleted in default runtime environment list
Mark the relevant information of runtime environment.Wherein, program to be run is operating abnormally information and is examined by the process manager module of container on
It surveys and is sent by above-mentioned communication connection.Above-mentioned communication connection can be the communication connection for realizing interprocess communication mode.
In these optional implementations, if the program in a runtime environment is operating abnormally, runtime environment can
Can occur abnormal.At this point, above-mentioned executing subject can disconnect and the program where container between communication connection, or disconnect
Communication connection between program operation process corresponding with the runtime environment.And it deletes and is somebody's turn to do in default runtime environment list
The relevant information of the corresponding runtime environment of program, the relevant information of runtime environment for example may include the mark of runtime environment
Know the information of the mark of container belonging to information and runtime environment.Here the correlation of the corresponding runtime environment of the program
Information may include the information of the container where the program.In this way, above-mentioned executing subject is just no longer to ring when the operation of the exception
Border sends new program execution request, until runtime environment exits extremely and restarts.Runtime environment exits restart after, when operation
The container and above-mentioned executing subject that environment is located at re-establish communication connection, and send the information of the mark of runtime environment,
Above-mentioned executing subject stores the relevant information of above-mentioned runtime environment (as run again in above-mentioned default runtime environment list
When environment identification information and the identification information of the container where runtime environment etc.).The mark of runtime environment is used for area
Divide different runtime environments, the mark of runtime environment may include character and/or number.The mark of container can be used for distinguishing
Different containers, the mark of container may include character and/or number.
The method provided by the above embodiment of the application is asked by receiving the operation for the program to be run that client is sent
It asks, then environment when object run needed for the program described in determination wait run, being finally sent to operation request can provide mesh
Mark runtime environment container, in a reservoir based on object run when environment run program to be run.By in container into
Thread management module constructs runtime environment, and operation conditions of the monitoring programme in object run in environment.Above-mentioned execution master
Body need to only be responsible for environment list when maintenance operation, and the corresponding target of program to be run is determined according to runtime environment list
Runtime environment, and environment when the program wait run is sent to object run, so that the program wait run is in object run
It is run in environment.Method provided by the above embodiment can simplify the exploitation and maintenance difficulties of runtime environment.It can also improve
The processing speed of runtime environment exception, to improve the stability of cloud computing service.
With further reference to Fig. 3, it illustrates the streams of another embodiment of the dispatching method for program runtime environment
Journey 300.This is used for the process 300 of the dispatching method of program runtime environment, comprising the following steps:
Step 301, the operation request for the program to be run that client is sent is received.
In the present embodiment, step 301 is identical as the step 201 of embodiment illustrated in fig. 2, does not repeat herein.
Step 302, environment when object run needed for determining the program wait run.
In the present embodiment, step 302 is identical as the step 202 of embodiment illustrated in fig. 2, does not repeat herein.
Step 303, operation request is sent to the container of environment when can provide object run, to be based in said vesse
Environment runs program to be run when object run.
In the present embodiment, step 303 is identical as the step 203 of embodiment illustrated in fig. 2, does not repeat herein.
Step 304, based on the received object run when the corresponding standard output interface of environment handle information, obtain
Run program to be run log generated.
It include process manager module in the container of above-mentioned environment when can provide object run.Process manager module is in addition to monitoring
The program for running program to be run except the executive condition of environment, can also be run process at runtime by program to be run
The information of handle of standard output interface be sent to the executing subject (example of the above-mentioned dispatching method for program runtime environment
First server as shown in Figure 1).The corresponding standard output interface of environment can be above-mentioned to be run when above-mentioned object run
The standard output interface of the program operation process of program.Here it is defeated that standard output interface for example can include but is not limited to standard
(Stdout) interface and standard error (Stderr) interface out.
Handle is a kind of special intelligent pointer.When an application program will quote other systems (such as database, operation system
System) managed memory block or object when it is necessary to using handle.Data object obtains ground after being loaded into memory
Location, but this address is not fixed, but change.Therefore system is the fixed address (handle) of process distribution to deposit
The address after data object variation under storage process, that is, current address.
In this way, above-mentioned executing subject can be obtained according to the handle information of above-mentioned standard output interface in object run
Program to be run log generated is run in environment.
From figure 3, it can be seen that being used for program runtime environment in the present embodiment compared with the corresponding embodiment of Fig. 2
The process 300 of dispatching method environment corresponding standard output interface when highlighting object run based on the received handle
The step of information, acquisition runs program to be run log generated.The scheme of the present embodiment description can be using logical as a result,
Log collection method obtains program running log from multiple runtime environments.Without for corresponding to various development languages
Runtime environment setting log acquisition logic is respectively set.And then the scalability of runtime environment can be improved.
With continued reference to the signal that Fig. 4, Fig. 4 are according to the dispatching method for program runtime environment of the present embodiment
Property timing diagram 400.In Fig. 4, in step 410, user passes through the client 401 to first of installation on the terminal device first
Server 402 sends program operating instruction., first server 402 is according to the specified program to be run of program operating instruction
Environment when object run needed for development language determines the program run wait run.In step 411, first server 402 to
Environmental demand instructs when the process manager module 403 of default container sends object run.In step 412, preset container into
Environment when thread management module activates existing object run according to runtime environment requirement command, or utilize bifurcated function creation
Program runs process, environment 404 when constructing above-mentioned object run using program operation process.In step 413, when object run
The corresponding program of environment 404 runs the information of environment when process sends object run to first server 402, first server
402 by environment 404 when the mark and object run of environment when object run indicated by the information of environment 404 when object run
The mark of affiliated container is stored in default runtime environment list.In step 414, the management of process of above-mentioned default container
Module 403 by when object run the corresponding program of environment 404 operation process standard output interface (including Stdout interface and
Stderr interface) handle information be sent to first server 405.In step 415, first server 402 is to object run
When the corresponding program of environment 404 operation process send operation program instruction, program run process according to above-metioned instruction above-mentioned
User program operation instruction indicated program to be run is run when object run in environment 404.In step 416, above-mentioned
Program run process to first server return the above-mentioned program wait run in object run in operation result.In step
In 417, program operation result is sent to above-mentioned client 401 by first server 402.In step 418, first server
402 can obtain the above-mentioned program wait run environment 404 in above-mentioned object run by the above-mentioned handle information obtained
In program running log.In step 419, above procedure running log can be sent to above-mentioned visitor by first server 402
Family end 401.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind to transport for program
One embodiment of the dispatching device of environment when row, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, the device
It specifically can be applied in various electronic equipments.
As shown in figure 5, the dispatching device 500 for program runtime environment of the present embodiment include: receiving unit 501,
Determination unit 502 and transmission unit 503.Wherein, receiving unit 501 are configured to receive the journey to be run of client transmission
The operation of sequence is requested;Determine single 502 yuan, environment when object run needed for being configured to determine the program wait run;It sends single
Member 503 is configured to run the container that request is sent to environment when can provide object run, is transported with being based on target in a reservoir
Environment runs program to be run when row.
In the present embodiment, the receiving unit 501 for the dispatching device 500 of program runtime environment, determination unit 502
Specific processing and its brought technical effect with transmission unit 503 can respectively with reference to step 201 in Fig. 2 corresponding embodiment,
The related description of step 202 and step 203, details are not described herein.
In some optional implementations of the present embodiment, determination unit 502 is further configured to: based on wait run
Program in code development language, runtime environment needed for determining program to be run.
In some optional implementations of the present embodiment, process manager module, management of process mould are deployed in container
Block is used to monitor the executive condition of program environment in object run wait run.
In some optional implementations of the present embodiment, it is deployed with process manager module in container, and determines single
Member 502 is further configured to: being determined and is transported in default runtime environment list with the presence or absence of target needed for program to be run
Environment when row, wherein default runtime environment list includes the identification information for all runtime environments having been provided;If so, will
Environment when runtime environment needed for the default already present program wait run of runtime environment list is determined as object run;If
It is no, then the instruction of environment when being used to indicate creation object run is sent to default container, so that the management of process mould of default container
Environment construction operates when root tuber following according to instruction execution object run: creation for run the program of program to be run run into
Journey, using program run process from default warehouse by run time file mirror image needed for program to be run to default container with
Environment when forming object run, and the identification information of feedback target runtime environment;It is stored in default runtime environment list
The identification information of environment when received object run.
In some optional implementations of the present embodiment, the dispatching device 500 for program runtime environment is also wrapped
Include acquiring unit 504.Acquiring unit 504 is configured to: environment corresponding standard output when object run based on the received
The handle information of interface, acquisition run program to be run log generated.
In some optional implementations of the present embodiment, the dispatching device 500 for program runtime environment is also wrapped
Exception processing unit (not shown) is included, exception processing unit is configured to: being run in response to receiving program to be run
Abnormal information, the communication connection between container where disconnection and program to be run, and deleted in environment list at runtime
The identification information of environment when except object run;Wherein program to be run is operating abnormally information and is examined by the process manager module of container
It surveys and passes through communication connection and send.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the electronic equipment for being suitable for being used to realize the embodiment of the present application
Structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, function to the embodiment of the present application and should not use model
Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU, Central Processing Unit)
601, it can be according to the program being stored in read-only memory (ROM, Read Only Memory) 602 or from storage section
606 programs being loaded into random access storage device (RAM, Random Access Memory) 603 and execute various appropriate
Movement and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.CPU 601,ROM
602 and RAM 603 is connected with each other by bus 604.Input/output (I/O, Input/Output) interface 605 is also connected to
Bus 604.
I/O interface 605 is connected to lower component: the storage section 606 including hard disk etc.;And including such as LAN (local
Net, Local Area Network) card, modem etc. network interface card communications portion 607.Communications portion 607 passes through
Communication process is executed by the network of such as internet.Driver 608 is also connected to I/O interface 605 as needed.Detachable media
609, such as disk, CD, magneto-optic disk, semiconductor memory etc., are mounted on as needed on driver 608, in order to from
The computer program read thereon is mounted into storage section 606 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 607, and/or from detachable media
609 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes
Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or
Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.
The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection,
Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores
The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And
In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof
Machine program code, programming language include object oriented program language-such as Java, Smalltalk, C++, also
Including conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete
It executes, partly executed on the user computer on the user computer entirely, being executed as an independent software package, part
Part executes on the remote computer or executes on a remote computer or server completely on the user computer.It is relating to
And in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or extensively
Domain net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as provided using Internet service
Quotient is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include receiving unit, determination unit and transmission unit.Wherein, the title of these units is not constituted under certain conditions to the unit
The restriction of itself, for example, receiving unit is also described as " receiving the operation request for the program to be run that client is sent
Unit ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: the operation request for the program to be run that client is sent is received;When object run needed for determining the program wait run
Environment;Operation request is sent to the container of environment when can provide object run, environment when being based on object run in a reservoir
Run program to be run.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (14)
1. a kind of dispatching method for program runtime environment, comprising:
Receive the operation request for the program to be run that client is sent;
Environment when object run needed for determining the program wait run;
The operation request is sent to the container of environment when can provide object run, to be based on the target in the above-described container
The runtime environment operation program to be run.
2. according to the method described in claim 1, wherein, environment packet when object run needed for program of the determination wait run
It includes:
Based on the development language of the code in program to be run, runtime environment needed for determining program to be run.
3. according to the method described in claim 2, wherein, process manager module, the management of process are deployed in the container
Module is used to monitor the executive condition of program environment in the object run wait run.
4. according to the method described in claim 1, wherein, process manager module is deployed in the container, and
Environment includes: when object run needed for program of the determination wait run
Environment when with the presence or absence of object run needed for the program wait run is determined in default runtime environment list, wherein institute
State the identification information that default runtime environment list includes all runtime environments having been provided;
If so, runtime environment needed for the already present program to be run of default runtime environment list is determined as target fortune
Environment when row;
If it is not, the instruction of environment when being used to indicate creation object run is then sent to default container, so that the default container
Environment construction operates when process manager module executes following object run according to described instruction: creation is described wait run for running
Program program run process, using program run process from default warehouse by operation eight-legged essay needed for program to be run
Part mirror image to the default container to form the object run when environment, and the identification information of feedback target runtime environment;
The identification information of environment when storing received object run in the default runtime environment list.
5. according to right want 1 described in method, wherein the method also includes:
Based on the received when object run the corresponding standard output interface of environment handle information, obtain operation it is described to be shipped
The log generated of capable program.
6. the method according to claim 3 or 4, wherein the method also includes:
The information being operating abnormally in response to receiving the program to be run, disconnects and the appearance where the program to be run
Communication connection between device, and in the runtime environment list delete target runtime environment identification information;Wherein
The program to be run is operating abnormally information and is detected by the process manager module of the container and by the communication link
It receives and sends.
7. a kind of dispatching device for program runtime environment, comprising:
Receiving unit is configured to receive the operation request of the program to be run of client transmission;
Determination unit, environment when object run needed for being configured to determine the program wait run;
Transmission unit is configured to for the operation request being sent to the container of environment when can provide object run, described
The environment operation program to be run when in container based on the object run.
8. device according to claim 7, wherein the determination unit is further configured to:
Based on the development language of the code in program to be run, runtime environment needed for determining program to be run.
9. device according to claim 8, wherein be deployed with process manager module, the management of process in the container
Module is used to monitor the executive condition of program environment in the object run wait run.
10. device according to claim 7, wherein process manager module is deployed in the container, and
Determination unit is further configured to:
Environment when with the presence or absence of object run needed for the program wait run is determined in default runtime environment list, wherein institute
State the identification information that default runtime environment list includes all runtime environments having been provided;
If so, runtime environment needed for the already present program to be run of default runtime environment list is determined as target fortune
Environment when row;
If it is not, the instruction of environment when being used to indicate creation object run is then sent to default container, so that the default container
Environment construction operates when process manager module executes following object run according to described instruction: creation is described wait run for running
Program program run process, using program run process from default warehouse by operation eight-legged essay needed for program to be run
Part mirror image to the default container to form the object run when environment, and the identification information of feedback target runtime environment;
The identification information of environment when storing received object run in the default runtime environment list.
11. device according to claim 7, wherein described device further includes acquiring unit, and the acquiring unit is configured
At:
Based on the received when object run the corresponding standard output interface of environment handle information, obtain operation it is described to be shipped
The log generated of capable program.
12. device according to claim 9 or 10, wherein described device further includes exception processing unit, the exception
Reason unit is configured to:
The information being operating abnormally in response to receiving the program to be run, disconnects and the appearance where the program to be run
Communication connection between device, and in the runtime environment list delete target runtime environment identification information;Wherein
The program to be run is operating abnormally information and is detected by the process manager module of the container and by the communication link
It receives and sends.
13. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as method as claimed in any one of claims 1 to 6.
14. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor
Such as method as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910049841.4A CN109783197A (en) | 2019-01-18 | 2019-01-18 | Dispatching method and device for program runtime environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910049841.4A CN109783197A (en) | 2019-01-18 | 2019-01-18 | Dispatching method and device for program runtime environment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109783197A true CN109783197A (en) | 2019-05-21 |
Family
ID=66501636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910049841.4A Pending CN109783197A (en) | 2019-01-18 | 2019-01-18 | Dispatching method and device for program runtime environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109783197A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111324423A (en) * | 2020-03-03 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Method and device for monitoring processes in container, storage medium and computer equipment |
CN111414234A (en) * | 2020-03-20 | 2020-07-14 | 深圳市网心科技有限公司 | Mirror image container creation method and device, computer device and storage medium |
CN112989324A (en) * | 2021-03-10 | 2021-06-18 | 中国民航信息网络股份有限公司 | Data interaction method and device, electronic equipment and storage medium |
CN113867902A (en) * | 2021-12-03 | 2021-12-31 | 北京翼辉信息技术有限公司 | Method, device and storage medium for controlling program execution |
CN115268909A (en) * | 2022-07-23 | 2022-11-01 | 杭州沧浪健康管理有限公司 | Method, system and terminal for establishing and running construction task at web front end |
CN115617421A (en) * | 2022-12-05 | 2023-01-17 | 深圳市欧瑞博科技股份有限公司 | Intelligent process scheduling method and device, readable storage medium and embedded equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760181A (en) * | 2016-04-07 | 2016-07-13 | 深圳市百米生活股份有限公司 | Cross-code language development framework |
CN106502905A (en) * | 2016-10-26 | 2017-03-15 | 腾讯科技(深圳)有限公司 | A kind of method of testing of application program, apparatus and system |
US20170134471A1 (en) * | 2015-11-10 | 2017-05-11 | Genband Us Llc | Web-Based Client for Providing Real-Time Communications |
CN107547596A (en) * | 2016-06-27 | 2018-01-05 | 中兴通讯股份有限公司 | A kind of cloud platform control method and device based on Docker |
CN107657172A (en) * | 2016-07-25 | 2018-02-02 | 腾讯科技(深圳)有限公司 | Code process method, apparatus and system |
CN109101269A (en) * | 2018-08-30 | 2018-12-28 | 长沙软工信息科技有限公司 | A kind of Software Delivery method and device, electronic equipment |
-
2019
- 2019-01-18 CN CN201910049841.4A patent/CN109783197A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170134471A1 (en) * | 2015-11-10 | 2017-05-11 | Genband Us Llc | Web-Based Client for Providing Real-Time Communications |
CN105760181A (en) * | 2016-04-07 | 2016-07-13 | 深圳市百米生活股份有限公司 | Cross-code language development framework |
CN107547596A (en) * | 2016-06-27 | 2018-01-05 | 中兴通讯股份有限公司 | A kind of cloud platform control method and device based on Docker |
CN107657172A (en) * | 2016-07-25 | 2018-02-02 | 腾讯科技(深圳)有限公司 | Code process method, apparatus and system |
CN106502905A (en) * | 2016-10-26 | 2017-03-15 | 腾讯科技(深圳)有限公司 | A kind of method of testing of application program, apparatus and system |
CN109101269A (en) * | 2018-08-30 | 2018-12-28 | 长沙软工信息科技有限公司 | A kind of Software Delivery method and device, electronic equipment |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111324423A (en) * | 2020-03-03 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Method and device for monitoring processes in container, storage medium and computer equipment |
CN111414234A (en) * | 2020-03-20 | 2020-07-14 | 深圳市网心科技有限公司 | Mirror image container creation method and device, computer device and storage medium |
CN112989324A (en) * | 2021-03-10 | 2021-06-18 | 中国民航信息网络股份有限公司 | Data interaction method and device, electronic equipment and storage medium |
CN113867902A (en) * | 2021-12-03 | 2021-12-31 | 北京翼辉信息技术有限公司 | Method, device and storage medium for controlling program execution |
CN115268909A (en) * | 2022-07-23 | 2022-11-01 | 杭州沧浪健康管理有限公司 | Method, system and terminal for establishing and running construction task at web front end |
CN115617421A (en) * | 2022-12-05 | 2023-01-17 | 深圳市欧瑞博科技股份有限公司 | Intelligent process scheduling method and device, readable storage medium and embedded equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109783197A (en) | Dispatching method and device for program runtime environment | |
US11132114B2 (en) | Method and apparatus for generating customized visualization component | |
CN109542445A (en) | A kind of method and apparatus that Android plug-in unit melts hair | |
US20180131764A1 (en) | Dynamically scaling application components using microservices | |
US20110231819A1 (en) | Content Availability Determination, Representation And Acquisition System | |
CN110019080A (en) | Data access method and device | |
CN110096424A (en) | Processing method, device, electronic equipment and the storage medium of test | |
US11916729B2 (en) | Automated configuration of a content delivery network | |
CN110020329A (en) | For generating the methods, devices and systems of webpage | |
CN109241033A (en) | The method and apparatus for creating real-time data warehouse | |
CN109298948A (en) | Distributed computing method and system | |
CN109582317A (en) | Method and apparatus for debugging boarding application | |
CN110502699A (en) | Method and apparatus for obtaining information | |
CN111444077A (en) | Method and device for generating flow node test data | |
CN109614549B (en) | Method and apparatus for pushed information | |
CN109144843A (en) | The method and apparatus for testing environment deployment | |
CN113535220B (en) | Code packet management method and device | |
CN110083457A (en) | A kind of data capture method, device and data analysing method, device | |
CN111881392A (en) | Page display method and device | |
CN110083351A (en) | Method and apparatus for generating code | |
CN109120433A (en) | Method and apparatus for containerization deployment host | |
CN109214846A (en) | Information storage means and device | |
CN114527993A (en) | Application deployment method, device, equipment and medium | |
CN110347654A (en) | A kind of method and apparatus of online cluster features | |
CN113312900A (en) | Data verification method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190521 |