TWI517045B - JAVA cluster application system code loading and upgrading devices and methods - Google Patents

JAVA cluster application system code loading and upgrading devices and methods Download PDF

Info

Publication number
TWI517045B
TWI517045B TW099104474A TW99104474A TWI517045B TW I517045 B TWI517045 B TW I517045B TW 099104474 A TW099104474 A TW 099104474A TW 99104474 A TW99104474 A TW 99104474A TW I517045 B TWI517045 B TW I517045B
Authority
TW
Taiwan
Prior art keywords
category
java
version
library
svn
Prior art date
Application number
TW099104474A
Other languages
Chinese (zh)
Other versions
TW201128532A (en
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 TW099104474A priority Critical patent/TWI517045B/en
Publication of TW201128532A publication Critical patent/TW201128532A/en
Application granted granted Critical
Publication of TWI517045B publication Critical patent/TWI517045B/en

Links

Description

JAVA叢集應用系統碼載入及升級裝置和方法JAVA cluster application system code loading and upgrading device and method

本申請案關於網路技術領域,尤其關於一種JAVA叢集應用系統碼載入裝置和方法。The present application relates to the field of network technologies, and in particular, to a JAVA cluster application system code loading apparatus and method.

叢集系統是由多台同構或異構的電腦連接起來協同完成特定的任務就構成了叢集系統。JAVA叢集應用系統是基於叢集部署的JAVA應用系統。A cluster system is a cluster system that is connected by multiple isomorphic or heterogeneous computers to accomplish specific tasks. The JAVA cluster application system is a JAVA application system based on cluster deployment.

一般的JAVA叢集應用系統,如JAVA的web應用系統,任務叢集系統等,需要在用戶端安裝及部署系統運行所需要的類別庫等。一旦碼或者類別庫需要升級,則需要將最新的碼更新發佈到叢集中的所有伺服器上,並重新啟動各伺服器上的java應用。General JAVA cluster application systems, such as JAVA's web application system, task clustering system, etc., need to install and deploy the category libraries required for system operation on the client side. Once the code or category library needs to be upgraded, the latest code updates need to be posted to all servers in the cluster and the java application on each server is restarted.

發明人透過研究發現,現有JAVA叢集應用系統,無論是碼進行載入還是碼的升級都需要將新載入或者待升級的碼更新發佈到叢集中的所有伺服器上,並且要重新啟動各個伺服器上的java應用,工作量巨大,耗時長,效率非常低下。The inventor found through research that the existing JAVA cluster application system, whether it is code loading or code upgrade, needs to release the newly loaded or updated code updates to all servers in the cluster, and restart each servo. The java application on the device is huge, time consuming, and very inefficient.

有鑒於此,本申請案實施例的目的是提供一種JAVA叢集應用系統碼載入裝置和方法,快速高效地實現碼的載入和升級。In view of this, the purpose of the embodiments of the present application is to provide a JAVA cluster application system code loading apparatus and method, which implements loading and upgrading of codes quickly and efficiently.

為實現上述目的,本申請案實施例提供了如下技術方案:一種JAVA叢集應用系統碼載入的裝置,位於該JAVA叢集的伺服器中,包括:接收單元,用於接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;查找單元,用於根據該類別名從類別註冊資訊中查找該第一JAVA類別的實體的儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號;判斷單元,用於判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;處理單元,用於在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時從該第一JAVA類別的儲存地獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。In order to achieve the above objective, the embodiment of the present application provides the following technical solution: a JAVA cluster application system code loading device, located in the JAVA cluster server, comprising: a receiving unit, configured to receive a category sent by the server In the request, the category loading request carries the category name of the first JAVA category to be loaded; the searching unit is configured to search, according to the category name, the storage address of the entity of the first JAVA category from the category registration information, according to the category name The storage address obtains the latest version number of the first JAVA category from the storage location of the first JAVA category; the determining unit is configured to determine the latest version number of the first JAVA category and the last stored version of the local storage Whether the version number of a JAVA category is the same; the processing unit is configured to: when the latest version number of the first JAVA category is different from the locally stored version number of the first JAVA category that was last loaded from the first JAVA category Storing the latest version of the first JAVA category, loading, and updating the first JAVA category in the version version record; otherwise directly loading the first JAV Category A.

可選地,該查找單元中透過類別位址散列表記錄該類別註冊資訊中的內容。Optionally, the content in the category registration information is recorded in the search unit by using a category address hash table.

可選地,透過該類別地址散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別地址散列表的主鍵的值記錄該第一JAVA類別儲存位址。Optionally, the category name of the first JAVA category is recorded by the primary key of the category address hash table, and the first JAVA category storage address is recorded by the value of the primary key of the category address hash table.

可選地,該查找單元透過類別版本散列表記錄該第一JAVA類別的版本資訊。Optionally, the searching unit records the version information of the first JAVA category by using a category version hash table.

可選地,透過該類別版本散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別版本散列表的主鍵的值記錄上次載入的該第一JAVA類別的版本號。Optionally, the category name of the first JAVA category is recorded by the primary key of the category version hash table, and the version number of the first JAVA category that was last loaded is recorded by the value of the primary key of the category version hash table.

一種類別庫註冊系統,用於維護類別註冊資訊,該系統包括:獲取單元,用於根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;新增單元,用於遍歷該JAVA類別庫,將該類別註冊資訊中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊資訊中;更新單元,用於遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊資訊中對應的JAVA類別的儲存位址。A category library registration system for maintaining category registration information, the system comprising: an obtaining unit, configured to obtain a JAVA category library according to the received JAVA category library storage address; and a new unit for traversing the JAVA category library, A new category included in the JAVA category library is inserted into the category registration information, and an update unit is used to traverse the JAVA category library according to each JAVA category recorded in the JAVA category library. The storage address updates the storage address of the corresponding JAVA category in the registration information.

該類別註冊資訊包括類別名、類別庫名以及該類別庫儲存位址。The category registration information includes the category name, the category library name, and the category library storage address.

一種JAVA叢集應用系統碼載入的方法,用於該JAVA叢集的伺服器中,包括:接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;根據該類別名從類別註冊資訊中查找該第一JAVA類別儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號;判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;在該最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號相同時獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。A JAVA cluster application system code loading method is used in the server of the JAVA cluster, comprising: receiving a category loading request sent by a server, where the category loading request carries a category of a first JAVA category to be loaded Searching for the first JAVA category storage address from the category registration information according to the category name, and obtaining the latest version number of the first JAVA category from the storage location of the first JAVA category according to the storage address; determining the first The latest version number of the JAVA category is the same as the last stored version number of the first JAVA category stored locally; when the latest version number is the same as the version number of the first JAVA category that was last stored locally stored Obtaining the latest version of the first JAVA category, loading, and updating the first JAVA category in the version version record; otherwise, directly loading the first JAVA category.

一種類別庫註冊方法,包括:根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;遍歷該JAVA類別庫,將該類別註冊資訊中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊資訊中;遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊資訊中對應的JAVA類別的儲存位址。A class library registration method includes: obtaining a JAVA class library according to the received JAVA class library storage address; traversing the JAVA class library, and classifying the new category in the JAVA class library that is not yet recorded in the category registration information. Inserting the category registration information; traversing the JAVA category library, and updating the storage address of the corresponding JAVA category in the registration information according to the storage address of each JAVA category recorded in the JAVA category library.

可見,在本申請案實施例中,接收單元,用於接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;查找單元,用於根據該類別名從類別註冊資訊中查找該第一JAVA類別的實體的儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號;判斷單元,用於判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;處理單元,用於在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時從該第一JAVA類別的儲存地獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。本申請案實施例所提供的載入方案,無須將最新碼發佈到叢集中的各伺服器,也無需重啟叢集各伺服器的Java應用,只需要在將碼儲存伺服器,如SVN伺服器中碼進行更新,位於叢集中的各個伺服器就能夠自動地載入最新的碼,提升了JAVA叢集系統的可用性。It can be seen that, in the embodiment of the present application, the receiving unit is configured to receive a category loading request sent by the server, where the category loading request carries a category name of the first JAVA category to be loaded, and a searching unit, configured to The category name is used to search for the storage address of the entity of the first JAVA category from the category registration information, and obtain the latest version number of the first JAVA category from the storage location of the first JAVA category according to the storage address; Determining whether the latest version number of the first JAVA category is the same as the last stored version number of the first JAVA category stored locally; the processing unit is configured to store the latest version number of the first JAVA category with the local version When the version number of the first JAVA category that was last loaded is different, the latest JAVA category is obtained from the storage location of the first JAVA category, and the first JAVA category is recorded in the category version. The version number is updated; otherwise the first JAVA category is loaded directly. The loading scheme provided by the embodiment of the present application does not need to publish the latest code to each server in the cluster, nor does it need to restart the Java application of the cluster server, and only needs to store the code in a server, such as an SVN server. The code is updated, and each server located in the cluster can automatically load the latest code, which improves the usability of the JAVA cluster system.

為了使本技術領域的人員更好地理解本申請案中的技術方案,下面將結合本申請案實施例中的附圖,對本申請案實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本申請案一部分實施例,而不是全部的實施例。基於本申請案中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都應當屬於本申請案保護的範圍。In order to enable a person skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. The described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope should fall within the scope of the present application.

圖1為本申請案一實施例所提供的JAVA叢集應用系統碼載入的裝置的結構示意圖,該裝置位於該JAVA叢集的每個伺服器中。該裝置包括:接收單元101、查找單元102、判斷單元103以及處理單元104,其中:接收單元101,用於接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;第一JAVA類別用來指代類別載入請求中待載入的JAVA類別,例如某個待載入的JAVA類別可以是com.foo.helloworld。FIG. 1 is a schematic structural diagram of an apparatus for code loading of a JAVA cluster application system according to an embodiment of the present application, where the apparatus is located in each server of the JAVA cluster. The device includes: a receiving unit 101, a searching unit 102, a determining unit 103, and a processing unit 104, wherein: the receiving unit 101 is configured to receive a category loading request sent by the server, where the category loading request carries the to-be-loaded The category name of a JAVA category; the first JAVA category is used to refer to the JAVA category to be loaded in the category load request. For example, a JAVA category to be loaded may be com.foo.helloworld.

查找單元102,用於根據該類別名從類別註冊資訊中查找該第一JAVA類別儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號;可以透過表格對類別註冊資訊進行記錄,例如,本申請案一實施例中,透過類別註冊表記錄該類別註冊資訊。The searching unit 102 is configured to search the first JAVA category storage address from the category registration information according to the category name, and obtain the latest version number of the first JAVA category from the storage location of the first JAVA category according to the storage address; The category registration information can be recorded through a form. For example, in an embodiment of the present application, the category registration information is recorded through a category registry.

類別註冊表(ClassTable)可以保存在資料庫中,用來記錄JAVA類別及各個JAVA類別的儲存位址。圖2為本申請案實施例所提供裝置的一個應用場景圖。圖中,類別註冊表保存在在201中,本申請案實施例提供的碼202所在的203與資料庫201連接,該載入裝置202能夠與資料庫201通信,讀取該資料庫201中類別註冊表的資訊。The ClassTable can be stored in the database to record the JAVA category and the storage address of each JAVA category. FIG. 2 is a schematic diagram of an application scenario of an apparatus provided in an embodiment of the present application. In the figure, the category registry is stored in 201, and the 203 of the code 202 provided in the embodiment of the present application is connected to the database 201, and the loading device 202 can communicate with the database 201 to read the category in the database 201. Registry information.

JAVA類別一般是打包在jar格式的壓縮包中。本申請案實施例仍然採用這種方式,參見圖2,本申請案實施例中,將JAVA類別打包成jar包後,將jar包上傳到204上。透過SVN伺服器保存jar包並記錄各個jar包的版本資訊。SVN(Subversion)是一種流行的源碼版本控制系統,SVN伺服器是Subversion用於儲存和管理源碼的伺服器。儲存在SVN伺服器上的每個jar包都會有一個SVN位址,根據這個SVN位址可以對jar包進行查找。The JAVA category is generally packaged in a compressed package in jar format. The embodiment of the present application still adopts this manner. Referring to FIG. 2, in the embodiment of the present application, after the JAVA category is packaged into a jar package, the jar package is uploaded to 204. Save the jar package through the SVN server and record the version information of each jar package. SVN (Subversion) is a popular source version control system. SVN server is the server that Subversion uses to store and manage source code. Each jar package stored on the SVN server will have an SVN address, and the jar package can be searched according to the SVN address.

圖2中,伺服器203與資料庫201連接,位於伺服器203中的載入裝置202能夠與SVN伺服器通信,根據各個jar包的位址從SVN伺服器中獲取各個JAVA類別。In FIG. 2, the server 203 is connected to the database 201. The loading device 202 located in the server 203 is capable of communicating with the SVN server, and each JAVA class is obtained from the SVN server according to the address of each jar package.

表1為本申請案一實施例所提供的類別註冊表的例子,類別註冊表中記錄的資訊包括JAVA類別名、該JAVA類別所屬的jar包的名稱以及該JAVA類別所屬的jar包對應的SVN地址。Table 1 is an example of a category registry provided by an embodiment of the present application. The information recorded in the category registry includes a JAVA category name, a name of a jar package to which the JAVA category belongs, and an SVN corresponding to the jar package to which the JAVA category belongs. address.

表1的示例中給出的JAVA類別的類別名為:com.foo.helloworld;該JAVA類別所屬的jar包的名稱為hello-biz;該JAVA類別所屬的jar包對應的SVN地址為:http://svn.foo-inc.com/repos/example/hello.jar。The name of the JAVA category given in the example in Table 1 is: com.foo.helloworld; the name of the jar package to which the JAVA category belongs is hello-biz; the SVN address corresponding to the jar package to which the JAVA category belongs is: http: //svn.foo-inc.com/repos/example/hello.jar.

SVN伺服器對JAVA類別的每一次更新都進行記錄。用戶每次修改JAVA碼,並將修改後的JAVA碼透過SVN用戶端軟體提交到SVN伺服器後,SVN伺服器都會為修改後的JAVA碼生成一個新的版本,並對新的版本進行記錄,實際應用中,可以透過版本號記錄各個版本的JAVA碼。對於同一個JAVA類別,版本越新則對應的版本號越大。例如一個JAVA類別,它的當前版本號是15516,若某用戶對這個JAVA類別進行了修改,並將修改提交到SVN伺服器,SVN伺服器會將版本號升級到15517,而原先的15516那個版本成為歷史版本。The SVN server records every update to the JAVA category. Each time the user modifies the JAVA code and submits the modified JAVA code to the SVN server through the SVN client software, the SVN server generates a new version for the modified JAVA code and records the new version. In practical applications, each version of the JAVA code can be recorded by the version number. For the same JAVA category, the newer version will be the corresponding version number. For example, a JAVA category, its current version number is 15516. If a user modifies this JAVA category and submits the changes to the SVN server, the SVN server will upgrade the version number to 15517, and the original version of 15516. Become a historical version.

為了提高資料的查找速度,在本申請案的一些實施例中,查找單元可以分別透過類別位址散列表和類別版本散列表記錄該第一JAVA類別的位址資訊和版本資訊。In order to improve the speed of searching for data, in some embodiments of the present application, the searching unit may record the address information and version information of the first JAVA category through the category address hash table and the category version hash table, respectively.

具體地,可以透過該類別位址散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別地址散列表主鍵的主鍵的值記錄該第一JAVA類別的儲存位址。Specifically, the category name of the first JAVA category may be recorded by the primary key of the category address hash table, and the storage address of the first JAVA category is recorded by the value of the primary key of the category address hash table primary key.

表2為一個類別位址散列表,從表中可以看出,JAVA類別被打包在jar包中,jar包儲存在SVN伺服器上。該類別地址散列表透過主鍵(key)記錄類別名,表2中,該類別名為com.foo.helloworld;透過主鍵的主鍵的值(value)記錄JAVA類別所屬的jar包的SVN地址,表2中,該地址為Table 2 shows a category address hash table. As can be seen from the table, the JAVA category is packaged in the jar package, and the jar package is stored on the SVN server. The category address hash table records the category name through the primary key (key). In the table 2, the category name is com.foo.helloworld; the value of the primary key of the primary key is used to record the SVN address of the jar package to which the JAVA category belongs, Table 2 Medium, the address is

http://svn.foo-inc.com/repos/example/helloworld.jar。Http://svn.foo-inc.com/repos/example/helloworld.jar.

表3為一個類別版本散列表,主鍵(key)用於記錄類別名,表3中,該類別名為com.foo.helloworld;主鍵的值(value)用於記錄JAVA類別所屬的jar包上一次載入的SVN版本號,表3中,com.foo.helloworld類別所屬的jar包上次載入的版本號為:22162。Table 3 is a category version hash table, the primary key (key) is used to record the category name, in Table 3, the category name is com.foo.helloworld; the value of the primary key (value) is used to record the jar package to which the JAVA category belongs. The loaded SVN version number, in Table 3, the last loaded version number of the jar package to which the com.foo.helloworld category belongs is: 22162.

判斷單元103,用於判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;類別註冊資訊中記錄了所有已經註冊的類別的資訊,而本申請案實施例中透過類別版本散列表和類別地址散列表記錄本地的JAVA應用所用到的類別的位址和版本資訊。The determining unit 103 is configured to determine whether the latest version number of the first JAVA category is the same as the version number of the first JAVA category that is stored locally last time; the category registration information records information of all the registered categories. In the embodiment of the present application, the address and version information of the category used by the local JAVA application is recorded through the category version hash table and the category address hash table.

處理單元104,用於在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時,從該第一JAVA類別的儲存地獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。The processing unit 104 is configured to: when the latest version number of the first JAVA category is different from the locally stored version number of the first JAVA category that was last loaded, obtain the latest version from the storage location of the first JAVA category The first JAVA category is loaded, and the first JAVA category is updated in the version number of the category version record; otherwise the first JAVA category is directly loaded.

處理單元每次載入類別時,都會透過類別版本號判斷該類別所在的jar包在SVN上是否有更新,如果有更新,則將查找單元中的類別版本散列表中對應的版本號更新為最新的主鍵的值。Each time the processing unit loads the category, it will judge whether the jar package of the category is updated on the SVN through the category version number. If there is an update, update the corresponding version number in the category version hash table in the search unit to the latest version. The value of the primary key.

在本申請案實施例中,如果某個JAVA類別已經被載入過,並且版本一致,類別載入裝置就會從本地直接載入該類別並運行;如果版本不一致,則需要從伺服器上去獲取最新的版本JAVA類別,載入並運行。In the embodiment of the present application, if a JAVA category has been loaded and the version is consistent, the category loading device loads the category directly from the local and runs; if the versions are inconsistent, the server needs to be obtained from the server. The latest version of the JAVA category, loaded and run.

參見圖3,本申請案一實施例所提供的載入裝置將JAVA類別打包在jar格式的壓縮包中,並將jar包儲存在SVN伺服器中時,圖1所示的處理單元具體包括:第一獲取子單元301,用於在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時獲取最新版本的該第一JAVA類別所屬的jar包對應的SVN位址;第二獲取子單元302,用於根據該SVN位址獲取最新版本的該第一JAVA類別;第一處理子單元303,用於載入該第一JAVA類別,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;第二處理子單元304,用於在該最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號相同時直接載入該第一JAVA類別。Referring to FIG. 3, when the loading device provided by the embodiment of the present application packs the JAVA category in a compressed package in a jar format, and the jar package is stored in the SVN server, the processing unit shown in FIG. 1 specifically includes: The first obtaining sub-unit 301 is configured to obtain the latest version of the jar to which the first JAVA category belongs when the latest version number of the first JAVA category is different from the locally stored version number of the first JAVA category that was last loaded. The SVN address corresponding to the packet; the second obtaining sub-unit 302 is configured to obtain the latest JAVA category according to the SVN address; the first processing sub-unit 303 is configured to load the first JAVA category, and The first JAVA category is updated in the version number record; the second processing sub-unit 304 is configured to directly directly when the latest version number is the same as the locally stored version number of the first JAVA category that was last loaded Load the first JAVA category.

現有的碼載入方案,需要頻繁的將最新的碼發佈到叢集的各伺服器上,比較耗時,浪費人力物力。尤其是在叢集中伺服器比較多的情況下,碼載入的效率就更為低下。本申請案實施例所提供的載入裝置,無須將最新碼發佈到叢集中的各伺服器,也無需重啟叢集各伺服器的Java應用,只需要在將碼儲存伺服器,如SVN伺服器中碼進行更新,位於叢集中的各個伺服器就能夠自動地載入最新的碼,提升了JAVA叢集系統的可用性,提高了碼載入的效率。The existing code loading scheme requires frequent uploading of the latest code to each server of the cluster, which is time consuming and wastes manpower and material resources. Especially in the case of a large number of cluster servers, the efficiency of code loading is even lower. The loading device provided by the embodiment of the present application does not need to publish the latest code to each server in the cluster, nor does it need to restart the Java application of the cluster server, and only needs to store the code in a server, such as an SVN server. The code is updated, and each server located in the cluster can automatically load the latest code, which improves the usability of the JAVA cluster system and improves the efficiency of code loading.

此外,現有的碼載入方案中,在程式載入過程中,如果出現叢集中的某幾台伺服器的碼漏升級了,或者部分伺服器碼升級失敗了,則會出現叢集中各伺服器新老不同版本的碼同時運行的情況,可能會破壞資料,造成不可逆的嚴重後果。而本申請案實施例提供的碼載入裝置使得各個伺服器能夠根據碼儲存伺服器,如SVN伺服器中的碼進行更新,保證各個伺服器都能自動地載入到最新的版本,避免了因各伺服器因為新老不同版本的碼同時運行產生破壞資料情況的出現,從而避免了不可逆的嚴重後果的出現,提高了整個JAVA集成應用系統運行的安全性。In addition, in the existing code loading scheme, if the code leak of some servers in the cluster is upgraded during the program loading process, or some server code upgrade fails, the servers in the cluster will appear. The simultaneous operation of different versions of new and old codes may damage the data and cause irreversible and serious consequences. The code loading device provided in the embodiment of the present application enables each server to update according to a code storage server, such as a code in the SVN server, to ensure that each server can automatically load into the latest version, thereby avoiding Because each server generates the destruction of data due to the simultaneous operation of different versions of the code, it avoids the serious consequences of irreversibility and improves the security of the entire JAVA integrated application system.

為了進一步保證載入裝置能夠從類別註冊表中獲得準確地最全面的類別資訊,本申請案實施例還提供一種類別庫註冊系統,專門用於維護類別註冊表,參見圖4,該類別庫註冊系統包括:獲取單元401,用於根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;新增單元402,用於遍歷該JAVA類別庫,將該類別註冊表中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊表中;更新單元403,用於遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址。In order to further ensure that the loading device can obtain accurate and most comprehensive category information from the category registry, the embodiment of the present application further provides a category library registration system, which is specifically used to maintain the category registry, see FIG. 4, the category library registration The system includes: an obtaining unit 401, configured to obtain a JAVA category library according to the received JAVA category library storage address; a new unit 402, configured to traverse the JAVA category library, and include the unregistered in the category registry The new category in the JAVA category library is inserted into the category registry; the updating unit 403 is configured to traverse the JAVA category library, and update the corresponding JAVA in the registry according to the storage address of each JAVA category recorded in the JAVA category library. The storage address of the category.

本申請案實施例所提供的類別庫註冊系統能夠即時將JAVA類別庫中的新類別記錄到類別註冊表中,並且能夠對已經記錄在類別註冊表中的JAVA類別,也能夠根據JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址,以保證類別註冊表中始終記錄的是最新的最全的JAVA類別資訊,為載入裝置的載入工作提供有力的保障。The category library registration system provided by the embodiment of the present application can instantly record the new category in the JAVA category library into the category registry, and can also be used in the JAVA category that has been recorded in the category registry, and can also be in the JAVA category library. The storage address of each JAVA category is updated to update the storage address of the corresponding JAVA category in the registry, so as to ensure that the latest and most complete JAVA category information is always recorded in the category registry, and the loading device is loaded. Provide a strong guarantee.

本申請案實施例還提供一種JAVA叢集應用系統碼載入的方法,用於該JAVA叢集的伺服器中,參見圖5,該方法包括:S501,接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;S502,根據該類別名從類別註冊表中查找該第一JAVA類別儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號;為了提高資料的查找速度,在本申請案的一些實施例中,可以透過類別位址散列表記錄該類別註冊表中的內容。具體地,可以透過該類別位址散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別地址散列表的主鍵的值記錄該第一JAVA類別儲存位址。The embodiment of the present application further provides a method for code loading of a JAVA cluster application system. In the server for the JAVA cluster, referring to FIG. 5, the method includes: S501, receiving a category loading request sent by a server, the category The loading request carries the category name of the first JAVA category to be loaded; S502, searching for the first JAVA category storage address from the category registry according to the category name, according to the storage address from the first JAVA category The storage device obtains the latest version number of the first JAVA category; in order to improve the search speed of the data, in some embodiments of the present application, the content in the category registry may be recorded through the category address hash table. Specifically, the category name of the first JAVA category may be recorded through the primary key of the category address hash table, and the first JAVA category storage address is recorded by the value of the primary key of the category address hash table.

可選地,還可以透過類別版本散列表記錄該第一JAVA類別的版本資訊,具體地,透過該類別版本散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別版本散列表的主鍵的值記錄上次載入的該第一JAVA類別的版本資訊。Optionally, the version information of the first JAVA category may also be recorded by using a category version hash table. Specifically, the category name of the first JAVA category is recorded by using a primary key of the category version hash table, and the primary key of the category version hash table is used. The value of the record records the version information of the first JAVA category that was last loaded.

S503,判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;S504,在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。S503. Determine whether the latest version number of the first JAVA category is the same as the last stored version number of the first JAVA category stored locally; S504, the latest version number of the first JAVA category and the last stored locally. When the version number of the first JAVA category is different, the first JAVA category of the latest version is acquired, the loading is performed, and the version number of the first JAVA category is updated in the category version record; otherwise, the version is directly loaded. The first JAVA category.

為了進一步保證圖5所示的載入方法的實現,本申請案實施例還提供一種類別庫註冊方法,參見圖6,該方法包括:S601,根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;S602,遍歷該JAVA類別庫,將該類別註冊表中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊表中;該類別註冊表中的內容包括類別名、類別庫名以及該類別庫儲存位址。In order to further ensure the implementation of the loading method shown in FIG. 5, the embodiment of the present application further provides a class library registration method. Referring to FIG. 6, the method includes: S601, obtaining a JAVA category according to the received JAVA class library storage address. a library; 602, traversing the JAVA category library, inserting a new category in the category registry that is not recorded in the JAVA category library into the category registry; the content in the category registry includes a category name, a category The library name and the storage address of the category library.

S603,遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址。S603. Traverse the JAVA category library, and update a storage address of the corresponding JAVA category in the registry according to the storage address of each JAVA category recorded in the JAVA category library.

本申請案實施例所提供的方法透過S602實現了對新類別的登記,保證了JAVA類別庫的完整性,透過S603能夠即時地對各個JAVA類別的儲存位址進行更新,保證了JAVA類別庫所保存資訊的準確性,為順利實現圖5所示的方法提供了有利的保障。The method provided by the embodiment of the present application realizes the registration of the new category through S602, and ensures the integrity of the JAVA category library. The storage address of each JAVA category can be updated in real time through the S603, and the JAVA category library is guaranteed. The accuracy of the information saved provides a favorable guarantee for the smooth implementation of the method shown in FIG.

圖7為本申請案另一實施例所提供的碼裝置方法,在該方法中,程式師甲寫了一個JAVA類別,該JAVA類別的功能是在網頁上列印“hello,world”這句話。這個類別的檔案名是helloworld.class,被打包在hello.jar這個JAVA包中,被上傳到SVN伺服器。FIG. 7 is a code device method according to another embodiment of the present application, in which a programmer writes a JAVA category, and the function of the JAVA category is to print the phrase “hello, world” on a webpage. . The file name for this category is helloworld.class, which is packaged in the JAVA package hello.jar and uploaded to the SVN server.

本申請案實施例中,hello.jar這個JAVA包中所有的類別以及hello.jar這個JAVA包對應SVN伺服器的url記入被記入類別註冊表(ClassTable)中。In the embodiment of the present application, all the categories in the JAVA package of hello.jar and the url of the JAV package corresponding to the SVN server of the hello.jar are recorded in the category registry (ClassTable).

當JAVA叢集中的某個伺服器上的一個程式aaaa在執行過程中需要調用helloworld.class這個類別時,本申請案實施例所提供的碼裝置方法具體為:S701、當程式aaaa啟動的時候,位於該伺服器中的類別載入裝置遍歷ClassTable中的記錄,將所有的類別以及對應的SVN URL記錄到本地的類別位址散列表(SvnUrlMap)裏。When a program aaaa on a certain server in the JAVA cluster needs to call the category helloworld.class during the execution, the code device method provided by the embodiment of the present application is specifically: S701, when the program aaaa is started, The class loading device located in the server traverses the records in the ClassTable, and records all categories and corresponding SVN URLs into the local class address hash table (SvnUrlMap).

S702、當程式aaaa執行到調用helloworld.class時,類別載入裝置從SvnUrlMap中找到helloworld.class對應jar包的SVN URL。S702. When the program aaaa is executed to call helloworld.class, the category loading device finds the SVN URL of the jar package corresponding to helloworld.class from the SvnUrlMap.

S703、根據SVN URL訪問SVN伺服器,獲取helloworld.class所對應的hello.jar包,並獲取helloworld.class的最新版本號。S703. Access the SVN server according to the SVN URL, obtain the hello.jar package corresponding to helloworld.class, and obtain the latest version number of helloworld.class.

例如此時,helloworld.class的最新版本號為10000。For example, at this time, the latest version number of helloworld.class is 10000.

S704、將helloworld.class的類別名以及最新版本號記入本地的版本散列表(ClassVersionMap),該散列表的key為“helloworld”,主鍵的值為10000。S704: Record the category name of the helloworld.class and the latest version number into the local version hash table (ClassVersionMap), the key of the hash table is “helloworld”, and the value of the primary key is 10000.

S705、從SVN伺服器下載helloworld.class。S705. Download helloworld.class from the SVN server.

S706、載入helloworld.class並運行該類別。S706, load helloworld.class and run the category.

假設在此之後,程式師甲又修改了helloworld.class,並重新打包hello.jar,然後提交到SVN伺服器,SVN伺服器接受了最新的hello.jar,並產生了一個最新的版本號10001。Suppose that after this, the programmer A modified helloworld.class, and repackaged hello.jar, and then submitted to the SVN server, the SVN server accepted the latest hello.jar, and produced a new version number 10001.

此時aaaa若再次運行,當它再次要調用helloworld.class的時候,參見圖8,本申請案實施例所提供的載入方法為:S801、aaaa所在的伺服器中的載入裝置根據“helloworld”從SvnUrlMap中查找到對應的SVN URL。At this time, if aaaa is run again, when it wants to call helloworld.class again, referring to FIG. 8, the loading method provided by the embodiment of the present application is: S801, the loading device in the server where aaaa is located according to "helloworld" "Find the corresponding SVN URL from SvnUrlMap.

因為透過圖7所示的方法,helloworld這個類別的資訊已經被記錄在本次,所以當該方法再次調用該類別時,可以直接從本地的SvnUrlMap中查找該類別對應的SVN URL。Because the information of the category helloworld has been recorded in this time through the method shown in FIG. 7, when the method calls the category again, the SVN URL corresponding to the category can be directly searched from the local SvnUrlMap.

S802、根據SVN URL訪問SVN伺服器,獲取helloworld.class的最新版本號為10001,S803、將helloworld.class的最新版本號與本地儲存的ClassVersionMap中記錄的helloworld.class的版本號進行比較,判斷兩者是否一致,如果一致,進入步驟S805,否則進入S804。S802. Access the SVN server according to the SVN URL, obtain the latest version number of helloworld.class is 10001, S803, compare the latest version number of helloworld.class with the version number of helloworld.class recorded in the locally stored ClassVersionMap, and judge two Whether they are consistent, if they are consistent, go to step S805, otherwise go to S804.

本申請案實施例中,本地記錄的helloworld.class的版本號為10000,而從SVN伺服器上獲得的helloworld.class最新的版本號為10001,透過比較發現helloworld.class最新的版本號比本地記錄的版本號要大,說明helloworld.class更新了。In the embodiment of the present application, the version number of the locally recorded helloworld.class is 10000, and the latest version number of helloworld.class obtained from the SVN server is 10001, and the latest version number of helloworld.class is found to be better than the local record by comparison. The version number is larger, indicating that helloworld.class is updated.

S804、根據SVN URL從SVN伺服器上下載最新的helloworld.class。S804. Download the latest helloworld.class from the SVN server according to the SVN URL.

S805、載入helloworld.class,並且運行。S805, load helloworld.class, and run.

本申請案實施例所提供的方法,預先對各個新類別進行登記。當某個類別可能被調用時,根據該類別的登記資訊獲取該類別的儲存位址,並透過儲存位址從該類別的儲存地獲得該類別的版本資訊,透過比較獲得該類別最新的版本,並進行載入和調用。本申請案實施例所提供的方法無須將最新碼發佈到叢集中的各伺服器,也無需重啟叢集各伺服器的JAVA應用,只需要在將碼儲存伺服器,如SVN伺服器中碼進行更新,位於叢集中的各個伺服器就能夠自動地載入最新的碼,提升了JAVA叢集系統的可用性,提高了碼載入的效率。The method provided by the embodiment of the present application registers each new category in advance. When a category is likely to be called, the storage address of the category is obtained according to the registration information of the category, and the version information of the category is obtained from the storage location of the category through the storage address, and the latest version of the category is obtained through comparison. And load and call. The method provided by the embodiment of the present application does not need to release the latest code to each server in the cluster, and does not need to restart the JAVA application of each server of the cluster, and only needs to update the code in the code storage server, such as the SVN server. Each server in the cluster can automatically load the latest code, which improves the usability of the JAVA cluster system and improves the efficiency of code loading.

為了描述的方便,本申請案實施例在描述裝置時以功能分為各種單元分別描述。當然,在實施本申請案時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。For convenience of description, the embodiments of the present application are separately described in terms of functions by various units when describing the device. Of course, the functions of each unit can be implemented in the same software or software and/or hardware in the implementation of the present application.

透過以上的實施方式的描述可知,本領域的技術人員可以清楚地瞭解到本申請案可借助軟體加必需的通用硬體平臺的方式來實現。基於這樣的理解,本申請案的技術方案本質上或者說對現有技術做出貢獻的部分可以以軟體產品的形式體現出來,該電腦軟體產品可以儲存在儲存介質中,如ROM/RAM、磁碟、光碟等,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)執行本申請案各個實施例或者實施例的某些部分該的方法。It will be apparent to those skilled in the art from the above description of the embodiments that the present application can be implemented by means of a software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. , optical discs, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present application or portions of the embodiments.

本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

本申請案可用於眾多通用或專用的計算系統環境或配置中。例如:個人電腦、伺服器電腦、手持設備或可擕式設備、平板型設備、多處理器系統、基於微處理器的系統、置頂盒、可編程的消費電子設備、網路PC、小型電腦、大型電腦、包括以上任何系統或設備的分散式計算環境等等。This application can be used in numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, small computers, Large computers, decentralized computing environments including any of the above systems or devices, and more.

本申請案可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類別型的常式、程式、物件、元件、資料結構等等。也可以在分散式計算環境中實踐本申請案,在這些分散式計算環境中,由透過通信網路而被連接的遠端處理設備來執行任務。在分散式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠端電腦儲存介質中。The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data categories. The present application can also be practiced in a decentralized computing environment in which tasks are performed by remote processing devices that are coupled through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media, including storage devices.

雖然透過實施例描繪了本申請案,本領域普通技術人員知道,本申請案有許多變形和變化而不脫離本申請案的精神,希望所附的申請專利範圍包括這些變形和變化而不脫離本申請案的精神。While the present invention has been described by way of example, it will be understood by those skilled in the art The spirit of the application.

101...接收單元101. . . Receiving unit

102...查找單元102. . . Search unit

103...判斷單元103. . . Judging unit

104...處理單元104. . . Processing unit

201...資料庫201. . . database

202...碼載入裝置202. . . Code loading device

203...伺服器203. . . server

204...SVN伺服器204. . . SVN server

301...第一獲取子單元301. . . First acquisition subunit

302...第二獲取子單元302. . . Second acquisition subunit

303...第一處理子單元303. . . First processing subunit

304...第二處理子單元304. . . Second processing subunit

401...獲取單元401. . . Acquisition unit

402...新增單元402. . . New unit

403...更新單元403. . . Update unit

為了更清楚地說明本申請案實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請案中記載的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動性的前提下,還可以根據這些附圖獲得其他的附圖。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are merely Some of the embodiments described in the present application can also obtain other drawings based on these drawings without departing from the prior art for those skilled in the art.

圖1為本申請案一實施例所提供的裝置的結構示意圖;1 is a schematic structural diagram of an apparatus according to an embodiment of the present application;

圖2為本申請案另一實施例所提供本申請案實施例所提供的裝置的應用場景結構示意圖;2 is a schematic structural diagram of an application scenario of an apparatus provided by an embodiment of the present application according to another embodiment of the present application;

圖3為本申請案一實施例所提供裝置中一單元的結構示意圖;3 is a schematic structural diagram of a unit in an apparatus according to an embodiment of the present application;

圖4為本申請案一實施例所提供的一系統的結構示意圖;4 is a schematic structural diagram of a system according to an embodiment of the present application;

圖5為本申請案一實施例所提供的一方法的流程圖;FIG. 5 is a flowchart of a method according to an embodiment of the present disclosure;

圖6為本申請案一實施例所提供的另一種方法的流程圖;6 is a flow chart of another method provided by an embodiment of the present application;

圖7為本申請案一實施例所提供的方法的流程圖;Figure 7 is a flowchart of a method provided by an embodiment of the present application;

圖8為本申請案另一實施例所提供的方法的流程圖。FIG. 8 is a flowchart of a method provided by another embodiment of the present application.

101...接收單元101. . . Receiving unit

102...查找單元102. . . Search unit

103...判斷單元103. . . Judging unit

104...處理單元104. . . Processing unit

Claims (12)

一種JAVA叢集應用系統碼載入的裝置,其特徵在於,位於該JAVA叢集的伺服器中,包括:接收單元,用於接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;查找單元,用於根據該類別名從類別註冊資訊中查找該第一JAVA類別的實體的儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號,其中,該類別註冊資訊透過類別註冊表記錄,該類別註冊資訊包括JAVA類別名、該JAVA類別所屬的jar包的名稱以及該JAVA類別所屬的jar包對應的SVN位址,該類別註冊表保存於資料庫中,透過與該資料庫通信讀取類別註冊表中的資訊,其中,該類別註冊表由類別庫註冊系統維護,該類別庫註冊系統將JAVA類別庫中的新類別註記錄到類別註冊表,該類別庫註冊系統根據JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址,該SVN位址為儲存在SVN伺服器上的jar包對應的儲存位址,該SVN伺服器對JAVA類別的每一次更新都進行記錄,用戶每次修改JAVA代碼,並將修改後的JAVA代碼透過SVN客戶端軟體提交到SVN伺服器後,SVN伺服器都會為修改後的JAVA代碼產生一個新的版本,並對新的版本進行記錄,透過版本號記錄各個版本的JAVA代碼;判斷單元,用於判斷該第一JAVA類別的最新版本號 與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;及處理單元,用於在該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號不同時從該第一JAVA類別的儲存地獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。 An apparatus for code loading of a JAVA cluster application system, characterized in that the server located in the JAVA cluster includes: a receiving unit, configured to receive a category loading request sent by a server, where the category loading request carries a category name of the first JAVA category; a search unit, configured to search for a storage address of the entity of the first JAVA category from the category registration information according to the category name, and store from the first JAVA category according to the storage address Obtaining the latest version number of the first JAVA category, wherein the category registration information is recorded through a category registry, the category registration information including a JAVA category name, a name of a jar package to which the JAVA category belongs, and a jar package to which the JAVA category belongs. Corresponding SVN address, the category registry is stored in the database, and the information in the category registry is read by communicating with the database, wherein the category registry is maintained by the category library registration system, and the category library registration system will The new category note in the JAVA category library is recorded to the category registry, which is based on the storage address of each JAVA category recorded in the JAVA category library. The storage address of the corresponding JAVA category in the new registry, the SVN address is a storage address corresponding to the jar package stored on the SVN server, and the SVN server records each update of the JAVA category, the user Each time the JAVA code is modified and the modified JAVA code is submitted to the SVN server through the SVN client software, the SVN server will generate a new version for the modified JAVA code and record the new version. The version number records the JAVA code of each version; the judging unit is configured to judge the latest version number of the first JAVA category Whether it is the same as the last stored version number of the first JAVA category stored locally; and a processing unit for the latest version number of the first JAVA category and the last stored first JAVA category stored locally The version number of the first JAVA category is not loaded from the storage location of the first JAVA category, the first JAVA category is loaded, and the version number of the first JAVA category is updated in the category version record; otherwise, the version is directly loaded. The first JAVA category. 根據申請專利範圍第1項所述的裝置,其中,該查找單元中透過類別位址散列表記錄該類別註冊資訊中的內容。 The device according to claim 1, wherein the search unit records the content in the category registration information by using a category address hash table. 根據申請專利範圍第2項所述的裝置,其中,透過該類別地址散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別地址散列表的主鍵的值記錄該第一JAVA類別儲存位址。 The device of claim 2, wherein the category name of the first JAVA category is recorded by a primary key of the category address hash table, and the first JAVA category storage location is recorded by a value of a primary key of the category address hash table. site. 根據申請專利範圍第1項所述的裝置,其中,該查找單元透過類別版本散列表記錄該第一JAVA類別的版本資訊。 The device of claim 1, wherein the search unit records version information of the first JAVA category through a category version hash table. 根據申請專利範圍第4項所述的裝置,其中,透過該類別版本散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別版本散列表的主鍵的值記錄上次載入的該第一JAVA類別的版本號。 The device of claim 4, wherein the category name of the first JAVA category is recorded by a primary key of the category version hash table, and the last loaded number is recorded by the value of the primary key of the category version hash table. The version number of a JAVA category. 一種類別庫註冊系統,其特徵在於,用於維護類別註冊資訊,該系統包括: 獲取單元,用於根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;新增單元,用於遍歷該JAVA類別庫,將該類別註冊資訊中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊資訊中;及更新單元,用於遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊資訊中對應的JAVA類別的儲存位址,其中,該類別註冊資訊透過類別註冊表記錄,該類別註冊資訊包括JAVA類別名、該JAVA類別所屬的jar包的名稱以及該JAVA類別所屬的jar包對應的SVN位址,該類別註冊表保存於資料庫中,透過與該資料庫通信讀取類別註冊表中的資訊,其中,該類別註冊表由類別庫註冊系統維護,該類別庫註冊系統將JAVA類別庫中的新類別註記錄到類別註冊表,該類別庫註冊系統根據JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址,該SVN位址為儲存在SVN伺服器上的jar包對應的儲存位址,該SVN伺服器對JAVA類別的每一次更新都進行記錄,用戶每次修改JAVA代碼,並將修改後的JAVA代碼透過SVN客戶端軟體提交到SVN伺服器後,SVN伺服器都會為修改後的JAVA代碼產生一個新的版本,並對新的版本進行記錄,透過版本號記錄各個版本的JAVA代碼。 A category library registration system, characterized in that it is used to maintain category registration information, and the system includes: An obtaining unit, configured to obtain a JAVA category library according to the received JAVA category library storage address; a new unit, configured to traverse the JAVA category library, and not included in the category registration information, included in the JAVA category library The new category is inserted into the category registration information; and an update unit is configured to traverse the JAVA category library, and update the storage address of the corresponding JAVA category in the registration information according to the storage address of each JAVA category recorded in the JAVA category library. The category registration information is recorded by the category registry, and the category registration information includes the JAVA category name, the name of the jar package to which the JAVA category belongs, and the SVN address corresponding to the jar package to which the JAVA category belongs, and the category registry is saved. In the database, the information in the category registry is read by communicating with the database, wherein the category registry is maintained by the category library registration system, and the category library registration system records the new category notes in the JAVA category library to the category. The registry, the category library registration system updates the corresponding JAVA category in the registry according to the storage address of each JAVA category recorded in the JAVA category library. The address of the SVN is the storage address corresponding to the jar package stored on the SVN server. The SVN server records each update of the JAVA category, and the user modifies the JAVA code each time and will modify it. After the JAVA code is submitted to the SVN server through the SVN client software, the SVN server will generate a new version for the modified JAVA code, record the new version, and record the JAVA code of each version through the version number. 一種JAVA叢集應用系統碼載入的方法,其特徵 在於,用於該JAVA叢集的伺服器中,包括:接收伺服器發送的類別載入請求,該類別載入請求中攜帶待載入的第一JAVA類別的類別名;根據該類別名從類別註冊資訊中查找該第一JAVA類別儲存位址,根據該儲存位址從該第一JAVA類別的儲存地獲取該第一JAVA類別的最新版本號,其中,該類別註冊資訊透過類別註冊表記錄,該類別註冊資訊包括JAVA類別名、該JAVA類別所屬的jar包的名稱以及該JAVA類別所屬的jar包對應的SVN位址,該類別註冊表保存於資料庫中,透過與該資料庫通信讀取類別註冊表中的資訊,其中,該類別註冊表由類別庫註冊系統維護,該類別庫註冊系統將JAVA類別庫中的新類別註記錄到類別註冊表,該類別庫註冊系統根據JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址,該SVN位址為儲存在SVN伺服器上的jar包對應的儲存位址,該SVN伺服器對JAVA類別的每一次更新都進行記錄,用戶每次修改JAVA代碼,並將修改後的JAVA代碼透過SVN客戶端軟體提交到SVN伺服器後,SVN伺服器都會為修改後的JAVA代碼產生一個新的版本,並對新的版本進行記錄,透過版本號記錄各個版本的JAVA代碼;判斷該第一JAVA類別的最新版本號與本地儲存的上次載入的該第一JAVA類別的版本號是否相同;及在該最新版本號與本地儲存的上次載入的該第一 JAVA類別的版本號相同時獲取最新版本的該第一JAVA類別,進行載入,並將該第一JAVA類別在該類別版本記錄中版本號進行更新;否則直接載入該第一JAVA類別。 A JAVA cluster application system code loading method, its characteristics The server for the JAVA cluster includes: receiving, by the server, a category loading request sent by the server, the category loading request carrying a category name of the first JAVA category to be loaded; and registering from the category according to the category name Searching for the first JAVA category storage address in the information, and obtaining the latest version number of the first JAVA category from the storage location of the first JAVA category according to the storage address, wherein the category registration information is recorded through the category registry, The category registration information includes the JAVA category name, the name of the jar package to which the JAVA category belongs, and the SVN address corresponding to the jar package to which the JAVA category belongs. The category registry is stored in the database, and the category is read by communicating with the database. The information in the registry, wherein the category registry is maintained by a category library registration system that records new category notes in the JAVA category library to the category registry, which is based on records in the JAVA category library The storage address of each JAVA category updates the storage address of the corresponding JAVA category in the registry, and the SVN address corresponds to the jar package stored on the SVN server. The address is stored, and the SVN server records each update of the JAVA category. Each time the user modifies the JAVA code and submits the modified JAVA code to the SVN server through the SVN client software, the SVN server will The modified JAVA code generates a new version, records the new version, records the JAVA code of each version through the version number; determines the latest version number of the first JAVA category and the last stored version of the local storage Whether the version number of a JAVA category is the same; and the first version that was last loaded in the latest version number and locally stored When the version number of the JAVA category is the same, the first JAVA category of the latest version is obtained, loaded, and the version number of the first JAVA category is updated in the category version record; otherwise, the first JAVA category is directly loaded. 根據申請專利範圍第7項所述的方法,其中,透過類別位址散列表記錄該類別註冊資訊中的內容。 The method of claim 7, wherein the content in the category registration information is recorded by a category address hash table. 根據申請專利範圍第8項所述的方法,其中,透過類別位址散列表記錄該類別註冊資訊中的內容具體為:透過該類別地址散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別地址散列表的主鍵的值記錄該第一JAVA類別儲存位址。 The method of claim 8, wherein the content of the category registration information is recorded by the category address hash table, wherein the category name of the first JAVA category is recorded through the primary key of the category address hash table. The value of the primary key of the category address hash table records the first JAVA category storage address. 根據申請專利範圍第7項所述的方法,其中,透過類別版本散列表記錄該第一JAVA類別的版本資訊。 The method of claim 7, wherein the version information of the first JAVA category is recorded by a category version hash table. 根據申請專利範圍第10項所述的方法,其中,透過類別版本散列表記錄該第一JAVA類別的版本資訊具體為:透過該類別版本散列表的主鍵記錄該第一JAVA類別的類別名,透過該類別版本散列表的主鍵的值記錄上次載入的該第一JAVA類別的版本資訊。 The method of claim 10, wherein the version information of the first JAVA category is recorded through a category version hash table, wherein the first JAVA category name is recorded through the primary key of the category version hash table. The value of the primary key of the category version hash table records the version information of the first JAVA category that was last loaded. 一種類別庫註冊方法,其特徵在於,包括:根據接收到的JAVA類別庫儲存位址獲取JAVA類別庫;遍歷該JAVA類別庫,將該類別註冊資訊中還未記錄的,包含在該JAVA類別庫中的新類別插入該類別註冊資訊中;及 遍歷該JAVA類別庫,根據該JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊資訊中對應的JAVA類別的儲存位址,其中,該類別註冊資訊透過類別註冊表記錄,該類別註冊資訊包括JAVA類別名、該JAVA類別所屬的jar包的名稱以及該JAVA類別所屬的jar包對應的SVN位址,該類別註冊表保存於資料庫中,透過與該資料庫通信讀取類別註冊表中的資訊,其中,該類別註冊表由類別庫註冊系統維護,該類別庫註冊系統將JAVA類別庫中的新類別註記錄到類別註冊表,該類別庫註冊系統根據JAVA類別庫中記錄的各個JAVA類別的儲存位址更新該註冊表中對應的JAVA類別的儲存位址,該SVN位址為儲存在SVN伺服器上的jar包對應的儲存位址,該SVN伺服器對JAVA類別的每一次更新都進行記錄,用戶每次修改JAVA代碼,並將修改後的JAVA代碼透過SVN客戶端軟體提交到SVN伺服器後,SVN伺服器都會為修改後的JAVA代碼產生一個新的版本,並對新的版本進行記錄,透過版本號記錄各個版本的JAVA代碼。 A class library registration method, comprising: obtaining a JAVA class library according to the received JAVA class library storage address; traversing the JAVA class library, and not including the category registration information, included in the JAVA class library Insert a new category into the category registration information; and Traversing the JAVA category library, updating the storage address of the corresponding JAVA category in the registration information according to the storage address of each JAVA category recorded in the JAVA category library, wherein the category registration information is recorded through the category registry, the category registration The information includes the JAVA category name, the name of the jar package to which the JAVA category belongs, and the SVN address corresponding to the jar package to which the JAVA category belongs. The category registry is stored in the database, and the category registry is read by communicating with the database. The information in the category registry is maintained by the category library registration system, which records the new category notes in the JAVA category library to the category registry, which is based on the records in the JAVA category library. The storage address of the JAVA category updates the storage address of the corresponding JAVA category in the registry, and the SVN address is the storage address corresponding to the jar package stored on the SVN server, and the SVN server is for each JAVA category. The update is recorded, the user changes the JAVA code each time, and the modified JAVA code is submitted to the SVN server through the SVN client software, the SVN server It will produce a new version of JAVA for the modified code, and the new version is recorded through the version number of the record of each version of JAVA code.
TW099104474A 2010-02-11 2010-02-11 JAVA cluster application system code loading and upgrading devices and methods TWI517045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099104474A TWI517045B (en) 2010-02-11 2010-02-11 JAVA cluster application system code loading and upgrading devices and methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099104474A TWI517045B (en) 2010-02-11 2010-02-11 JAVA cluster application system code loading and upgrading devices and methods

Publications (2)

Publication Number Publication Date
TW201128532A TW201128532A (en) 2011-08-16
TWI517045B true TWI517045B (en) 2016-01-11

Family

ID=45025267

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099104474A TWI517045B (en) 2010-02-11 2010-02-11 JAVA cluster application system code loading and upgrading devices and methods

Country Status (1)

Country Link
TW (1) TWI517045B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI795922B (en) * 2021-09-27 2023-03-11 技鋼科技股份有限公司 Data modification method, and data modification method at client end and at server end

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161525B (en) * 2015-04-03 2019-09-17 阿里巴巴集团控股有限公司 A kind of more cluster management methods and equipment
CN108989737B (en) * 2017-07-18 2020-03-20 视联动力信息技术股份有限公司 Data playing method and device and electronic equipment
CN110750243A (en) * 2019-09-20 2020-02-04 中国联合网络通信集团有限公司 Project code development method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI795922B (en) * 2021-09-27 2023-03-11 技鋼科技股份有限公司 Data modification method, and data modification method at client end and at server end

Also Published As

Publication number Publication date
TW201128532A (en) 2011-08-16

Similar Documents

Publication Publication Date Title
JP5705869B2 (en) Apparatus and method for loading and updating code of a cluster-based JAVA application system
US8972967B2 (en) Application packages using block maps
US20160378456A1 (en) Method for offline updating virtual machine images
CN108027741A (en) Document handling method, device, terminal and storage medium based on patch upgrading
US20100235321A1 (en) Programming model for synchronizing browser caches across devices and web services
CN114911519A (en) Shared software library for computing devices
WO2017157178A1 (en) Mobile terminal application update method and device
KR20140001172A (en) Methods for updating applications
CN103902696A (en) Method and device for loading resource files
US20110225563A1 (en) System for accessing and sharing user defined contents and method of the same
US10909086B2 (en) File lookup in a distributed file system
CN110968331B (en) Method and device for running application program
US8983908B2 (en) File link migration for decommisioning a storage server
CN102567339A (en) Method, device and system for acquiring start page
TWI517045B (en) JAVA cluster application system code loading and upgrading devices and methods
CN105955805A (en) Application container transferring method and device
CN111984280A (en) Container compatibility and upgrading method, device, equipment and storage medium
US9411618B2 (en) Metadata-based class loading using a content repository
CN110532016B (en) Version management method, version updating method and version management system
CN105447040B (en) Binary file management and updating method, device and system
CN111177600B (en) Built-in webpage loading method and device based on mobile application
US10387887B2 (en) Bloom filter driven data synchronization
CN111679842B (en) Application program hot update processing method, device and system
CN102355486A (en) Data download method and apparatus thereof
WO2017088547A1 (en) Data upgrading method and apparatus