CN103473089A - Distributed JAVA program running method, device and system - Google Patents

Distributed JAVA program running method, device and system Download PDF

Info

Publication number
CN103473089A
CN103473089A CN2013103901166A CN201310390116A CN103473089A CN 103473089 A CN103473089 A CN 103473089A CN 2013103901166 A CN2013103901166 A CN 2013103901166A CN 201310390116 A CN201310390116 A CN 201310390116A CN 103473089 A CN103473089 A CN 103473089A
Authority
CN
China
Prior art keywords
java
static resource
program
node
java program
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
Application number
CN2013103901166A
Other languages
Chinese (zh)
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.)
Shenzhen Huaao Data Technology Co Ltd
Original Assignee
Shenzhen Huaao Data Technology Co 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 Shenzhen Huaao Data Technology Co Ltd filed Critical Shenzhen Huaao Data Technology Co Ltd
Priority to CN2013103901166A priority Critical patent/CN103473089A/en
Publication of CN103473089A publication Critical patent/CN103473089A/en
Priority to PCT/CN2014/080183 priority patent/WO2015027733A1/en
Pending legal-status Critical Current

Links

Images

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

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

The invention provides a distributed JAVA program running method. The method includes: acquiring a start command; starting a corresponding JAVA program according to the start command; acquiring JAVA-program-acquired JAVA classes and static resources stored in other nodes through a preset class loader. The invention further provides a corresponding device and a corresponding system. Program codes and the static resources are centrally managed by a code server, the other nodes store no program codes or static resources, the program codes and static resources are not breached even other nodes are invaded, and accordingly, safety is improved; meanwhile, the nodes required for running JAVA programs only need to acquire required program codes and static resources from the code server, so that less data is loaded.

Description

A kind of distributed java program operating method, device and system
Technical field
The application relates to the java technical field, particularly relates to a kind of distributed java program operating method, device and system.
Background technology
Calculating and the storage capacity of single computer are limited, current can not meet people to system the demand at aspects such as availability and extendabilities.Working procedure on many computing machines of distributed system in network environment, cooperate between each program mutually, jointly completes calculating or the store tasks of appointment.By system load being distributed on many computing machines, distributed system can provide better availability than one-of-a-kind system; By add new computing machine to network, make the distributed system can be at working procedure on multicomputer more, thereby possess horizontal extension.Based on above reason, there is increasing program to be designed to move with distributed way.Yet the deployment of distributed program and operation become new problem.In one-of-a-kind system, program only need be deployed to this locality, then under the scheduling of local process scheduler, moves.Different from one-of-a-kind system, the node at distributed system operation place is computing machine separate in network, and each computer run is operating system independently, uses privately owned storage system and process scheduler.
At present, distributed program mainly contains two kinds of deployment schemes.The first is also that the deployment scheme that the most often adopts is to deposit the copy of a program code and static resource in the local storage system of each node at distributed system operation place, as shown in Figure 1.The second deployment scheme is at first program code and static resource to be stored in to shared memory systems, then set up program code in pointing to shared memory systems and the Symbolic Links of static resource in the local storage system of each node at distributed system operation place, be typically the network file system(NFS) assembly that utilizes operating system to provide, as shown in Figure 2.Above two kinds of deployment schemes all guarantee that program code and static resource can move from program the local storage system access of place node before program operation.Each node that afterwards, just can sign in to distributed system operation place moves each distributed program as the operation stand-alone program.
In implementation process, the present inventor finds, two schemes can move from distributed system whole program codes and the static resource of local storage system access distributed program of any one node at place, comparing can only be from the situation of single node access, and this has increased program code and static resource and has been had a mind to or be not intended to the risk of distorting, destroying or illegally obtain.
Summary of the invention
The application's technical matters to be solved is to provide a kind of distributed java program operating method, device and system, only need obtain corresponding resource while making certain node need to move the java program and, without obtaining all program codes and static resource, increase security.
In order to address the above problem, the application discloses a kind of distributed java program operating method, comprising:
Obtain enabled instruction;
Start corresponding java program according to described enabled instruction;
Obtain by default Classloader the required java class of described java program and the static resource of storing on other node.
Further, also comprise after obtaining the required java class of described java program of storing on other node and static resource by default Classloader:
According to described java class and static resource operation java program.
Further, describedly obtain by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
Further, describedly obtain by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
Further, describedly obtain enabled instruction and comprise:
Obtain the enabled instruction of operator's input.
The application also provides a kind of distributed java program running gear, comprising:
Acquisition module, for obtaining enabled instruction;
Start module, for start corresponding java program according to described enabled instruction;
The resource acquisition module, for obtaining by default Classloader the required java class of described java program and the static resource of storing on other node.
Further, described device also comprises:
The operation module, for moving the java program according to described resource.
Further, described resource acquisition module also for:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
Further, described resource acquisition module also for:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
Further, described acquisition module also for:
Obtain the enabled instruction of operator's input.
The application also provides a kind of distributed java program operational system, comprises at least two running gears; Described running gear is used for, and obtains enabled instruction; Start corresponding java program according to described enabled instruction; Obtain by default Classloader the required java class of described java program and the static resource of storing on other running gear.
Compared with prior art, the application comprises following advantage: the present techniques scheme is because program code and static resource are concentrated by a code server management, other node is save routine code and static resource not, be that other node is invaded also and can not caused divulging a secret of program code and static resource, improved security; Node due to operation java program only need obtain required program code and static resource in code server simultaneously, has reduced the data heap(ed) capacity.
the accompanying drawing explanation
Fig. 1 is the Organization Chart of the program code stored and static resource technical scheme of all nodes in prior art;
Fig. 2 is the Organization Chart of the technical scheme of all nodes memory address link in prior art;
Fig. 3 is the process flow diagram of a kind of distributed java program operating method one embodiment of the present invention;
Fig. 4 is the structural representation of a kind of distributed java program running gear of the present invention one embodiment;
Fig. 5 is the structural representation of a kind of distributed java program operational system of the present invention one embodiment.
Embodiment
For above-mentioned purpose, the feature and advantage that make the application can become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
With reference to Fig. 3, show the process flow diagram of a kind of distributed java program operating method one embodiment of the application;
The distributed java program operating method that the embodiment of the present invention provides comprises:
Step S101, obtain enabled instruction;
Described enabled instruction can be the enabled instruction that the operator is long-range or local terminal is directly inputted.
Main Basis java applet of the present invention can obtain the fact of program code and static resource from comprising any source of local storage system.Consider that the local storage system of described each node from distributed system operation place above obtains many drawbacks of program code and static resource, find the replacement scheme of obtaining program code and static resource from local storage system.In embodiments of the present invention, adopt and to fix configurator code and static resource on a node, other node, when operation java program, obtains required program code and static resource is loaded by specific Classloader on this node.
Java applet need to load java class and static resource from network, the embodiment of the present invention is used a fixed-node (being called code server) to manage all program codes and static resource concentratedly, and follows the download service that specific agreement (as HTTP) provides program code and static resource.The code origin url of all java applets of registering in Console program all needs to point to program code or the static resource in code server.The start-up code server is a process completed in advance, only need carry out once.If there is no special consideration, can be in single program operation code server and Console program, the work of saving independent deployment code server.
Step S102, according to described enabled instruction, start corresponding java program;
Step S103, by default Classloader, obtain the required java class of described java program and the static resource of storing on other node.
Further, describedly also comprise after obtaining by default Classloader the described java program resource requirement of storing on other node:
According to described resource operation java program.
Further, describedly obtain by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
Further, describedly obtain by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
The node that needs designated program operation place during accreditation process, this step Console program is remotely logged into the node of appointment and prepares to start java applet.Java applet in node operation need to be used the Classloader designed previously to load java class and static resource from network, but now may also there is no the byte code files of this Classloader in the local storage system of node.If like this, Console program breaks into Jar bag---being called Bootstrap here---by the bytecode of this Classloader and some other data of using it is uploaded in the temp directory of local storage system of node.Why selection uploads to temp directory, is in order to reduce as far as possible the pollution to the local storage system of node, and most of operating system can empty temp directory after restarting.
Use the virtual machine option of appointment to create JVM, start java applet from Bootstrap, and import main classes, parameter into.Now Console program has signed in to Remote Node RN, and Bootstrap all set, can start java applet at Remote Node RN now.The virtual machine option of supposing use is " Xmx1G ", the class (main classes) at the main method place of java applet is xx.Main, parameter list is " 123 ", use the NetClassLoader designed previously as the system class loader, transmit the code origin url by system property code.urls to NetClassLoader, the code origin url is http: // 192.168.1.10/App, the path of Bootstrap is/tmp/Bootstrap.jar that the order below can carrying out on Remote Node RN starts java applet.
java -Djava.system.class.loader=NetClassLoader -Dcode.urls= http://192.168.1.10/App -Xmx1G -classpath /tmp/Bootstrap.jar xx.Main 1 2 3
Classloader in Bootstrap loads java class, obtains static resource from code server as required.Now Java Virtual Machine creates, and Classloader starts from code server on-demand loading java class and static resource, and java applet brings into operation.
After the scheme that adopts the embodiment of the present invention to provide, because program code and static resource are concentrated by a code server management, other node is save routine code and static resource not, is that other node is invaded also and can not caused divulging a secret of program code and static resource, has improved security; Node due to operation java program only need obtain required program code and static resource in code server simultaneously, has reduced the data heap(ed) capacity.
Please refer to Fig. 4 is the structural representation of a kind of distributed java program running gear of the present invention one embodiment;
The device that the embodiment of the present invention provides comprises:
Acquisition module 41, for obtaining enabled instruction;
Start module 42, for start corresponding java program according to described enabled instruction;
Resource acquisition module 43, for obtaining by default Classloader the required java class of described java program and the static resource of storing on other node.
Further, described device also comprises:
Operation module 44, for moving the java program according to described resource.
Further, described resource acquisition module 43 also for:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
Further, described resource acquisition module 43 also for:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
Further, described acquisition module 41 also for:
Obtain the enabled instruction of operator's input.
Resource acquisition module 43 is by fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtains the required java class of described java program and static resource.
The node that needs designated program operation place during accreditation process, the user can be remotely logged into and specify device provided by the invention to prepare to start java applet by Console program, and now acquisition module 41 gets user's enabled instruction.It can be Classloader that the java applet moved at node need to be used the described resource acquisition module 43 of resource acquisition module 43() load java class and static resource from network.
The structural representation that is a kind of distributed java program operational system of the present invention one embodiment with reference to Fig. 5;
The distributed java program operational system that the embodiment of the present invention provides comprises:
At least two running gears 51; Described running gear 51 for, obtain enabled instruction; Start corresponding java program according to described enabled instruction; Obtain by default Classloader the required java class of described java program and the static resource of storing on other running gear.
The running gear that the embodiment of the present invention adopts can be the device that the corresponding embodiment of Fig. 4 provides.
For device and system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.
Above a kind of distributed java program operating method, the apparatus system that the application is provided, be described in detail, applied specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (12)

1. a distributed java program operating method, is characterized in that, comprising:
Obtain enabled instruction;
Start corresponding java program according to described enabled instruction;
Obtain by default Classloader the required java class of described java program and the static resource of storing on other node.
2. method according to claim 1, is characterized in that, also comprises after obtaining the required java class of described java program of storing on other node and static resource by default Classloader:
According to described java class and static resource operation java program.
3. method according to claim 1 and 2, is characterized in that, describedly obtains by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
4. method according to claim 1 and 2, is characterized in that, describedly obtains by default Classloader the required java class of described java program and the static resource stored on other node and also comprise:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
5. method according to claim 1 and 2, is characterized in that, describedly obtains enabled instruction and comprise:
Obtain the enabled instruction of operator's input.
6. a distributed java program running gear, is characterized in that, comprising:
Acquisition module, for obtaining enabled instruction;
Start module, for start corresponding java program according to described enabled instruction;
The resource acquisition module, for obtaining by default Classloader the required java class of described java program and the static resource of storing on other node.
7. device according to claim 6, is characterized in that, described device also comprises:
The operation module, for moving the java program according to described resource.
8. according to the described device of claim 6 or 7, it is characterized in that, described resource acquisition module also for:
Search java class and static resource according to described java program resource requirement at local terminal; When local terminal java class and static resource do not meet java program operation demand, by default Classloader, obtain java class and the static resource of storing on other node on other node.
9. according to the described device of claim 6 or 7, it is characterized in that, described resource acquisition module also for:
By fixed address link in default Classloader, at other fixed-node of preset all java classes and static resource, obtain the required java class of described java program and static resource.
10. according to the described device of claim 6 or 7, it is characterized in that, described acquisition module also for:
Obtain the enabled instruction of operator's input.
11. a distributed java program operational system, is characterized in that, comprises at least two running gears; Described running gear is used for, and obtains enabled instruction; Start corresponding java program according to described enabled instruction; Obtain by default Classloader the required java class of described java program and the static resource of storing on other running gear.
12. system according to claim 11, is characterized in that, described running gear is the arbitrary described device of claim 6-10.
CN2013103901166A 2013-09-02 2013-09-02 Distributed JAVA program running method, device and system Pending CN103473089A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2013103901166A CN103473089A (en) 2013-09-02 2013-09-02 Distributed JAVA program running method, device and system
PCT/CN2014/080183 WO2015027733A1 (en) 2013-09-02 2014-06-18 Running method, device, and system of distributed java program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103901166A CN103473089A (en) 2013-09-02 2013-09-02 Distributed JAVA program running method, device and system

Publications (1)

Publication Number Publication Date
CN103473089A true CN103473089A (en) 2013-12-25

Family

ID=49797958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103901166A Pending CN103473089A (en) 2013-09-02 2013-09-02 Distributed JAVA program running method, device and system

Country Status (2)

Country Link
CN (1) CN103473089A (en)
WO (1) WO2015027733A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015027733A1 (en) * 2013-09-02 2015-03-05 深圳市华傲数据技术有限公司 Running method, device, and system of distributed java program
CN105808305A (en) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 Static resource loading method and device
CN114064215A (en) * 2021-11-25 2022-02-18 中国建设银行股份有限公司 Method, device, apparatus and computer program product for dynamically deploying modularity

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1281180A (en) * 1999-07-15 2001-01-24 国际商业机器公司 Transparently load resource in ROM for application program
EP1076290A2 (en) * 1999-08-10 2001-02-14 Sun Microsystems, Inc. Method for on-demand network application download and execution
US6223346B1 (en) * 1996-05-30 2001-04-24 Sun Microsystems, Inc. Computer program product having preloaded software module
CN101017436A (en) * 2006-02-01 2007-08-15 佳能株式会社 Execution apparatus and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493870B1 (en) * 1998-03-20 2002-12-10 Sun Microsystems, Inc. Methods and apparatus for packaging a program for remote execution
US6199196B1 (en) * 1998-03-20 2001-03-06 Sun Microsystems, Inc. Methods and apparatus for linking a program for remote execution
CN103473089A (en) * 2013-09-02 2013-12-25 深圳市华傲数据技术有限公司 Distributed JAVA program running method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6223346B1 (en) * 1996-05-30 2001-04-24 Sun Microsystems, Inc. Computer program product having preloaded software module
CN1281180A (en) * 1999-07-15 2001-01-24 国际商业机器公司 Transparently load resource in ROM for application program
EP1076290A2 (en) * 1999-08-10 2001-02-14 Sun Microsystems, Inc. Method for on-demand network application download and execution
CN101017436A (en) * 2006-02-01 2007-08-15 佳能株式会社 Execution apparatus and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015027733A1 (en) * 2013-09-02 2015-03-05 深圳市华傲数据技术有限公司 Running method, device, and system of distributed java program
CN105808305A (en) * 2016-03-29 2016-07-27 北京小米移动软件有限公司 Static resource loading method and device
CN114064215A (en) * 2021-11-25 2022-02-18 中国建设银行股份有限公司 Method, device, apparatus and computer program product for dynamically deploying modularity

Also Published As

Publication number Publication date
WO2015027733A1 (en) 2015-03-05

Similar Documents

Publication Publication Date Title
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
CN106708899B (en) Automatic point burying method and device
EP2893443B1 (en) Re-configuration in cloud computing environments
CN107391104B (en) Client and reactive native code update dependence management method, device and system
EP2791850B1 (en) Identifying application resources through implicit application models
CN105843819B (en) Data export method and device
CN103064717B (en) A kind of apparatus and method of parallel installation of software for cluster system
CN110968331B (en) Method and device for running application program
CN104750528A (en) Management method and device for components in Android program
CN104699537A (en) Program control method, activity module scheduling method and corresponding devices thereof
CN105577813A (en) Update method and system for web hybrid application
US20150293801A1 (en) Apparatus, system and method for application log data processing
CN105700877A (en) Application deployment method and apparatus
CN111897623A (en) Cluster management method, device, equipment and storage medium
CN103473089A (en) Distributed JAVA program running method, device and system
CN103488517A (en) PHP code compiling method and device and PHP code running method and device
CN102831494A (en) Scheduling method, scheduling device and scheduling system
CN104077151A (en) Method for fast starting network application and electronic equipment
CN106502757A (en) A kind of plug-in management method and device
CN104572194B (en) A kind of module loading method and apparatus
CN116974689A (en) Cluster container scheduling method, device, equipment and computer readable storage medium
CN103197950A (en) Plug-in virtual machine implementing method
CN109086059B (en) Code loading updating method, device and server
CN105338058A (en) Application updating method and device
CN102722396B (en) Method and system for loading components

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20131225

RJ01 Rejection of invention patent application after publication