TWI769880B - Application synchronization method and high-availability system - Google Patents

Application synchronization method and high-availability system Download PDF

Info

Publication number
TWI769880B
TWI769880B TW110123902A TW110123902A TWI769880B TW I769880 B TWI769880 B TW I769880B TW 110123902 A TW110123902 A TW 110123902A TW 110123902 A TW110123902 A TW 110123902A TW I769880 B TWI769880 B TW I769880B
Authority
TW
Taiwan
Prior art keywords
sub
installation
application
files
file
Prior art date
Application number
TW110123902A
Other languages
Chinese (zh)
Other versions
TW202301103A (en
Inventor
劉威志
Original Assignee
威聯通科技股份有限公司
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 威聯通科技股份有限公司 filed Critical 威聯通科技股份有限公司
Priority to TW110123902A priority Critical patent/TWI769880B/en
Application granted granted Critical
Publication of TWI769880B publication Critical patent/TWI769880B/en
Publication of TW202301103A publication Critical patent/TW202301103A/en

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The disclosure provides an application synchronization method and a high-availability system. The method includes:, generating, by a primary device, an application program installation list in response to the primary device has installed a plurality of applications according to a specific installation sequence; sending, by the primary device, the application installation list to each secondary device; and installing, by each secondary device, the applications according to the specific installation sequence recorded in the application installation list.

Description

應用程式同步方法及高可用性系統Application synchronization method and high availability system

本發明是有關於一種應用程式同步機制,且特別是有關於適用於高可用性系統的應用程式同步方法。 The present invention relates to an application synchronization mechanism, and more particularly, to an application synchronization method suitable for high availability systems.

在提供網路服務時,為避免因裝置故障而無法維持提供服務,採用高可用性(High Availability)系統來提供網路服務是一種常見的解決方案。 When providing network services, it is a common solution to use a high availability (High Availability) system to provide network services in order to avoid failure to maintain services due to device failures.

一般而言,高可用性系統包括主裝置及若干子裝置,因而可在主裝置發生故障時,讓上述子裝置之一接續提供網路服務。為了讓子裝置具有接續提供網路服務的能力,現有技術中存在讓子裝置以鏡像方式與主裝置進行同步的方式,而此鏡像方式一般會將主裝置的硬碟內容完全複製至子裝置的硬碟中。 Generally speaking, a high-availability system includes a main device and several sub-devices, so that when the main device fails, one of the sub-devices can continue to provide network services. In order to enable the sub-device to continuously provide network services, there is a method in the prior art to allow the sub-device to synchronize with the main device in a mirroring manner, and this mirroring method generally completely copies the hard disk content of the main device to the sub-device. on the hard disk.

然而,在一些情境中,這種方式有可能衍生其他的問題。舉例而言,假設主裝置上的某個網路埠經設定為作為檔案傳輸協定伺服器使用,則在透過上述方式將各子裝置同步於主裝置後,將出現各子裝置爭搶上述網路埠的情形。 However, in some contexts, this approach may give rise to other problems. For example, if a certain network port on the main device is set to be used as a FTP server, after the sub-devices are synchronized with the main device through the above method, each sub-device will compete for the above-mentioned network port situation.

因此,對於本領域技術人員而言,如何設計一種讓高可用性系統可僅同步所需資料的機制實為一項重要議題。 Therefore, for those skilled in the art, how to design a mechanism for enabling a high availability system to synchronize only the required data is an important issue.

有鑑於此,本發明提供一種應用程式同步方法及高可用性系統,其可用於解決上述技術問題。 In view of this, the present invention provides an application synchronization method and a high availability system, which can be used to solve the above technical problems.

本發明提供一種應用程式同步方法,適於包括一主裝置及至少一子裝置的一高可用性系統,包括:反應於主裝置已依據一特定安裝順序安裝多個應用程式,由主裝置相應地產生一應用程式安裝清單,其中應用程式安裝清單記錄有特定安裝順序及所述多個應用程式;由主裝置發送應用程式安裝清單至各子裝置;以及由各子裝置依據應用程式安裝清單記錄的特定安裝順序安裝所述多個應用程式。 The present invention provides an application synchronization method, which is suitable for a high availability system including a main device and at least one sub-device. an application installation list, wherein the application installation list records a specific installation sequence and the plurality of applications; the main device sends the application installation list to each sub-device; and the specific installation list is recorded by each sub-device according to the application installation list The installation sequence installs the plurality of applications.

本發明提供一種應用程式同步系統,包括主裝置及至少一子裝置。主裝置經配置以:反應於依據一特定安裝順序安裝多個應用程式,相應地產生一應用程式安裝清單,其中應用程式安裝清單記錄有特定安裝順序及所述多個應用程式;發送應用程式安裝清單。所述至少一子裝置連接於主裝置,且各子裝置經配置以依據應用程式安裝清單記錄的特定安裝順序安裝所述多個應用程式。 The present invention provides an application synchronization system, which includes a main device and at least one sub-device. The master device is configured to: in response to installing a plurality of applications according to a specific installation order, correspondingly generate an application installation list, wherein the application installation list records the specific installation order and the plurality of applications; send the application installation list. The at least one sub-device is connected to the main device, and each sub-device is configured to install the plurality of applications according to a specific installation order recorded in the application installation list.

100:高可用性系統 100: High Availability System

110:主裝置 110: Main unit

110a,121a,122a:安裝檔資料庫 110a, 121a, 122a: Installation file database

121~12N:子裝置 121~12N: Sub-device

F1:檔案更新通知 F1: File update notification

L1:應用程式安裝清單 L1: Application installation list

P1~PK:安裝檔 P1~PK: installation file

S210~S230:步驟 S210~S230: Steps

圖1是依據本發明之一實施例繪示的高可用性系統示意圖。 FIG. 1 is a schematic diagram of a high availability system according to an embodiment of the present invention.

圖2是依據本發明之一實施例繪示的應用程式同步方法流程圖。 FIG. 2 is a flowchart of an application synchronization method according to an embodiment of the present invention.

圖3A是依據圖1繪示的子裝置安裝應用程式的示意圖。 FIG. 3A is a schematic diagram of installing an application program according to the sub-device shown in FIG. 1 .

圖3B是依據圖3A繪示的子裝置安裝應用程式的示意圖。 FIG. 3B is a schematic diagram of installing an application program according to the sub-device shown in FIG. 3A .

請參照圖1,其是依據本發明之一實施例繪示的高可用性系統示意圖。在圖1中,高可用性系統100包括彼此互連的主裝置110及N個子裝置121~12N(N為正整數),其中主裝置110例如是用於提供某個特定網路服務的主要服務裝置,而各子裝置121~12N例如是可在主裝置110因故無法繼續提供服務時,代替主裝置110繼續提供上述特定網路服務的次要服務裝置,但可不限於此。 Please refer to FIG. 1 , which is a schematic diagram of a high availability system according to an embodiment of the present invention. In FIG. 1, the high availability system 100 includes a main device 110 and N sub-devices 121-12N (N is a positive integer) interconnected with each other, wherein the main device 110 is, for example, a main service device for providing a specific network service. , and each of the sub-devices 121-12N is, for example, a secondary service device that can continue to provide the above-mentioned specific network service instead of the main device 110 when the main device 110 cannot continue to provide services for some reason, but it is not limited thereto.

在不同的實施例中,主裝置110及子裝置121~12N個別可實現為各式伺服器、電腦裝置及/或智慧型裝置,但可不限於此。在一些實施例中,主裝置110及子裝置121~12N個別可包括儲存電路及處理器。在不同的實施例中,上述儲存電路例如是任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、硬碟或其他類似裝置或這些裝置的組合,而可用以記錄多個程式碼或模組。 In different embodiments, the main device 110 and the sub-devices 121 - 12N can be implemented as various servers, computer devices and/or smart devices, respectively, but not limited thereto. In some embodiments, the main device 110 and the sub-devices 121 - 12N may each include a storage circuit and a processor. In different embodiments, the above-mentioned storage circuit is, for example, any type of fixed or removable random access memory (Random Access Memory, RAM), Read-Only Memory (ROM), and flash memory. Flash memory, hard disk or other similar devices or a combination of these devices can be used to record multiple codes or modules.

另外,上述處理器可耦接於對應的儲存電路,並可為一般用途處理器、特殊用途處理器、傳統的處理器、數位訊號處理器、多個微處理器(microprocessor)、一個或多個結合數位訊號處理器核心的微處理器、控制器、微控制器、特殊應用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式閘陣列電路(Field Programmable Gate Array,FPGA)、任何其他種類的積體電路、狀態機、基於進階精簡指令集機器(Advanced RISC Machine,ARM)的處理器以及類似品。 In addition, the above-mentioned processor can be coupled to the corresponding storage circuit, and can be a general-purpose processor, a special-purpose processor, a conventional processor, a digital signal processor, a plurality of microprocessors, one or more Microprocessors, controllers, microcontrollers, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), any other kind of combination with a digital signal processor core integrated circuits, state machines, Advanced RISC Machine (ARM)-based processors, and the like.

在本發明的實施例中,高可用性系統100可用於執行本發明提出的應用程式同步方法,其細節詳述如下。 In the embodiment of the present invention, the high-availability system 100 can be used to execute the application synchronization method proposed by the present invention, the details of which are described below.

請參照圖2,其是依據本發明之一實施例繪示的應用程式同步方法流程圖。本實施例的方法可由圖1的高可用性系統100執行,以下即搭配圖1所示的元件說明圖2各步驟的細節。 Please refer to FIG. 2 , which is a flowchart of an application synchronization method according to an embodiment of the present invention. The method of this embodiment can be executed by the high availability system 100 in FIG. 1 , and the details of each step in FIG. 2 will be described below in conjunction with the elements shown in FIG. 1 .

在一些實施例中,主裝置110可依據一特定安裝順序而使用apt工具安裝多個應用程式A1~AK(K為正整數)在執行於主裝置110的一作業系統。在一些實施例中,主裝置110可使用apt-ftparchive工具在主裝置110建立一安裝檔資料庫110a,其中安裝檔資料庫110a可用於儲存分別對應於應用程式A1~AK的安裝檔P1~PK。 In some embodiments, the host device 110 can use the apt tool to install a plurality of application programs A1 to AK (K is a positive integer) in an operating system executed on the host device 110 according to a specific installation sequence. In some embodiments, the host device 110 can use the apt-ftparchive tool to create an installation file database 110a on the host device 110, wherein the installation file database 110a can be used to store the installation files P1~PK corresponding to the application programs A1~AK respectively .

在一些實施例中,由於應用程式A1~AK彼此之間可能存在相依性(亦即某應用程式的安裝需先於另一應用程式),因此設計者可預先依應用程式A1~AK之間的相依性決定應用程式 A1~AK的安裝順序,並以此安裝順序作為主裝置110安裝應用程式A1~AK的特定安裝順序。為便於說明,以下假設主裝置110經設定為依序安裝應用程式A1~AK,但可不限於此。 In some embodiments, since there may be dependencies among the applications A1~AK (that is, the installation of a certain application must precede another application), the designer can pre-determine the dependencies between the applications A1~AK. Dependency determines application The installation sequence of A1 to AK is used as the specific installation sequence for the main device 110 to install the application programs A1 to AK. For convenience of description, it is assumed that the main device 110 is set to install the applications A1 to AK in sequence, but it is not limited to this.

相應地,在步驟S210中,反應於主裝置110已依據特定安裝順序安裝多個應用程式A1~AK,主裝置110可相應地產生應用程式安裝清單L1。在一實施例中,在主裝置110依據上述特定安裝順序使用apt工具安裝應用程式A1~AK時,apt工具可將上述特定安裝順序及應用程式A1~AK記錄為路徑為「/var/log/dpkg.log」的日誌檔。在此情況下,主裝置110可以此日誌檔作為應用程式安裝清單L1。換言之,應用程式安裝清單L1可記錄有上述特定安裝順序及應用程式A1~AK。 Correspondingly, in step S210 , in response to the fact that the main device 110 has installed a plurality of application programs A1 to AK according to a specific installation sequence, the main device 110 can generate an application installation list L1 accordingly. In one embodiment, when the main device 110 uses the apt tool to install the application programs A1 to AK according to the specific installation sequence, the apt tool can record the specific installation sequence and the application programs A1 to AK as the path "/var/log/ dpkg.log" log file. In this case, the host device 110 can use the log file as the application installation list L1. In other words, the application installation list L1 can record the above-mentioned specific installation sequence and application programs A1~AK.

之後,在步驟S220中,主裝置110可發送應用程式安裝清單L1至各子裝置121~12N。在一實施例中,在主裝置110完成應用程式A1~AK的安裝並取得應用程式安裝清單L1之後,可等待一預設時間再發送應用程式安裝清單L1至各子裝置121~12N,但可不限於此。 Afterwards, in step S220, the main device 110 may send the application installation list L1 to each of the sub-devices 121-12N. In one embodiment, after the main device 110 completes the installation of the applications A1 to AK and obtains the application installation list L1, it can wait for a preset time before sending the application installation list L1 to the sub-devices 121 to 12N. limited to this.

接著,在步驟S230中,各子裝置121~12N可依據應用程式安裝清單L1記錄的特定安裝順序安裝所述多個應用程式A1~AK。以下將輔以圖3A作進一步說明。 Next, in step S230, each of the sub-devices 121-12N can install the plurality of application programs A1-AK according to the specific installation sequence recorded in the application-program installation list L1. The following will be supplemented with FIG. 3A for further description.

請參照圖3A,其是依據圖1繪示的子裝置安裝應用程式的示意圖。在圖3A中,在子裝置121從主裝置110接收應用程式安裝清單L1之後,子裝置121可因應於應用程式安裝清單L1而 測量子裝置121與主裝置110及其他的各子裝置(例如子裝置122~12N)之間的連線速度,並據以在主裝置110及其他子裝置中挑選來源裝置。為便於說明,以下將子裝置121與主裝置110之間的連線速度稱為R0,並將子裝置121與各子裝置122~12N之間的連線速度稱為R2~RN。 Please refer to FIG. 3A , which is a schematic diagram of installing an application program according to the sub-device shown in FIG. 1 . In FIG. 3A, after the sub-device 121 receives the application installation list L1 from the main device 110, the sub-device 121 may install the application in response to the application installation list L1 The connection speed between the sub-device 121 and the main device 110 and other sub-devices (eg, sub-devices 122-12N) is measured, and a source device is selected from the main device 110 and other sub-devices accordingly. For convenience of description, the connection speed between the sub-device 121 and the main device 110 is referred to as R0 below, and the connection speed between the sub-device 121 and each of the sub-devices 122 to 12N is referred to as R2 to RN.

在不同的實施例中,子裝置121可從主裝置110及其他子裝置中挑選連線速度符合特定條件且儲存有應用程式A1~AK的安裝檔P1~PK的一者作為子裝置121的來源裝置。 In different embodiments, the sub-device 121 may select from the main device 110 and other sub-devices, one of the installation files P1 ˜PK of the application programs A1 ˜AK stored in the connection speed meeting a specific condition as the source of the sub-device 121 device.

在一實施例中,假設子裝置121與主裝置110之間的連線速度(即,R0)符合特定條件(例如R0高於一預設速度值),且主裝置110的安裝檔資料庫110a中儲存有安裝檔P1~PK。在此情況下,子裝置121可選擇主裝置110作為子裝置121的來源裝置,但可不限於此。 In one embodiment, it is assumed that the connection speed (ie, R0 ) between the sub-device 121 and the main device 110 meets a specific condition (for example, R0 is higher than a predetermined speed value), and the installation file database 110 a of the main device 110 The installation files P1~PK are stored in . In this case, the sub-device 121 may select the main device 110 as the source device of the sub-device 121, but it is not limited thereto.

在不同的實施例中,當R0大於R2~RN時(即,R0為最高連線速度),子裝置121亦可判定R0符合上述特定條件,但可不限於此。 In different embodiments, when R0 is greater than R2˜RN (ie, R0 is the highest connection speed), the sub-device 121 may also determine that R0 meets the above-mentioned specific conditions, but it is not limited thereto.

之後,子裝置121可依據應用程式安裝清單L1記錄的應用程式A1~AK從所選的來源裝置(即,主裝置110)取得應用程式A1~AK的安裝檔P1~PK。 Afterwards, the sub-device 121 can obtain the installation files P1-PK of the application programs A1-AK from the selected source device (ie, the main device 110) according to the application programs A1-AK recorded in the application-installation list L1.

在一實施例中,各子裝置121~12N可經設置有相似於安裝檔資料庫110a的安裝檔資料庫。例如,子裝置121可使用apt-ftparchive工具在子裝置121建立安裝檔資料庫121a,而子裝置122 可使用apt-ftparchive工具在子裝置122建立安裝檔資料庫122a,但可不限於此。因此,在子裝置121從所選的來源裝置(即,主裝置110)取得應用程式A1~AK的安裝檔P1~PK之後,子裝置121可將安裝檔P1~PK儲存於安裝檔資料庫121a,但可不限於此。 In one embodiment, each of the sub-devices 121-12N may be provided with an installation file database similar to the installation file database 110a. For example, the sub-device 121 can use the apt-ftparchive tool to create the installation file database 121a on the sub-device 121, and the sub-device 122 The installation file database 122a may be created on the sub-device 122 using the apt-ftparchive tool, but is not limited thereto. Therefore, after the sub-device 121 obtains the installation files P1-PK of the application programs A1-AK from the selected source device (ie, the main device 110), the sub-device 121 can store the installation files P1-PK in the installation-file database 121a , but not limited to this.

接著,子裝置121可依據應用程式安裝清單L1記錄的上述特定安裝順序執行應用程式A1~AK的安裝檔P1~PK,藉以依序安裝應用程式A1~AK。 Next, the sub-device 121 can execute the installation files P1 ˜PK of the application programs A1 ˜AK according to the above-mentioned specific installation sequence recorded in the application program installation list L1 , so as to install the application programs A1 ˜AK in sequence.

在一些實施例中,在依序安裝應用程式A1~AK之前,子裝置121可先判斷子裝置121上是否已安裝應用程式A1~AK中的一或多者。在一實施例中,反應於子裝置121判定子裝置121已安裝有應用程式A1~AK中的第一應用程式,子裝置121可在安裝檔P1~PK中找出對應於此第一應用程式的第一安裝檔。之後,子裝置121可在依據上述特定安裝順序執行應用程式A1~AK的安裝檔P1~PK的過程中略過此第一安裝檔。 In some embodiments, before sequentially installing the applications A1 ˜AK, the sub-device 121 may first determine whether one or more of the application programs A1 ˜AK have been installed on the sub-device 121 . In one embodiment, in response to the sub-device 121 determining that the sub-device 121 has installed the first application program in the application programs A1-AK, the sub-device 121 can find the first application program corresponding to the first application program in the installation files P1-PK 's first installation file. Afterwards, the sub-device 121 can skip the first installation file in the process of executing the installation files P1 to PK of the application programs A1 to AK according to the above-mentioned specific installation sequence.

舉例而言,假設子裝置121判定其已安裝有應用程式A1及A3,則子裝置121可找出對應於應用程式A1及A3的安裝檔P1及P3,並在依據上述特定安裝順序執行應用程式A1~AK的安裝檔P1~PK的過程中略過安裝檔P1及P3。亦即,子裝置121例如可依序執行安裝檔P2、P4~PK,但可不限於此。 For example, if the sub-device 121 determines that the application programs A1 and A3 have been installed, the sub-device 121 can find the installation files P1 and P3 corresponding to the application programs A1 and A3, and execute the application program A1 according to the above-mentioned specific installation sequence. In the process of installing files P1~PK of ~AK, the installation files P1 and P3 are skipped. That is, for example, the sub-device 121 can execute the installation files P2, P4-PK in sequence, but not limited to this.

在一些實施例中,即便子裝置121判斷已安裝上述第一應用程式,若子裝置121判定應用程式安裝清單L1中記錄的第一應用程式的版本不同於已安裝於子裝置121上的第一應用程式的版本, 則子裝置121可在依據上述特定安裝順序執行應用程式A1~AK的安裝檔P1~PK的過程中不略過對應於上述第一應用程式的第一安裝檔,但可不限於此。 In some embodiments, even if the sub-device 121 determines that the above-mentioned first application has been installed, if the sub-device 121 determines that the version of the first application recorded in the application installation list L1 is different from the first application installed on the sub-device 121 version of the program, Then, the sub-device 121 may not skip the first installation file corresponding to the above-mentioned first application program in the process of executing the installation files P1-PK of the application programs A1-AK according to the above-mentioned specific installation sequence, but it is not limited thereto.

在上述情境中,由於子裝置121係依據上述特定安裝順序安裝應用程式A1~AK,因此子裝置121上的應用程式A1~AK之間的相依性可得到妥善的安排。 In the above situation, since the sub-device 121 installs the applications A1 ˜AK according to the above-mentioned specific installation sequence, the dependencies between the applications A1 ˜AK on the sub-device 121 can be properly arranged.

並且,相較於習知以鏡像方式進行同步的方式,本發明可僅讓子裝置122同步安裝主裝置110上所安裝的應用程式,進而能夠以較具彈性的方式完成子裝置122與主裝置110之間的同步。 Moreover, compared with the conventional method of synchronizing by mirroring, the present invention can only allow the sub-device 122 to synchronize the installation of the application program installed on the main device 110 , so that the sub-device 122 and the main device can be completed in a more flexible manner Sync between 110.

在一些實施例中,在子裝置121將安裝檔P1~PK儲存於安裝檔資料庫121a並完成應用程式A1~AK的安裝之後,子裝置121亦可作為其他子裝置的來源裝置使用。以下輔以圖3B作進一步說明。 In some embodiments, after the sub-device 121 stores the installation files P1-PK in the installation-file database 121a and completes the installation of the application programs A1-AK, the sub-device 121 can also be used as a source device for other sub-devices. The following is supplemented with FIG. 3B for further description.

請參照圖3B,其是依據圖3A繪示的子裝置安裝應用程式的示意圖。在圖3B中,在子裝置122從主裝置110接收應用程式安裝清單L1之後,子裝置122可因應於應用程式安裝清單L1而測量子裝置122與主裝置110及其他的各子裝置(例如子裝置121、123~12N)之間的連線速度,並據以在主裝置110及其他子裝置中挑選來源裝置。 Please refer to FIG. 3B , which is a schematic diagram of installing an application program according to the sub-device shown in FIG. 3A . In FIG. 3B, after the sub-device 122 receives the application installation list L1 from the main device 110, the sub-device 122 can measure the sub-device 122, the main device 110 and other sub-devices (eg, sub-devices) according to the application installation list L1 The connection speed between the devices 121, 123-12N), and select the source device among the main device 110 and other sub-devices accordingly.

在不同的實施例中,子裝置122可從主裝置110及其他子裝置中挑選連線速度符合特定條件且儲存有應用程式A1~AK的安裝檔P1~PK的一者作為子裝置122的來源裝置。 In different embodiments, the sub-device 122 may select from the main device 110 and other sub-devices, one of the installation files P1 ˜PK of the application programs A1 ˜AK stored in the connection speed meeting a specific condition as the source of the sub-device 122 device.

在圖3B中,假設子裝置122與子裝置121之間的連線速 度符合上述特定條件(例如高於預設速度值),且子裝置121的安裝檔資料庫121a中儲存有安裝檔P1~PK。在此情況下,子裝置122可選擇子裝置121作為子裝置122的來源裝置,但可不限於此。 In FIG. 3B , it is assumed that the connection speed between the sub-device 122 and the sub-device 121 is The speed meets the above-mentioned specific conditions (eg, higher than the preset speed value), and the installation files P1 to PK are stored in the installation file database 121 a of the sub-device 121 . In this case, the sub-device 122 may select the sub-device 121 as the source device of the sub-device 122, but it is not limited thereto.

之後,子裝置122可依據應用程式安裝清單L1記錄的應用程式A1~AK從所選的來源裝置(即,子裝置121)取得應用程式A1~AK的安裝檔P1~PK。 Afterwards, the sub-device 122 can obtain the installation files P1-PK of the application programs A1-AK from the selected source device (ie, the sub-device 121) according to the application programs A1-AK recorded in the application-installation list L1.

由於子裝置122設置有安裝檔資料庫122a,因此,在子裝置122從所選的來源裝置(即,子裝置121)取得應用程式A1~AK的安裝檔P1~PK之後,子裝置122可將安裝檔P1~PK儲存於安裝檔資料庫122a。藉此,可讓子裝置122之後作為其他子裝置的來源裝置使用,但可不限於此。 Since the sub-device 122 is provided with the installation file database 122a, after the sub-device 122 obtains the installation files P1-PK of the application programs A1-AK from the selected source device (ie, the sub-device 121), the sub-device 122 can store the installation files P1-PK of the application programs A1-AK. The installation files P1 to PK are stored in the installation file database 122a. In this way, the sub-device 122 can be used as a source device of other sub-devices, but not limited to this.

接著,子裝置122可依據應用程式安裝清單L1記錄的上述特定安裝順序執行應用程式A1~AK的安裝檔P1~PK,藉以依序安裝應用程式A1~AK。相關細節可參照圖3A中子裝置121安裝應用程式A1~AK的說明,於此不另贅述。 Next, the sub-device 122 can execute the installation files P1 ˜PK of the application programs A1 ˜AK according to the above-mentioned specific installation sequence recorded in the application program installation list L1 , so as to install the application programs A1 ˜AK in sequence. For related details, please refer to the description of installing the application programs A1 to AK in the sub-device 121 in FIG. 3A , which will not be repeated here.

在上述情境中,由於子裝置122亦為依據上述特定安裝順序安裝應用程式A1~AK,因此子裝置122上的應用程式A1~AK之間的相依性同樣可得到妥善的安排。 In the above situation, since the sub-device 122 also installs the applications A1 ˜AK according to the above-mentioned specific installation sequence, the dependencies between the applications A1 ˜AK on the sub-device 122 can also be properly arranged.

基於上述教示,其他的子裝置(例如子裝置123~12N)可各自依應用程式安裝清單L1記錄的上述特定安裝順序完成應用程式A1~AK的安裝。 Based on the above teachings, other sub-devices (eg, the sub-devices 123 - 12N) can each complete the installation of the applications A1 -AK according to the specific installation sequence recorded in the application installation list L1.

在一些實施例中,本發明除了可將安裝於主裝置110上的應用程式A1~AK安裝於各子裝置121~12N上之外,還可指定將某些應用程式上的某些設定檔案同步至子裝置121~12N。 In some embodiments, in addition to installing the applications A1-AK installed on the main device 110 on the sub-devices 121-12N, the present invention can also specify to synchronize some setting files on some applications to the sub-devices 121~12N.

在一實施例中,假設主裝置110經配置以需將應用程式A1(例如網頁瀏覽器)上的一設定檔案(例如所述網頁瀏覽器的書籤)同步至子裝置121~12N,則主裝置110可監控應用程式A1的所述設定檔案是否已被更動。 In one embodiment, assuming that the main device 110 is configured to synchronize a setting file (such as a bookmark of the web browser) on the application A1 (such as a web browser) to the sub-devices 121-12N, the main device 110 can monitor whether the setting file of the application A1 has been changed.

反應於主裝置110判定應用程式A1的所述設定檔案已被更動(例如上述書籤中出現新加入的網址),主裝置110可發送對應於所述設定檔案的檔案更新通知F1至各子裝置121~12N。在一實施例中,檔案更新通知F1可包括主裝置110上的應用程式A1的所述設定檔案(例如主裝置110的網頁瀏覽器的書籤)。 In response to the main device 110 determining that the setting file of the application A1 has been changed (for example, a newly added URL appears in the bookmark), the main device 110 may send a file update notification F1 corresponding to the setting file to each sub-device 121 ~12N. In one embodiment, the file update notification F1 may include the setting file of the application A1 on the main device 110 (eg, the bookmark of the web browser of the main device 110 ).

在一實施例中,由於各子裝置121~12N上亦安裝有應用程式A1,而各子裝置121~12N的應用程式A1亦將具有所述設定檔案。因此,在各子裝置121~12N接收檔案更新通知F1之後,各子裝置121~12N可據以更新所對應的應用程式A1的所述設定檔案。舉例而言,在子裝置121接收檔案更新通知F1之後,子裝置121可將子裝置121上的應用程式A1的所述設定檔案同步於主裝置110上的應用程式A1的所述設定檔案(例如將子裝置121的網頁瀏覽器的書籤替換為主裝置110的網頁瀏覽器的書籤),但可不限於此。 In one embodiment, since the application A1 is also installed on each of the sub-devices 121 - 12N, the application A1 of each of the sub-devices 121 - 12N will also have the setting file. Therefore, after each sub-device 121-12N receives the file update notification F1, each sub-device 121-12N can update the setting file of the corresponding application A1 accordingly. For example, after the sub-device 121 receives the file update notification F1, the sub-device 121 may synchronize the setting file of the application A1 on the sub-device 121 with the setting file of the application A1 on the main device 110 (eg, The bookmark of the web browser of the sub-device 121 is replaced with the bookmark of the web browser of the main device 110 ), but not limited to this.

另一方面,在一些實施例中,假設主裝置110經配置以不需將應用程式A1上的其他設定檔案同步至子裝置121~12N,則無 論主裝置110是否偵測到所述其他設定檔案已被更動,主裝置110可皆不發送任何通知至各子裝置121~12N。藉此,各子裝置121~12N即可不針對應用程式A1上的所述其他設定檔案與主裝置110進行同步,但可不限於此。 On the other hand, in some embodiments, assuming that the main device 110 is configured not to synchronize other setting files on the application A1 to the sub-devices 121-12N, there is no Regardless of whether the main device 110 detects that the other setting files have been changed, the main device 110 may not send any notification to each of the sub-devices 121 - 12N. In this way, each of the sub-devices 121 to 12N may not synchronize with the main device 110 for the other setting files on the application A1, but it is not limited to this.

綜上所述,在本發明的高可用性系統中,主裝置可在依特定安裝順序完成多個應用程式的安裝之後,據以產生應用程式安裝清單,並將此應用程式安裝清單發送至高可用性系統中的各子裝置。相應地,各子裝置即可依據此應用程式安裝清單記錄的上述特定安裝順序而安裝所述多個應用程式。藉此,可僅讓各子裝置同步安裝主裝置上的應用程式,進而能夠以較具彈性的方式完成各子裝置與主裝置之間的同步。並且,由於各子裝置皆是依據上述特定安裝順序而安裝所述多個應用程式,因而可讓各子裝置的應用程式之間的相依性得到妥善的安排。 To sum up, in the high availability system of the present invention, the master device can generate an application installation list accordingly after completing the installation of multiple applications in a specific installation sequence, and send the application installation list to the high availability system each sub-device in . Correspondingly, each sub-device can install the plurality of applications according to the above-mentioned specific installation sequence recorded in the application installation list. In this way, only the application programs on the main device can be installed in each sub-device synchronously, so that the synchronization between each sub-device and the main device can be completed in a more flexible manner. In addition, since each sub-device installs the plurality of application programs according to the above-mentioned specific installation sequence, the dependencies between the application programs of each sub-device can be properly arranged.

另外,由於子裝置可從其他子裝置中選擇適合的來源裝置以取得各應用程式的安裝檔,因此可避免全部的子裝置皆要求從主裝置取得各應用程式的安裝檔的情況。藉此,可實現高可用性系統中的負載平衡效果。 In addition, since the sub-devices can select a suitable source device from other sub-devices to obtain the installation files of each application program, the situation that all sub-devices require to obtain the installation files of each application program from the main device can be avoided. Thereby, a load balancing effect in a high-availability system can be achieved.

除了可讓子裝置同步主裝置上的應用程式安裝情形之外,本發明還可讓主裝置僅將某應用程式的一或多設定檔案同步於子裝置,藉以進一步增加高可用性系統在執行同步時的彈性。 In addition to allowing the sub-devices to synchronize the application installation situation on the main device, the present invention also allows the main device to synchronize only one or more setting files of an application to the sub-devices, thereby further increasing the high availability system when the synchronization is performed. elasticity.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精 神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed by the above embodiments, it is not intended to limit the present invention, and any person with ordinary knowledge in the technical field will not depart from the spirit of the present invention. The scope of protection of the present invention should be determined by the scope of the appended patent application.

S210~S230:步驟 S210~S230: Steps

Claims (12)

一種應用程式同步方法,適於包括一主裝置及至少一子裝置的一應用程式同步系統,該至少一子裝置包括一第一子裝置及至少一其他子裝置,所述方法包括:反應於該主裝置已依據一特定安裝順序安裝多個應用程式,由該主裝置相應地產生一應用程式安裝清單,其中該應用程式安裝清單記錄有該特定安裝順序及該些應用程式;由該主裝置發送該應用程式安裝清單至各該子裝置;以及由各該子裝置依據該應用程式安裝清單記錄的該特定安裝順序安裝該些應用程式,包括:由該第一子裝置因應於該應用程式安裝清單而測量該第一子裝置與該主裝置及各該其他子裝置之間的連線速度,並據以在該主裝置及該至少一其他子裝置中挑選一來源裝置;由該第一子裝置依據該應用程式安裝清單記錄的該些應用程式從該來源裝置取得該些應用程式的多個安裝檔;由該第一子裝置依據該特定安裝順序執行該些應用程式的該些安裝檔。 An application synchronization method, suitable for an application synchronization system including a main device and at least one sub-device, the at least one sub-device including a first sub-device and at least one other sub-device, the method comprising: responding to the The main device has installed a plurality of application programs according to a specific installation sequence, and the main device generates an application program installation list correspondingly, wherein the application program installation list records the specific installation sequence and the application programs; sent by the main device the application installation list to each of the sub-devices; and installing the applications by each of the sub-devices according to the specific installation order recorded in the application installation list, including: by the first sub-device in response to the application installation list and measure the connection speed between the first sub-device, the main device and each of the other sub-devices, and select a source device from the main device and the at least one other sub-device accordingly; the first sub-device According to the applications recorded in the application installation list, the installation files of the application programs are obtained from the source device; the installation files of the application programs are executed by the first sub-device according to the specific installation sequence. 如請求項1所述的方法,其中該主裝置依據該特定安裝順序而使用一apt工具安裝該些應用程式,其中該apt工具將該特定安裝順序及該些應用程式記錄為一日誌檔,而該主裝置以該日誌檔作為該應用程式安裝清單。 The method of claim 1, wherein the host device uses an apt tool to install the applications according to the specific installation sequence, wherein the apt tool records the specific installation sequence and the applications as a log file, and The host device uses the log file as the application installation list. 如請求項2所述的方法,其中該日誌檔的儲存路徑包括/var/log/dpkg.log。 The method of claim 2, wherein the storage path of the log file includes /var/log/dpkg.log. 如請求項1所述的方法,更包括:由該主裝置使用apt-ftparchive工具在該主裝置建立一安裝檔資料庫,其中該安裝檔資料庫用於儲存該些應用程式的多個安裝檔。 The method of claim 1, further comprising: using an apt-ftparchive tool by the host device to create an installation file database on the host device, wherein the installation file database is used to store a plurality of installation files of the application programs . 如請求項1所述的方法,其中由該第一子裝置依據該特定安裝順序執行該些應用程式的該些安裝檔的步驟包括:反應於該第一子裝置判定該第一子裝置已安裝有該些應用程式中的一第一應用程式,在該些安裝檔中找出對應於該第一應用程式的一第一安裝檔;以及由該第一子裝置在依據該特定安裝順序執行該些應用程式的該些安裝檔的過程中略過該第一安裝檔。 The method of claim 1, wherein the step of executing the installation files of the application programs by the first sub-device according to the specific installation sequence comprises: determining that the first sub-device has been installed in response to the first sub-device There is a first application program among the application programs, finding a first installation file corresponding to the first application program in the installation files; and executing the first application program by the first sub-device according to the specific installation sequence The first installation file is skipped in the process of the installation files of the application programs. 如請求項1所述的方法,其中該第一子裝置包括一安裝檔資料庫,且所述方法更包括:在該第一子裝置從該來源裝置取得該些應用程式的該些安裝檔之後,由該第一子裝置將該些安裝檔儲存至該第一子裝置的該安裝檔資料庫。 The method of claim 1, wherein the first sub-device includes an installation file database, and the method further comprises: after the first sub-device obtains the installation files of the application programs from the source device , the installation files are stored in the installation file database of the first sub-device by the first sub-device. 如請求項1所述的方法,其中該來源裝置包括用於儲存該些應用程式的該些安裝檔的一安裝檔資料庫,且該來源裝置與該第一子裝置之間的該連線速度為最高。 The method of claim 1, wherein the source device includes an installation file database for storing the installation files of the application programs, and the connection speed between the source device and the first sub-device to the highest. 如請求項1所述的方法,其中該來源裝置包括用於儲存該些應用程式的該些安裝檔的一安裝檔資料庫,且該來源裝置與該第一子裝置之間的該連線速度高於一速度門限值。 The method of claim 1, wherein the source device includes an installation file database for storing the installation files of the application programs, and the connection speed between the source device and the first sub-device above a speed threshold. 如請求項1所述的方法,其中該些應用程式包括一第一應用程式,該至少一子裝置包括一第一子裝置,且該應用程式安裝清單更記錄有該第一應用程式的一設定檔案,且所述方法更包括:反應於該主裝置判定該第一應用程式的該設定檔案已被更動,發送對應於該設定檔案的一檔案更新通知至各該子裝置;由該第一子裝置因應於該檔案更新通知而將該第一子裝置上的該第一應用程式的該設定檔案同步於該主裝置上的該第一應用程式的該設定檔案。 The method of claim 1, wherein the applications include a first application, the at least one sub-device includes a first sub-device, and the application installation list further records a setting of the first application and the method further includes: in response to the main device determining that the setting file of the first application has been changed, sending a file update notification corresponding to the setting file to each of the sub-devices; The device synchronizes the setting file of the first application on the first sub-device with the setting file of the first application on the main device in response to the file update notification. 如請求項9所述的方法,其中該檔案更新通知包括該主裝置上的該第一應用程式的該設定檔案。 The method of claim 9, wherein the file update notification includes the settings file for the first application on the host device. 如請求項9所述的方法,其中該第一應用程式更包括其他設定檔案,且所述方法更包括:反應於該主裝置判定該第一應用程式的該其他設定檔案已被更動,不發送任何通知至各該子裝置。 The method of claim 9, wherein the first application further includes other setting files, and the method further comprises: not sending the other setting files in response to the host device determining that the other setting files of the first application have been changed any notification to each of the sub-devices. 一種應用程式同步系統,包括:一主裝置,其經配置以: 反應於依據一特定安裝順序安裝多個應用程式,相應地產生一應用程式安裝清單,其中該應用程式安裝清單記錄有該特定安裝順序及該些應用程式;發送該應用程式安裝清單;至少一子裝置,其連接於該主裝置,該至少一子裝置包括一第一子裝置及至少一其他子裝置,其中各該子裝置經配置以依據該應用程式安裝清單記錄的該特定安裝順序安裝該些應用程式,包括:該第一子裝置因應於該應用程式安裝清單而測量該第一子裝置與該主裝置及各該其他子裝置之間的連線速度,並據以在該主裝置及該至少一其他子裝置中挑選一來源裝置;該第一子裝置依據該應用程式安裝清單記錄的該些應用程式從該來源裝置取得該些應用程式的多個安裝檔;該第一子裝置依據該特定安裝順序執行該些應用程式的該些安裝檔。 An application synchronization system, comprising: a master device configured to: In response to installing a plurality of application programs according to a specific installation sequence, an application program installation list is correspondingly generated, wherein the application program installation list records the specific installation sequence and the application programs; sending the application program installation list; at least one child a device connected to the main device, the at least one sub-device includes a first sub-device and at least one other sub-device, wherein each of the sub-devices is configured to install these in accordance with the specific installation order recorded in the application installation list An application program, including: the first sub-device measures the connection speed between the first sub-device and the main device and each of the other sub-devices according to the application installation list, and according to the connection speed between the main device and the A source device is selected from at least one other sub-device; the first sub-device obtains a plurality of installation files of the application programs from the source device according to the applications recorded in the application installation list; the first sub-device The installation files of the application programs are executed in a specific installation sequence.
TW110123902A 2021-06-29 2021-06-29 Application synchronization method and high-availability system TWI769880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110123902A TWI769880B (en) 2021-06-29 2021-06-29 Application synchronization method and high-availability system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110123902A TWI769880B (en) 2021-06-29 2021-06-29 Application synchronization method and high-availability system

Publications (2)

Publication Number Publication Date
TWI769880B true TWI769880B (en) 2022-07-01
TW202301103A TW202301103A (en) 2023-01-01

Family

ID=83439629

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110123902A TWI769880B (en) 2021-06-29 2021-06-29 Application synchronization method and high-availability system

Country Status (1)

Country Link
TW (1) TWI769880B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185444A1 (en) * 2015-12-02 2017-06-29 Vmware, Inc. System for batch processing of workflows for virtualized infrastructure
CN111142881A (en) * 2019-12-27 2020-05-12 浪潮云信息技术有限公司 Kubernets-based charts automation deployment system and method
CN113010671A (en) * 2021-02-22 2021-06-22 杭州西湖数据智能研究院 App classification system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185444A1 (en) * 2015-12-02 2017-06-29 Vmware, Inc. System for batch processing of workflows for virtualized infrastructure
CN111142881A (en) * 2019-12-27 2020-05-12 浪潮云信息技术有限公司 Kubernets-based charts automation deployment system and method
CN113010671A (en) * 2021-02-22 2021-06-22 杭州西湖数据智能研究院 App classification system

Also Published As

Publication number Publication date
TW202301103A (en) 2023-01-01

Similar Documents

Publication Publication Date Title
US20210124574A1 (en) Techniques for updating a file using a multi-version patch file
EP2834759B1 (en) Telemetry system for a cloud synchronization system
US8301600B1 (en) Failover recovery in a distributed data store
US9626177B1 (en) Peer to peer upgrade management
US20110283149A1 (en) Monitoring distributed software health and membership in a compute cluster
JP6556851B2 (en) Database system, server device, program, and information processing method
US8127174B1 (en) Method and apparatus for performing transparent in-memory checkpointing
US20200065082A1 (en) Memory-efficient upgrade staging
US9152491B2 (en) Job continuation management apparatus, job continuation management method and job continuation management program
US9268662B2 (en) Method and system for a high availability framework
JP6083480B1 (en) Monitoring device, fault tolerant system and method
CN111752577B (en) Upgrading method and equipment for system version
US10860411B2 (en) Automatically detecting time-of-fault bugs in cloud systems
CN111444039A (en) Cache data rollback method and cache data rollback device
TWI769880B (en) Application synchronization method and high-availability system
CN107786650B (en) Storage medium and management strategy synchronization method, device and system
US11386153B1 (en) Flexible tagging and searching system
US10728326B2 (en) Method and system for high availability topology for master-slave data systems with low write traffic
US20160091870A1 (en) Redundancy-ready control apparatus, redundancy system and method for configuring redundant logics for assuring low power consumption and reliability at the same time
US20140215153A1 (en) Storage system, disk array apparatus and control method for storage system
US11429537B2 (en) Method, device, and computer program product for managing storage system
US20240028611A1 (en) Granular Replica Healing for Distributed Databases
JP2014170352A (en) Information system and database restoration method
US9836315B1 (en) De-referenced package execution
JP6237055B2 (en) License management system, apparatus, method and program