CN108595246A - A kind of method, apparatus and equipment of operation application - Google Patents

A kind of method, apparatus and equipment of operation application Download PDF

Info

Publication number
CN108595246A
CN108595246A CN201810215743.9A CN201810215743A CN108595246A CN 108595246 A CN108595246 A CN 108595246A CN 201810215743 A CN201810215743 A CN 201810215743A CN 108595246 A CN108595246 A CN 108595246A
Authority
CN
China
Prior art keywords
application
plug
unit
intended application
class
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.)
Granted
Application number
CN201810215743.9A
Other languages
Chinese (zh)
Other versions
CN108595246B (en
Inventor
张奇龙
张�浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810215743.9A priority Critical patent/CN108595246B/en
Publication of CN108595246A publication Critical patent/CN108595246A/en
Application granted granted Critical
Publication of CN108595246B publication Critical patent/CN108595246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

This disclosure a kind of method, apparatus and equipment of operation application, this method intended application is no longer directly run on virtual machine, and it is operate on container, the plug-in unit and/or other application that mutually independent Classloader load operating intended application is relied on are provided by container, since the container loads the plug-in unit and other application that the intended application is relied in such a way that mutually independent different Classloader loads different plug-in units or application, therefore, the class that intended application is relied on will not clash, it is ensured that the normal operation of intended application.

Description

A kind of method, apparatus and equipment of operation application
Technical field
This specification is related to field of computer technology more particularly to a kind of method, apparatus and equipment of operation application.
Background technology
Currently, the application based on Java has been widely used, it is generally operated at Java Virtual Machine (Java Virtual Machine, JVM) on.
In practical applications, the application based on Java often introduces many dependences, that is, the operation of Java applications Often rely on other java class (the namely method of other application or plug-in unit).And a Java application is directly run on When on JVM, if the Java is clashed using relied on class, Java applications can be caused to be not normally functioning.
Based on the prior art, a kind of can ensure using the method for capableing of normal operation is needed.
Invention content
This specification provides a kind of method of operation application, can not ensure to apply and can normally transport to solve the prior art Capable problem.
Present description provides a kind of methods of operation application, including:
Start container;
The corresponding data packet of the container analysis intended application, the plug-in unit relied on the determination intended application and/or Other application;
The container is loaded different plug-in units with different Classloaders or is answered by several mutually independent Classloaders Mode loads plug-in unit and/or other application that the intended application is relied on;
The plug-in unit and/or other application of the container based on load, run in the data packet mesh for including Mark applies corresponding service code.
Present description provides a kind of devices of operation application, including:
Parsing module, the corresponding data packet of parsing intended application, the plug-in unit relied on the determination intended application and/or Other application;
Load-on module, by several mutually independent Classloaders, with different Classloaders load different plug-in units or The mode of application loads plug-in unit and/or other application that the intended application is relied on;
Module, the plug-in unit based on load and/or other application are run, the mesh for including is run in the data packet Mark applies corresponding service code.
It is described present description provides a kind of equipment of operation application, including one or more memories and processor Memory stores program, and is configured to execute following steps by one or more of processors:
Start container;
The corresponding data packet of the container analysis intended application, the plug-in unit relied on the determination intended application and/or Other application;
The container is loaded different plug-in units with different Classloaders or is answered by several mutually independent Classloaders Mode loads plug-in unit and/or other application that the intended application is relied on;
The plug-in unit and/or other application of the container based on load, run in the data packet mesh for including Mark applies corresponding service code.
Above-mentioned at least one technical solution that this specification uses can reach following advantageous effect:
In this specification one or more embodiment, intended application is no longer directly run on virtual machine, but is run On container, the plug-in unit and/or its that mutually independent Classloader load operating intended application is relied on are provided by container He applies, since the container loads the mesh in such a way that different mutually independent Classloaders loads different plug-in units or application Mark applies relied on plug-in unit and other application, and therefore, the class that intended application is relied on will not clash, it is ensured that target is answered Normal operation.
Description of the drawings
Attached drawing described herein is used for providing further understanding this specification, forms part of this specification, The illustrative embodiments and their description of this specification do not constitute the improper restriction to this specification for explaining this specification. In the accompanying drawings:
Fig. 1 is the process schematic for the operation application that this specification provides;
Fig. 2 is the class search procedure schematic diagram that this specification provides;
Fig. 3 is the schematic device for the operation application that this specification provides;
Fig. 4 is the equipment schematic diagram for the operation application that this specification provides;
Fig. 5 is the structural schematic diagram for the container that this specification provides.
Specific implementation mode
Since current many virtual machines (such as JVM) are not provided with the mechanism of differentiation version, compare if used Complicated Classloader architecture is easy for version punching occur when there are multiple versions of some data packet or class It is prominent.For example, a Java, which is applied, depends on plug-in unit A and plug-in unit B, and plug-in unit A depends on the version 1 of plug-in unit C, plug-in unit B to depend on The version 2 of plug-in unit C, then if using the Classloader system with branch, when the lookup of parent loader and subclass loader When all there is plug-in unit C in range, parent loader will be prevented preferentially to load the version 1 of plug-in unit C and cause plug-in unit B from normally adding It carries, and then Java applications is caused to be not normally functioning.
The core concept of this specification is:So that intended application is no longer directly run on virtual machine, and is operate in container On, by container in such a way that mutually independent different Classloader loads different plug-in units or application, load target is answered With the plug-in unit and/or other application relied on, to achieve the purpose that class is isolated, to ensure the normal operation of application.
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment, Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than Whole embodiments.The embodiment of base in this manual, those of ordinary skill in the art are not before making creative work The every other embodiment obtained is put, the range of this specification protection should be all belonged to.
Fig. 1 is the process schematic for the operation application that this specification provides, and specifically includes following steps:
S100:Start container.
In the present specification, the container is used for operational objective application, provides and is relied on for loading the intended application Plug-in unit and/or other application Classloader, and manage these Classloaders, plug-in unit and other application.The container It runs on virtual machine.
Below only by intended application be Java for illustrate, it will be understood by those skilled in the art that it is following only with Java illustratively illustrated, does not constitute the limitation to the application, it is any with realize identical of other computer languages or Similar functions, within the protection domain of the application.
Java is run on using (intended application) on JVM, is starting Java in application, need to first start described in this specification Container.Specifically, the corresponding code of container can be written in Java applications, that is, being wrapped in the corresponding data packet of intended application Containing the corresponding code of container, then the Java is being run in application, the container corresponding generation for including in the data packet can directly be run Code, has been turned on the container.
Further, since virtual machine is starting one in application, the data packet for first having to find the application is corresponding Entry method therefore, can be corresponding by the data packet of the intended application when by the corresponding code write-in intended application of container Entry method is revised as:The corresponding entry method of the container.When then starting the intended application, the target that virtual machine is found is answered The corresponding entry method of container of the data packet is actually written in the corresponding entry method of data packet, and then can be according to this Entry method, the corresponding code of container for including in operation data packet.
S102:The corresponding data packet of container analysis intended application, to determine plug-in unit and/or other that intended application is relied on Using.
S104:Container by several mutually independent Classloaders, with different Classloaders load different plug-in units or The mode of application, the plug-in unit and/or other application that load intended application is relied on.
In this specification embodiment, the corresponding data packet of intended application may include two kinds.
The first, data packet also includes the intended application sheet other than it can include the above-mentioned corresponding code of container The mark for the plug-in unit and/or other application that the corresponding service code of body and the intended application are relied on.Then container is in parsing mesh It, can be according to the plug-in unit and/or other application that the intended application for including in the data packet is relied on when the mark corresponding data packet of application Mark, determine the plug-in unit and/or other application that intended application is relied on, by Classloader load intended application relied on Plug-in unit and/or when other application, can according to the mark of plug-in unit and/or other application that intended application is relied on, download or It is local to search the plug-in unit and/or other application that intended application is relied on, and load.
Second, data packet also includes the intended application sheet other than it can include the above-mentioned corresponding code of container The corresponding data packet of plug-in unit and/or the corresponding number of other application that the corresponding service code of body and the intended application are relied on According to packet.When intended application be Java in application, second of data packet is Fat Jar packets.
When the corresponding data packet of intended application is above-mentioned second of data packet, after the container analysis data packet, you can straight Connected Classloader, the corresponding data of plug-in unit relied on comprising the intended application in the corresponding data packet of load intended application Packet, and/or, the corresponding data of other application relied on comprising the intended application in the corresponding data packet of load intended application Packet.Obviously, second of data packet is more convenient the deployment of application developer compared to the first data packet.
It should be noted that intended application depends on plug-in unit and/or other application, it is inherently that intended application depends on Class derived from class and/or other application derived from plug-in unit.For add-in developer, only one or several may have been write out The code of a class, these codes can not constitute an application, and therefore, specified tool can be used in add-in developer, by these Class is packaged into the format that container can be parsed and be loaded, and also just becomes plug-in unit, in other words, the plug-in unit of class.That is, this Apply for that the plug-in unit refers to:By specified tool, several classes are packaged into the lattice that the container can be parsed and be loaded The data packet of formula.
Similar, for application developer, several classes write out may be constructed an application, but this is applied Class needs derived from institute are relied on by intended application, and therefore, specified tool can also be used in application developer, which is packaged The format that can be parsed and load at container, and since the application needs to be relied on by intended application, which does not need Run on an individual container, and need to operate on the same container with intended application, therefore, be packaged should in application, This, which is applied, does not include the corresponding code of container in corresponding data packet.That is, intended application described herein is relied on Other application refer to:By specified tool, the other application is packaged into the lattice that the container can be parsed and be loaded The data packet of formula, and do not include the corresponding code of the container in the corresponding data packet of the other application.
Certainly, for the developer of intended application, also specified tool is used to be packaged into the intended application The format that the container can be parsed and be loaded, the other application relied on the intended application difference lies in since answer by target With not relied on by other application, intended application needs independent operating on container, and therefore, the tool is in addition to by the intended application sheet The plug-in unit and/or other application that the service code of body, the intended application are relied on are packed into other than the data packet of the intended application, The corresponding code of container is still packed into the data packet of the intended application, to the side described in S100 through the above steps Method starts container.
The plug-in unit and/or container relied on by intended application is no longer directly loaded by the Classloader of virtual machine itself, But loaded by the Classloader that container provides, therefore, container can jump out the limitation that virtual machine itself does not differentiate between version, using not Same Classloader loads different plug-in units or other application, and rank (father is not present between each Classloader that container is provided Sub- rank, upper and lower rank etc.) on differentiation, and be independent from each other Classloader, that is to say, that as long as be different plug-in unit or Using just using different and mutually independent Classloader load.Different plug-in units described herein or application refer to: Any two identifies different plug-in units or application.
In addition, container can preferentially load intended application when loading the plug-in unit and/or other application that intended application is relied on The plug-in unit relied on reloads the other application that intended application is relied on, and when loading plug-in unit, can be relied on according to intended application Each plug-in unit priority, load each plug-in unit successively, when loading other application, can also be relied on according to intended application it is each its The priority that he applies, loads each other application successively.The priority of each plug-in unit and other application can be set as needed It is fixed.
S106:Plug-in unit and/or other application of the container based on load, run the intended application pair for including in the data packet The service code answered.
It is run on virtual machine just because of container, container itself has jumped out virtual machine and do not provide the mechanism for distinguishing version And mutually independent Classloader is provided, therefore, different plug-in unit that the intended application run on container is relied on and/or Other application can be loaded by mutually independent different Classloader, version conflict would not also occur, it is ensured that target The normal operation of application.
In this specification embodiment, container can manage the plug-in unit and application that it is loaded by class derived table, specifically, After the plug-in unit that is relied on of load intended application, derived class is (that is, the plug-in unit institute energy by the mark of plug-in unit and after loading the plug-in unit Derived class) class identification record in class derived table;After the other application that load intended application is relied on, by other application The class identification record for identifying and loading derived class (that is, class derived from the other application institute energy) after the other application is led in class Go out in table.
Since container is when loading the plug-in unit and/or other application that intended application is relied on, the plug-in unit and/or other application Other plug-in units or application can may be also relied on, therefore, container can be determined when loading plug-in unit according to the configuration file of plug-in unit The class that the plug-in unit is relied on is loaded, and searches such determining other plug-in units of export, last base in the class derived table of record In other plug-in units found, the plug-in unit is loaded.The configuration file of the plug-in unit may include in the corresponding data packet of the plug-in unit.Class As, in load in application, can determine the class for loading the application and being relied on, and searches export in the class derived table of record and determine Such other plug-in units or application, be finally based on other plug-in units found or application, load the application.
After being loaded with the plug-in unit and/or other application that intended application is relied on, container can determine operational objective application pair The class that the service code answered is relied on, and judge whether the class that operational objective applies corresponding service code to be relied on is to refer in advance Fixed class, if so, searching such in the corresponding service code of intended application and loading, with the class operational objective based on load Using corresponding service code, otherwise, is searched in class derived table and export such plug-in unit or other application, and be based on having loaded The plug-in unit found or other application, operational objective apply corresponding service code.
Wherein, above-mentioned specified class refers to:The developer of development goal application is not desired to preferentially load plug-in unit or other application Derived class, and think preferentially to load the self-contained class of the intended application.
It is and upper it should be noted that container loads the method for other application that intended application is relied on by Classloader The method for stating the application of container operational objective is identical, is just no longer repeated one by one here.
Certainly, container is when loading the plug-in unit that is relied on of intended application and/or other application, these plug-in units and/or other Using derived from class be also likely to be virtual machine itself or container itself foundation class, therefore, container is in load intended application institute When the plug-in unit of dependence, class derived from the plug-in unit can be first searched in the foundation class of virtual machine and (if finding, is loaded directly into virtual The foundation class of machine), then search class derived from the plug-in unit in the foundation class of container and (if finding, be loaded directly into the base of container Plinth class), the plug-in unit is finally searched in the data packet of intended application and is loaded.Similar, container is applied or is added in operational objective When carrying the other application that intended application is relied on, container can first search the derived class of application (if looking into the foundation class of virtual machine Find, be then loaded directly into the foundation class of virtual machine), then in the foundation class of container search application derived class (if finding, It is loaded directly into the foundation class of container), then judge whether such is specified class (if so, directly in the corresponding code of application Search and load), it finally searches and loads in the data packet of application, as shown in Figure 2.
As it can be seen that if ignoring above-mentioned class derived table, it is described herein compared to the Classloader that JVM itself is provided The Classloader that container is provided is completely non-interference independently of each other, and the Classloader that JVM is provided is that there are father and son passes System, it is not independent, therefore the Classloader that container described herein provides can provide class isolation mech isolation test, to ensure that target is answered Do not conflicted between the class relied on.Further, in conjunction with above-mentioned class derived table, the class that container described herein provides adds Carrying device can be interdepended again by class derived table, and this original mutually independent Classloader is realized by class derived table Dependence be a kind of netted relationship, the set membership (being equivalent to relationship between superior and subordinate) between the Classloader of JVM It is entirely different.Therefore, Classloader provided herein can also interdepend while providing class isolation mech isolation test, ensure Intended application is based on normally relying on and normal operation.
It is the method for running application that one or more embodiments of this specification provide above, is based on same thinking, This specification additionally provides the device of corresponding operation application, as shown in Figure 3.
Parsing module 301, the corresponding data packet of parsing intended application, the plug-in unit relied on the determination intended application And/or other application;
Load-on module 302 loads different plug-in units with different Classloaders by several mutually independent Classloaders Or the mode of application, load the plug-in unit and/or other application that the intended application is relied on;
Module 303, the plug-in unit based on load and/or other application are run, the institute for including in the data packet is run State the corresponding service code of intended application.
The corresponding data packet of plug-in unit relied on comprising the intended application in the corresponding data packet of the intended application; And/or
The corresponding data of other application relied on comprising the intended application in the corresponding data packet of the intended application Packet does not include the corresponding code of described device in the corresponding data packet of the other application;
The load-on module 302 is loaded in the corresponding data packet of the intended application and is relied on comprising the intended application The corresponding data packet of plug-in unit;And/or it loads in the corresponding data packet of the intended application and is relied on comprising the intended application The corresponding data packet of other application.
The load-on module 302 determines according to the configuration file of the plug-in unit and loads the class that the plug-in unit is relied on; Other plug-in units of the determining class of export are searched in the class derived table of record;Based on other plug-in units found, described in load Plug-in unit.
Described device further includes:
Management module 304 will be described after the plug-in unit that the load-on module 302 loads that the intended application is relied on The class identification record of derived class is in class derived table after the mark and the load plug-in unit of plug-in unit;In the load-on module After the other application that the 302 load intended applications are relied on, by the mark of the other application and load it is described other The class identification record of derived class is in class derived table after.
The operation module 303 determines and runs the class that the corresponding service code of the intended application is relied on;Judge operation Whether the class that the corresponding service code of the intended application is relied on is preassigned class;If so, in the intended application The class is searched in corresponding service code and is loaded, and the corresponding business of the intended application is run with the class based on load Code;Otherwise, the plug-in unit or other application for exporting the class are searched in the class derived table, and are found based on what is loaded Plug-in unit or other application, run the corresponding service code of the intended application.
This specification also correspondence provides a kind of equipment for information recommendation, as shown in Figure 4.The equipment include one or Multiple memories and processor, the memory stores program, and is configured to be held by one or more of processors Row following steps:
Start container;
The corresponding data packet of the container analysis intended application, the plug-in unit relied on the determination intended application and/or Other application;
The container is loaded different plug-in units with different Classloaders or is answered by several mutually independent Classloaders Mode loads plug-in unit and/or other application that the intended application is relied on;
The plug-in unit and/or other application of the container based on load, run in the data packet mesh for including Mark applies corresponding service code.
In addition, this specification additionally provides a kind of container run on virtual machine, as shown in Figure 5.
Fig. 5 is the structural schematic diagram for the container that this specification provides.
Starting module is mainly responsible for the initialization of container, starts for container and prepares resource and service.
Parsing module (parsing module being equivalent in Fig. 3) is responsible for the plug-in unit that parsing intended application relies on and/or other are answered With.
Plug-in unit load-on module, the plug-in unit that according to priority load intended application relies on successively.
Using load-on module, the other application that according to priority load intended application relies on successively (plug-in unit load-on module and is answered The load-on module being equivalent to load-on module in Fig. 3).
Management module, including Classloader management module, plug-in management module, plug-in services management module, application management Module, application service management module.Classloader management module is used to manage the mutually independent class load that container can be provided Device.The mark of plug-in unit is recorded after plug-in unit of the plug-in management module for managing container load, including load plug-in unit in class derived table Know and the class of derived class identifies.Plug-in services management module is equivalent to for externally providing class derived from the plug-in unit institute of load The service for the plug-in unit that container is loaded externally is provided.Application management module is used to manage application (the intended application institute of container load The other application of dependence), including the mark of record application and the class of derived class identify in class derived table after load plug-in unit.It answers With service management module for externally providing class derived from the application institute of load, it is equivalent to and the application that container is loaded externally is provided Service.
Foundation class management module, the foundation class for managing virtual machine and/or container itself.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit is realized can in the same or multiple software and or hardware when specification.
It should be understood by those skilled in the art that, the embodiment of this specification can be provided as method, system or computer journey Sequence product.Therefore, in terms of this specification can be used complete hardware embodiment, complete software embodiment or combine software and hardware Embodiment form.Moreover, it wherein includes computer usable program code that this specification, which can be used in one or more, The computer implemented in computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of program product.
This specification is with reference to the method, equipment (system) and computer according to this specification one or more embodiment The flowchart and/or the block diagram of program product describes.It should be understood that flow chart and/or side can be realized by computer program instructions The combination of the flow and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can provide These computer program instructions are set to the processing of all-purpose computer, special purpose computer, Embedded Processor or other programmable datas Standby processor is to generate a machine so that is executed by computer or the processor of other programmable data processing devices Instruction generates specifies for realizing in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes Function device.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey Sequence module.Usually, program module include routines performing specific tasks or implementing specific abstract data types, program, object, Component, data structure etc..One or more embodiments that this specification can also be put into practice in a distributed computing environment, at this In a little distributed computing environment, by executing task by the connected remote processing devices of communication network.It is counted in distribution It calculates in environment, program module can be located in the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the sequence in embodiment It executes and desired result still may be implemented.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can With or it may be advantageous.
The foregoing is merely one or more embodiments of this specification, are not limited to this specification.For For those skilled in the art, one or more embodiments of this specification can have various modifications and variations.It is all in this explanation Any modification, equivalent replacement, improvement and so within the spirit and principle of one or more embodiments of book, should be included in Within the right of this specification.

Claims (14)

1. a kind of method of operation application, including:
Start container;
The corresponding data packet of the container analysis intended application, the plug-in unit relied on the determination intended application and/or other Using;
The container loads different plug-in units or application by several mutually independent Classloaders, with different Classloaders Mode loads plug-in unit and/or other application that the intended application is relied on;
The plug-in unit and/or other application of the container based on load, run in the data packet target for including and answer With corresponding service code.
Include the corresponding code of container 2. the method as described in claim 1, in the corresponding data packet of intended application;
Start container, specifically includes:
The corresponding code of the container for including in the data packet is run, to start the container.
3. method as claimed in claim 2, the corresponding entry method of the data packet is:The corresponding entrance side of the container Method;
The corresponding code of the container for including in the data packet is run, is specifically included:
According to the corresponding entry method of the data packet, the corresponding code of the container for including in the data packet is run.
4. the method as described in claim 1, relied on comprising the intended application in the corresponding data packet of the intended application The corresponding data packet of plug-in unit;And/or
The corresponding data packet of other application relied on comprising the intended application in the corresponding data packet of the intended application, institute It states and does not include the corresponding code of the container in the corresponding data packet of other application;
The plug-in unit and/or other application that the intended application is relied on are loaded, is specifically included:
Load the corresponding data packet of plug-in unit relied on comprising the intended application in the corresponding data packet of the intended application; And/or
Load the corresponding data of other application relied on comprising the intended application in the corresponding data packet of the intended application Packet.
5. the method as described in claim 1 loads the plug-in unit that the intended application is relied on, specifically includes:
According to the configuration file of the plug-in unit, determines and load the class that the plug-in unit is relied on;
Other plug-in units of the determining class of export are searched in the class derived table of record;
Based on other plug-in units found, the plug-in unit is loaded.
6. method as claimed in claim 5, after loading the plug-in unit that the intended application is relied on, the method further includes:
By the class identification record of derived class after the mark of the plug-in unit and the load plug-in unit in class derived table;
After loading the other application that the intended application is relied on, the method further includes:
By the class identification record of derived class after the mark of the other application and the load other application in class derived table In.
7. method as claimed in claim 6, the plug-in unit and/or other application of the container based on load, described in operation The corresponding service code of the intended application for including in data packet, specifically includes:
The container, which determines, runs the class that the corresponding service code of the intended application is relied on;
Judge to run whether the class that the corresponding service code of the intended application is relied on is preassigned class;
If so, searching the class in the corresponding service code of the intended application and loading, with the class based on load Run the corresponding service code of the intended application;
Otherwise, the plug-in unit or other application for exporting the class are searched in the class derived table, and are found based on what is loaded Plug-in unit or other application, run the corresponding service code of the intended application.
8. the method as described in claim 1~7 is any, the intended application is applied for Java, and the container runs on Java On virtual machine, the data packet includes Fat Jar packets.
9. a kind of device of operation application, including:
Parsing module, the corresponding data packet of parsing intended application, the plug-in unit relied on the determination intended application and/or other Using;
Load-on module loads different plug-in units or application by several mutually independent Classloaders with different Classloaders Mode, load the plug-in unit and/or other application that the intended application is relied on;
Module, the plug-in unit based on load and/or other application are run, the target for including is run in the data packet and answers With corresponding service code.
10. device as claimed in claim 9, relied on comprising the intended application in the corresponding data packet of the intended application The corresponding data packet of plug-in unit;And/or
The corresponding data packet of other application relied on comprising the intended application in the corresponding data packet of the intended application, institute It states and does not include the corresponding code of described device in the corresponding data packet of other application;
The load-on module loads the plug-in unit pair relied on comprising the intended application in the corresponding data packet of the intended application The data packet answered;And/or it loads other relied on comprising the intended application in the corresponding data packet of the intended application and answers With corresponding data packet.
11. device as claimed in claim 9, the load-on module is determined according to the configuration file of the plug-in unit described in load The class that plug-in unit is relied on;Other plug-in units of the determining class of export are searched in the class derived table of record;Based on what is found Other plug-in units load the plug-in unit.
12. device as claimed in claim 11, described device further include:
Management module, after the plug-in unit that the load-on module loads that the intended application is relied on, by the mark of the plug-in unit And after the load plug-in unit derived class class identification record in class derived table;The target is loaded in the load-on module After the other application relied on, by derived class after the mark of the other application and the load other application Class identification record is in class derived table.
13. device as claimed in claim 12, the operation module determine and run the corresponding service code of the intended application The class relied on;Judge to run whether the class that the corresponding service code of the intended application is relied on is preassigned class;If It is, then searches the class in the corresponding service code of the intended application and loads, institute is run with the class based on load State the corresponding service code of intended application;Otherwise, the plug-in unit or other application for exporting the class are searched in the class derived table, And based on the plug-in unit found loaded or other application, run the corresponding service code of the intended application.
14. a kind of equipment of operation application, equipment includes one or more memories and processor, and the memory stores journey Sequence, and be configured to execute following steps by one or more of processors:
Start container;
The corresponding data packet of the container analysis intended application, the plug-in unit relied on the determination intended application and/or other Using;
The container loads different plug-in units or application by several mutually independent Classloaders, with different Classloaders Mode loads plug-in unit and/or other application that the intended application is relied on;
The plug-in unit and/or other application of the container based on load, run in the data packet target for including and answer With corresponding service code.
CN201810215743.9A 2018-03-15 2018-03-15 Method, device and equipment for running application Active CN108595246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810215743.9A CN108595246B (en) 2018-03-15 2018-03-15 Method, device and equipment for running application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810215743.9A CN108595246B (en) 2018-03-15 2018-03-15 Method, device and equipment for running application

Publications (2)

Publication Number Publication Date
CN108595246A true CN108595246A (en) 2018-09-28
CN108595246B CN108595246B (en) 2022-03-04

Family

ID=63626393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810215743.9A Active CN108595246B (en) 2018-03-15 2018-03-15 Method, device and equipment for running application

Country Status (1)

Country Link
CN (1) CN108595246B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124525A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Website function implementation method and device
CN112052044A (en) * 2020-08-14 2020-12-08 深圳市欢太科技有限公司 Application loading method and device, storage medium and electronic equipment
WO2021164368A1 (en) * 2020-02-17 2021-08-26 支付宝(杭州)信息技术有限公司 Container application starting method, system, and apparatus, and electronic device
CN114661376A (en) * 2022-03-29 2022-06-24 杭州安恒信息技术股份有限公司 System function expanding method, device, equipment and medium
CN117193874A (en) * 2023-09-05 2023-12-08 北京基调网络股份有限公司 Plug-in processing method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008080522A1 (en) * 2006-12-29 2008-07-10 Sap Ag Web container extension classloading
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
CN105335174A (en) * 2014-07-15 2016-02-17 阿里巴巴集团控股有限公司 Method and device for invocating OSGi service through non-OSGi Java application program
CN105404524A (en) * 2014-09-15 2016-03-16 阿里巴巴集团控股有限公司 Class loading and isolating method and apparatus in Java application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008080522A1 (en) * 2006-12-29 2008-07-10 Sap Ag Web container extension classloading
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
CN105335174A (en) * 2014-07-15 2016-02-17 阿里巴巴集团控股有限公司 Method and device for invocating OSGi service through non-OSGi Java application program
CN105404524A (en) * 2014-09-15 2016-03-16 阿里巴巴集团控股有限公司 Class loading and isolating method and apparatus in Java application

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124525A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Website function implementation method and device
WO2021164368A1 (en) * 2020-02-17 2021-08-26 支付宝(杭州)信息技术有限公司 Container application starting method, system, and apparatus, and electronic device
CN112052044A (en) * 2020-08-14 2020-12-08 深圳市欢太科技有限公司 Application loading method and device, storage medium and electronic equipment
CN114661376A (en) * 2022-03-29 2022-06-24 杭州安恒信息技术股份有限公司 System function expanding method, device, equipment and medium
CN117193874A (en) * 2023-09-05 2023-12-08 北京基调网络股份有限公司 Plug-in processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN108595246B (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN108595246A (en) A kind of method, apparatus and equipment of operation application
KR101736650B1 (en) Method and embedded device for loading driver
US9870317B2 (en) Incremental class unloading in a region-based garbage collector
CN110007920B (en) Method and device for acquiring code dependency relationship and electronic equipment
CN107391101B (en) Information processing method and device
CN107506181A (en) Business processing, data processing method, device and electronic equipment
CN107133502B (en) A kind of processing method and processing device of application program
CN108268289B (en) Parameter configuration method, device and system for web application
CN108282518A (en) A kind of customer terminal webpage generation method and device
CN107368292A (en) A kind of resource Compilation Method and device
CN109582485A (en) A kind of configuration change method for detecting abnormality and device
CN109947643B (en) A/B test-based experimental scheme configuration method, device and equipment
CN111400681B (en) Data authority processing method, device and equipment
CN108595187A (en) Method, device and the storage medium of Android installation kit integrated software development kit
CN109104327A (en) A kind of business diary generation method, device and equipment
CN108279940A (en) A kind of module loading method and apparatus in web container
CN108491468A (en) A kind of document processing method, device and server
CN107038058A (en) A kind of code process method and device
CN108446266A (en) A kind of method, apparatus and equipment that sentence is split
CN106557343A (en) Systematic function application and the method and device of loading resource
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN116432185B (en) Abnormality detection method and device, readable storage medium and electronic equipment
CN107810474B (en) Automatic import and dependency in large-scale source code repository
CN108345536A (en) A kind of dispositions method, device and the equipment of continuous integrating environment
CN109409037A (en) A kind of generation method, device and the equipment of data obfuscation rule

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
TA01 Transfer of patent application right

Effective date of registration: 20201021

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201021

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant