1338473 4 九、發明說明: 【發明所屬之技術領域】, 本發明涉及一種元件的存儲管理系統及方法,特別是涉及一種分散式 系統中元件的存儲管理系統及方法。 【先前技術】 對於現有的分散式應用系統來說,系統生產廠商在同步問題上存在很 y弊端。一是同步内容沒有有效、合理的分割,而是直接同步整個目錄結 構,將目錄從主節點完全一致地同步到各次節點中;二是由於現有的分散 式應用系統缺乏對同步内容的分割,必然要求各個節點完全一致,而不按 需要同步到各節點上,這就使得節點上可能存在冗餘的内容。 【發明内容】 鑒於以上内容,有必要提供-種分散式系統中元件的存儲管理系統和 方法丄其可將同步内容按照屬性相同或相近的原則元件(Component)化, 並按節點的f鋼步CGmpGnent,有效的節省了各個節點飼服器的存儲空 間。 /本發明較佳實施方式提供一種分散式系統中元件的存儲管理系統,該 系括主節點词服器及至少―次節點伺服器’該次節點飼服器透過一 網路,主節點伺㈣相連。CQmp<:ment存儲於系統各節關服器中。 次節點伺服器可建立初始comp〇nem,並可透過網路向主節點舰器 =同步請求,同步請求可爲上載請求以上載所建立的初始CGmp_t, 二下載⑼求町鑛需C°mp°nent ’也可_除請求明除Component。 =路可以是企業蝴職(In_et),也可以是網際鱗(此嶋)或並 他類型的通訊網絡。 ’、 而=1! ^司服器令提供了描述每個comp〇nem本身固有的不隨位置不同 描述;主表,對於每一個component,屬性表中都有一條記錄 置的位:還提供了描絲個c<)mp<)nent在各節關服器存儲位 有多齡c〇mponent的屬性表,位置表t每個comP_t可以 將被抄寫到定時間主節蘭服器中的屬性表和位置表 6 本發明紐實施方式提供—種分減緖巾藉的存齡理方法,該 =法包括下列步驟:(A)系統初始化;⑻判斷請求_有無新的同步請 f;(C)若有新的同步請求’則判斷該請求是否爲上載〜寧賴請求.⑼ 右爲上載Comp_t請求,則上載所請求的c〇mp〇nem至主 ⑻更新主節關服μ關性表和位置表。 Ρ•.川服^ 其中於步驟(C)中,進—步包括步驟:(⑴若不爲上載c。學職( ,則判斷该請求是否爲下載c〇mp_t請求;(C2)若爲下載c〇mp_t 明’、’則從主節點飼服器下載c〇mp〇nem至該發送請求的次節點伺服器; (C3)更新主節點伺服器中的位置表。 β ▲其中於步驟(C1)中,進一步包括步驟:(⑶)若不爲下載Component ,求’則刪除該發送請求的次節點舰器中的component; (C12)更新主 喊點伺服器與該發送請求的次節點舰器中的位置表。 相較習知技術’本發明提供了一種靈活、有效的管理各個節點舰器中 Component存儲的手段。 【實施方式】 參閱第一圖所示,係本發明分散式系統中元件的存儲管理系統較佳實 施方式的硬齡構圖。料、統包括-主節關㈣4G及至少—次節點词服 器,本發明較佳實施方式以兩次節關服器1〇和2G爲例。次節點飼服器 1〇和20分別透過一網路30與主節點伺服器4〇相連。元件(c〇亭細) 存儲於系統中各節點伺服器中。 次節點伺服器10和20以屬性相同或相近爲基準建立初始c〇mp〇nent, 並可透過網路30向主節點伺服器40發送同步元件的請求。該同步元件的 請求可爲上載Componem請求以上載所建立的初始c〇mp〇nem,可爲下載 Component請求以下載所需Component ’也可爲刪除c〇mp〇nent請求以刪 除Component。網路30可以是企業内部網路(Imranet),也可以是網際網 路(Internet)或其他類型的通訊網絡。 主節點词服器40中提供了描述每個c〇mp0nent本身固有的不隨位置不 同而改變的屬性關性表’如第二圖所示’該屬性表有兩個欄位,一搁爲 元件名稱,另一攔爲各元件所對應的屬性。例如,當compo誠爲應用程 式(APPllcatlon)日夺,相關的屬性表存儲的資料爲該AppHcati〇n的版本' 語言及適㈣«統料性,對於每—個CGmp_t,屬性表中都有一條 記錄描述。,主節朗㈣4〇還提供了描述每個CGmp_t在各節點 舰器存儲位置的位置表,如第三_示,該位置表有兩侧位,一搁爲 70件名稱,另-攔爲每-個元件在各節點上的位置,例如c〇mp〇_八既 存在於主$關服II 4〇 t ’同時也存在於次節點舰器1Q和2G中。相對 於Component的屬性表’位置表中每個c〇mp〇nent可以有多條記錄與之對 應,且每隔-定時間主節點舰器4〇中的屬性表和位置表將被抄寫到次節 點伺服器10和20中。 參閱第四®所示’縣發明分散式系射元件的存鮮理方法較佳實 施方式的具體實施流程圖。首先’系統初始化(步驟8刚;判斷主節點飼 服器40中的請求隊列中有無接收到新的同步請求(步驟Si〇2),若沒有則 流程結束;若有制同步請求’湖斷制步請求是否爲上載CQmp〇_ 的凊求(轉S1G3);若爲上載CGmpGnent的請求,則發送該請求的次節 點伺服器上載Component至主節點伺服器4〇 (步驟1〇4);更新主節點伺服 器40中的屬性表和位置表(步驟Si〇5),流程轉至步驟Si〇2。 在步驟S103中,進一步包括:若不是上載c〇mp〇nem請求,則再判斷 是否爲下載Component的請求(步驟S丨06 );若是下載c〇mp〇nem的請求, 則主節點伺服器40下載Component至該發送請求的次節點伺服器(步驟 S107);更新主節點伺服器40中的位置表(步驟sl〇8),流程轉至步驟§1〇2。 在步驟S106中,進一步包括:若不是下載c〇mp0nent請求,則刪除該 發送請求的次節點伺服器中的Component (步驟S109);更新主節點伺服器 40與該發送請求的次節點伺服器中的位置表(步驟su〇),流程轉至步驟 S102。 本發明雖以較佳實施方式揭露如上,然其並非用以限定本發明。任何 熟悉此項技藝者,在不脫離本發明之精神和範圍内,當可做更動與潤飾, 因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 第一圖是本發明分散式系統中元件的存儲管理系統較佳實施方式的硬 1338473 體架構圖。 第二圖是第一圖所示主節點伺服器中的屬性表。 第三圖是第一圖所示主節點伺服器中的位置表。 第四圖是本發明分散式系統中元件的存儲管理方法較佳實施方式的具 體實施流程圖。 【主要元件符號說明】 主節點伺服器 40 次節點伺服器 10、20 網路 301338473 4 IX. Description of the Invention: [Technical Field] The present invention relates to a storage management system and method for components, and more particularly to a storage management system and method for components in a distributed system. [Prior Art] For the existing distributed application system, the system manufacturer has a drawback in the synchronization problem. First, the synchronous content is not effectively and reasonably segmented, but the entire directory structure is directly synchronized, and the directory is completely and uniformly synchronized from the primary node to each node. Second, the existing distributed application system lacks the segmentation of the synchronized content. It is inevitable that each node is completely consistent and not synchronized to each node as needed, which may result in redundant content on the node. SUMMARY OF THE INVENTION In view of the above, it is necessary to provide a storage management system and method for components in a decentralized system, which can synthesize synchronous components according to the same or similar principle of components, and according to the f-step of the node CGmpGnent effectively saves storage space for each node feeder. The preferred embodiment of the present invention provides a storage management system for components in a distributed system, which includes a primary node vocabulary and at least a "secondary node server". The secondary node feeder passes through a network, and the primary node serves (4) Connected. CQmp<:ment is stored in each section of the system. The secondary node server can establish the initial comp〇nem, and can send the synchronization request to the master node through the network. The synchronization request can upload the initial CGmp_t for the upload request, and the second download (9) is required to C°mp°nent. 'Also _ except for the request to clear the Component. = The road can be an enterprise (In_et), or it can be an internet scale (this) or a communication network of its type. ', and =1! ^ The server command provides a description of each comp〇nem itself that does not vary with the location; the main table, for each component, there is a record in the attribute table: also provided The traced c<)mp<)nent has a multi-aged c〇mponent attribute table in each section of the server storage location, and the location table t each comP_t can be transcribed into the attribute table in the fixed-time main section. And the position table 6 of the present invention provides a method for managing the age of the towel, the method comprising the following steps: (A) system initialization; (8) determining the request _ with or without new synchronization f; (C) If there is a new synchronization request, it is judged whether the request is an upload or not. (9) Right to upload a Comp_t request, upload the requested c〇mp〇nem to the main (8) to update the main section and the location table. Ρ•.川服^ In step (C), the step further includes the following steps: ((1) If it is not for uploading c. Academic (, then determine whether the request is for downloading c〇mp_t request; (C2) if downloading C〇mp_t 明', 'Download c〇mp〇nem from the main node feeder to the secondary node server that sent the request; (C3) update the location table in the master node server. β ▲In the step (C1 In addition, the steps further include: ((3)) if not downloading the Component, requesting 'the component in the secondary node of the sending request is deleted; (C12) updating the primary shouting server and the secondary node of the sending request The position table in the middle. Compared with the prior art, the present invention provides a flexible and effective means for managing component storage in each node ship. [Embodiment] Referring to the first figure, the components in the distributed system of the present invention are shown. The hard-working composition of the preferred embodiment of the storage management system includes a primary node (four) 4G and at least a secondary node word processor. The preferred embodiment of the present invention is exemplified by two node switches 1 and 2G. The secondary node feeders 1 and 20 respectively pass through a network 30 It is connected to the master node server 4. The components (c) are stored in each node server in the system. The secondary node servers 10 and 20 establish the initial c〇mp〇nent based on the same or similar attributes, and A request for a synchronization component is sent to the master node server 40 over the network 30. The request for the synchronization component may be to upload a Componem request to upload the established initial c〇mp〇nem, and to download the Component request to download the required Component ' The component can be deleted for deleting the c〇mp〇nent. The network 30 can be an intranet or an internet or other type of communication network. The main node is provided in the word processor 40. The attribute property table describing each c〇mp0nent itself that does not change with the position is 'as shown in the second figure'. The attribute table has two fields, one for the component name and the other for each component. For example, when compo is for the application (APPllcatlon), the relevant attribute table stores the version of the AppHcati〇n version of the language 'language and appropriate (four) « unified, for each CGmp_t, belongs to There is a record description in the table. The main section (4) 4〇 also provides a position table describing the storage location of each CGmp_t in each node, such as the third_show, the position table has two sides, one for 70 pieces The name, the other - is the position of each component on each node, for example, c〇mp〇_8 exists in the main $关服II 4〇t ' and also exists in the sub-nodes 1Q and 2G. The attribute table of the Component's location table can have multiple records corresponding to each c〇mp〇nent, and the attribute table and position table in the master node 4〇 will be transcribed to the secondary node servo every other time. In units 10 and 20. Refer to the flow chart of the preferred embodiment of the preferred embodiment of the method for storing the decentralized ray-emitting elements of the invention of the fourth embodiment. First of all, 'system initialization (step 8 just; determine whether there is a new synchronization request received in the request queue in the main node feeder 40 (step Si〇2), if not, the flow ends; if there is a synchronization request, the lake breaks Whether the step request is a request to upload CQmp〇_ (to S1G3); if the request is to upload CGmpGnent, the secondary node server that sent the request uploads the Component to the master node server 4 (step 1〇4); The attribute table and the location table in the node server 40 (step Si〇5), the flow proceeds to step Si〇2. In step S103, further comprising: if not uploading the c〇mp〇nem request, then determining whether it is a download The request of the component (step S丨06); if the request of the c〇mp〇nem is downloaded, the master node server 40 downloads the component to the secondary node server of the sending request (step S107); updates the master node server 40 The location table (step sl8), the flow proceeds to step §1〇2. In step S106, the method further includes: if not downloading the c〇mp0nent request, deleting the component in the secondary node server of the sending request (step S109) ); update the main section The server 40 and the location table in the secondary node server of the transmission request (step su〇), the flow proceeds to step S102. The present invention is disclosed in the preferred embodiment as above, but it is not intended to limit the present invention. The scope of protection of the present invention is defined by the scope of the appended claims. The description of the invention is based on the scope of the appended claims. Figure 1 is a diagram of the hard 1383473 architecture of the preferred embodiment of the storage management system for components in the distributed system of the present invention. The second diagram is the attribute table in the primary node server shown in the first figure. The position table in the main node server is shown. The fourth figure is a specific implementation flow chart of the preferred embodiment of the storage management method for components in the distributed system of the present invention. [Main element symbol description] The primary node server 40 node node servo 10, 20 network 30