TWI584654B - Method and system for optimization service - Google Patents

Method and system for optimization service Download PDF

Info

Publication number
TWI584654B
TWI584654B TW104110140A TW104110140A TWI584654B TW I584654 B TWI584654 B TW I584654B TW 104110140 A TW104110140 A TW 104110140A TW 104110140 A TW104110140 A TW 104110140A TW I584654 B TWI584654 B TW I584654B
Authority
TW
Taiwan
Prior art keywords
module
service platform
request
platform
service
Prior art date
Application number
TW104110140A
Other languages
Chinese (zh)
Other versions
TW201536057A (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 TW104110140A priority Critical patent/TWI584654B/en
Publication of TW201536057A publication Critical patent/TW201536057A/en
Priority to CN201610177195.6A priority patent/CN106027591B/en
Priority to CN201811558724.2A priority patent/CN109660618A/en
Application granted granted Critical
Publication of TWI584654B publication Critical patent/TWI584654B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Description

一種服務最佳化的電腦系統及其方法Computer system for optimizing service and method thereof

本發明係一種服務最佳化的電腦系統及其方法,目前以爪哇程式語言企業版(Java 2 Platform,Enterprises Edition ,J2EE)實現該方法(但不限定任何程式語言),運用於雲端技術,平台即服務(PaaS)Platform as a Service。The present invention is a service optimization computer system and method thereof. Currently, the method is implemented in Java 2 Platform (Enterprises Edition, J2EE) (but not limited to any programming language), and is applied to cloud technology and platform. Service (PaaS) Platform as a Service.

分散式系統有很多不同的定義,一般認為:“一個分散式系統是一些獨立的電腦集合,但是對這個系統的用戶來說,系統就像-臺電腦一樣。”這個定義有兩方面的含義:第一,從硬體角度來講,每台電腦都是自主的;第二,從軟體角度來講,用戶將整個系統看做是-臺電腦。這兩者都是必需的,缺一不可。雲端運算 Cloud Computing 的本質其實就是分散式運算 Distributed Computing。以習知的架構而言是由一循環分流器做為負載平衡器,將請求以輪替分式分派到應用伺服器(AP Sever),進言之,負載平衡演算法包括有:Least Connection為依照連線數來判斷,連線數越少代表該主機負載越低;Weighted Least Connection 與 Least Connection 相同,但是會再依據權重來做調整。Round Robin 以輪替式的方式做負載平衡,例如有三台真實主機,第一條連線導至第 一台真實主機,第二條連線導至第二台真實主機,第三條連線導至第三台真實主機,第四條連線導至第一台真實主機,依此類推;Weighted Round Robin與 Round Robin 相同,但是會再依據權重來做調整;Source Hash以來源 IP 位址做為判斷負載狀況,當客戶端主機連線至 Virtual Server 時,會使用客戶端主機的來源位址經由 Hash 函式,算出應由後端真實主機接受服務,而將連線導至該真實主機。而一般運行於應用伺服器的程式架構是以MVC架構為基礎,即將一程式分為視圖層(View)及控制層(Controller)、商務邏輯層(BusinessLogic)及資料儲存層(DAO)而為了維持分散式系統提供最佳化維運服務,尚有以下議題。 1.熱部署(Hot Deployment,Hot Swap ):即模組程式更新時,系統不須停機,提供同樣服務。一般系統程式開發皆以MVC架構為基礎,而視圖層(View)依規範,可自動重新編譯,更新而不須重新開機故不須考量; 若將控制層設計為模組之單一入口,撰寫該模組共用且極少更動之功能;則控制層亦不需因修改而部署,而最常須要更動之程式為商務邏輯層(BusinessLogic),資料存取層(DAO) 及其他相關檔案,故須解決熱部署之問題為此部分之程式。 1.1目前雖然J2EE有所謂熱部署(Hot Deployment)的機制,可用以減少版本更新時的停機時間,但使用者仍須重新登入;又由於一般設計、開發時將各獨立模組 (子系統)合為臺模組,以致於熱部署時,整個系統需要重新啟動,因重新部署之程式太多而造成記憶體不足已致於無法運作(當機)(註:模組有時亦稱為子系統,為功能之集合;臺模組為多個獨立模組 (子系統)由同一個會談(Session)存取)。 1.2已知相似之發明如專利公報所載之案號093102413,其所使用的Java技術為J2EE中的EJB,包含所謂的Session Bean及Entity Bean,並將程式之流程預先定義於該資料庫中,直接存取該資料庫中之資料而執行每一交易流程中所對應之服務程式單元,其發明雖解決了熱部署的問題,但由是以EBJ為基礎的開發方式,一般眾所皆知其效能為一隱憂,故甚少開發方式採用EJB而採用SSH即Struts2、Spring、Hibernate 之開發架構,其亦為目前開發系統之主流。故此發明之實用性已不佳。 1.3已知相似之發明尚有如公開編號201142708,其所提出之發明方法包 括:(1)在軟體系統中設置用以處理核心業務的第一業務處理引擎和第二業務處理引擎,該第一業務處理引擎連接對應的第一業務規則儲存單元,第二業務處理引擎連接對應的第二業務規則儲存單元;(2)設置第一業務處理引擎和第二業務處理引擎的其中之一為運行狀態,另一個處於等待狀態;(3)當軟體系統的處理設置發生變化時,更新處於等待狀態的業務處理引擎對應的處理設置;及(4)將處於等待狀態的業務處理引擎設定為運行狀態,並將原處於運行狀態的業務處理引擎設定為等待狀態。 簡言之是以切換的方式來解決實現熱部署,但與本案之方法不同。 1.4在中國專利申請號為200610123883.0的中提到一種實現熱部署的方法,就是將升級前的伺服器進行備份,同時對外提供服務,等升級完畢後再切換到升級後的web伺服器,從而對外表現為熱部署。但這種實現熱部署的方法需要提供兩台伺服器來實現熱部署。其不適之處有以下兩點。 1.4.1將整個伺服器備份為另一個伺服器來實現熱部署的方法,需要增設新的伺服器, 由此增加成本。 1.4.2引入開放式服務閘道架構來實現熱部署,需要將模式層設置在開放式服務閘道架構的各個子模組當中,當模式層發生改變時,雖然web應用的類載入器能夠實現熱部署,但是開放式服務閘道架構的各個子模組同樣需要重新啟動,不能完全意義上實現熱部署。而且,需要對現有的系統進行大量的改動,存在穩定性不高,安全性差的問題,只適合在沒有運行的業務系統上適用,不適合現已運行的系統上的應用(引用公開編號201142708之論述)。Decentralized systems have many different definitions. Generally speaking, "a decentralized system is a collection of independent computers, but for users of this system, the system is like a computer." This definition has two meanings: First, from a hardware perspective, each computer is autonomous; second, from a software perspective, the user sees the entire system as a computer. Both of these are required and indispensable. Cloud computing The essence of Cloud Computing is actually distributed computing. In the conventional architecture, a cyclic shunt is used as a load balancer to dispatch requests to the application server (AP Sever). In other words, the load balancing algorithm includes: Least Connection Judging by the number of connections, the lower the number of connections, the lower the load on the host; the Weighted Least Connection is the same as the Least Connection, but will be adjusted based on the weight. Round Robin performs load balancing in a rotating manner. For example, there are three real hosts. The first connection leads to the first real host, the second connection leads to the second real host, and the third connection leads. To the third real host, the fourth connection leads to the first real host, and so on; Weighted Round Robin is the same as Round Robin, but will be adjusted according to the weight; Source Hash is based on the source IP address. Judging the load status, when the client host connects to the Virtual Server, it uses the source address of the client host via the Hash function to calculate that the real host should accept the service and direct the connection to the real host. The program architecture generally running on the application server is based on the MVC architecture, which divides a program into a view layer (View) and a control layer (Controller), a business logic layer (BusinessLogic), and a data storage layer (DAO). Decentralized systems provide optimized transportation services with the following issues. 1. Hot Deployment (Hot Swap): When the module is updated, the system does not need to be shut down to provide the same service. The general system program development is based on the MVC architecture, and the view layer (View) can be automatically recompiled and updated without re-booting according to the specification. If the control layer is designed as a single entry for the module, write the Modules are shared and rarely changed. The control layer does not need to be deployed for modification. The most frequently required programs are BusinessLogic, Data Access Layer (DAO) and other related files. The problem of hot deployment is the program for this part. 1.1 At present, although J2EE has a so-called hot deployment mechanism, it can be used to reduce the downtime when the version is updated, but the user still has to re-login; and because of the general design and development, the independent modules (subsystems) are combined. As a module, so that when the system is hot deployed, the entire system needs to be restarted. The memory shortage due to too many redeployed programs has become inoperable (downtime). (Note: Modules are sometimes called subsystems. , is a collection of functions; the platform module is accessed by the same session for multiple independent modules (subsystems). 1.2 Known similar inventions, as disclosed in the patent publication No. 091024413, the Java technology used is an EJB in J2EE, including so-called Session Beans and Entity Beans, and the program flow is pre-defined in the database. Direct access to the data in the database to execute the service program unit corresponding to each transaction process. Although the invention solves the problem of hot deployment, it is based on the EBJ-based development method, which is generally known. Performance is a worry, so there are very few development methods using EJB and SSH, Struts2, Spring, Hibernate development architecture, which is also the mainstream of the current development system. Therefore, the practicality of the invention has been poor. 1.3 A similarly known invention is disclosed in the publication No. 201142708, the proposed method of the invention comprising: (1) setting a first service processing engine and a second service processing engine for processing core services in a software system, the first service The processing engine is connected to the corresponding first service rule storage unit, and the second service processing engine is connected to the corresponding second service rule storage unit; (2) setting one of the first service processing engine and the second service processing engine to be in an operating state, The other is in a waiting state; (3) when the processing setting of the software system changes, updating the processing setting corresponding to the service processing engine in the waiting state; and (4) setting the service processing engine in the waiting state to the running state, and Set the original business processing engine to the wait state. In short, the implementation of hot deployment is solved by switching, but it is different from the method of this case. 1.4 In the Chinese patent application No. 200610123883.0, a method for implementing hot deployment is mentioned, that is, the server before the upgrade is backed up, and the external service is provided, and after the upgrade is completed, the network server is switched to the upgraded web server, thereby externally Performance is hot deployment. But this approach to hot deployment requires two servers for hot deployment. There are two points in the discomfort. 1.4.1 The method of backing up the entire server to another server for hot deployment requires a new server, which increases the cost. 1.4.2 Introducing an open service gateway architecture to achieve hot deployment requires the mode layer to be placed in each sub-module of the open service gateway architecture. When the schema layer changes, although the web application's class loader can The hot deployment is implemented, but the sub-modules of the open service gateway architecture also need to be restarted, and the hot deployment cannot be realized in a complete sense. Moreover, a large number of changes to the existing system are required, and there is a problem of low stability and poor security, which is only suitable for application on a business system that is not running, and is not suitable for applications on a system that is currently running (refer to the discussion of the public number 201142708). ).

2.除熱部署外,部署後之議題尚有二,新舊版本是否應同時並存,或只執行最新版本。2. In addition to hot deployment, there are two issues after deployment, whether the new and old versions should coexist at the same time, or only the latest version.

3.容錯應用,一個單元或資源(軟體或硬體)的故障或部署不影響其他資源的正常功能。故應該在部署時提供量化式部署(即可使臺模組分割後、量化為各自獨立之模組,即以一類別載入器一模組的方式部署)。3. Fault-tolerant applications, failure or deployment of a unit or resource (software or hardware) does not affect the normal functioning of other resources. Therefore, quantitative deployment should be provided at the time of deployment (that is, the module can be divided and quantized into separate modules, that is, deployed as a class loader-module).

4.為使系統之運行環境免於因部署,或因其他因素如:請求量迅增、某一請求不當執行等因素造成系統記憶體存量不足以致系統無法運作,故應提供監控機制以防止此一問題發生並且使模組可即插即用、自動擴充以保全系統之運行。4. In order to protect the operating environment of the system from deployment, or due to other factors such as the rapid increase of requests and the improper execution of a request, the system memory is insufficient to operate the system, so a monitoring mechanism should be provided to prevent this. A problem occurs and the module is plug and play, automatically expanded to keep the system running.

5.更佳之分散方式應可將商務邏輯層(BusinessLogic)及資料存取層(DAO)再予以分散至其他電腦,且能配合當代主流開發架構完成分散運算。5. A better way to decentralize business logic (BusinessLogic) and data access layer (DAO) to other computers, and to complete the decentralized computing with the mainstream mainstream development architecture.

6.習知系統架構皆是設計以一循環(Round-Robin)分流器,將請求以輪替的方式分派至應用伺服器,因無足夠之資訊,以致無法更精準達到負載平衡,以Least Connection為例,若一連線帶有大量資料處理,則Least Connection之負載平衡並不準確;再以Round Robin為例,若主機有兩台,而請求所需處理的筆數依序為100筆,10筆,100筆,10筆,就會造成分派不均的情況。6. The conventional system architecture is designed with a Round-Robin shunt to dispatch requests to the application server in a roulating manner. Because there is not enough information, the load balancing cannot be achieved more accurately. Least Connection For example, if a connection has a large amount of data processing, the load balance of Least Connection is not accurate; then, for example, Round Robin, if there are two hosts, and the number of requests for processing is 100, 10 strokes, 100 strokes, and 10 strokes will result in uneven distribution.

7.應能提供特定族群專屬之執行環境 (如專屬之CPU或CPU之核心、記憶體空間)。7. Should be able to provide a specific community-specific execution environment (such as the core of the dedicated CPU or CPU, memory space).

8.應能提供系統開發人員分類管理模組並升級模組程式庫之功能。8. Should be able to provide system developer classification management module and upgrade the module library function.

本案的目的在於提供一種服務最佳化的電腦系統及其方法,即能對一般使用者提供多重分流以達更佳之負載平衡,亦能對系統開發人員提供熱部署(包括模組的新增、移除以及修改)、以及熱備援以達永續服務的系統,以及良善模組分類管理功能。The purpose of this case is to provide a computer system and method for optimizing services, which can provide multiple shunts for general users to achieve better load balancing, and also provide hot deployment for system developers (including the addition of modules, Remove and modify), as well as hot backup systems for sustainable services, as well as good module classification management capabilities.

本案主要以分流器及服務平台之組合而提供一種服務最佳化的電腦系統 ,分流器之結構為一選擇器、一平台註冊中心、一網路伺服器;服務平台之結構為一量化式部署器、一模組過載保全機制、一零請求監控機制、一熱部署監控機制、一資訊記錄器、一服務平台目錄、一請求過載保全機制及一網路伺服器。The case mainly provides a computer system with optimized service by a combination of a shunt and a service platform. The structure of the shunt is a selector, a platform registration center, and a network server; the structure of the service platform is a quantitative deployment. A module overload protection mechanism, a zero request monitoring mechanism, a hot deployment monitoring mechanism, an information recorder, a service platform directory, a request overload protection mechanism, and a network server.

分流器藉由平台註冊中心所提供的服務平台資訊及模組資訊以提供分流策略達成更佳之負載平衡; 服務平台提供保全機制使得於部署及請求時,免於因服務平台記憶體存量不足而無法運作,而且以量化式(熱)部署器部署模組以縮短部署時間,並加入一訊息通知器以同步服務平台資訊及模組資訊於平台註冊中心,使分流器得以運用熱部署模組名稱關連相同功能之模組及分流策略中最新版本分流方式達成永續服務; 並於分流器中加入一平台監控機制以提供熱備援機制及服務平台中加入一模組程式庫優先機制、一模組分類管理機制以達成服務最佳化的電腦系統。接下來,以實施方式藉由介紹分流器結構及其運作方式,所提供的相關機制及功能; 服務平台結構及其運作方式,所提供的相關機制及功能,並透過請求過程說明分流器及服務平台如何達成永續服務及服務最佳化的理由。The shunt uses the service platform information and module information provided by the platform registry to provide a shunting strategy for better load balancing. The service platform provides a security mechanism to prevent deployment and requests from being insufficient due to insufficient memory on the service platform. Operation, and deploying modules with a quantified (hot) deployer to reduce deployment time, and adding a message notifier to synchronize service platform information and module information to the platform registry, enabling the shunt to use the hot deployment module name to connect The latest version of the module and the shunting strategy of the same function achieves a perpetual service; and a platform monitoring mechanism is added to the shunt to provide a hot backup mechanism and a module library priority mechanism and a module in the service platform. A classification management mechanism to achieve a computer system optimized for service. Next, the implementation mechanism introduces the shunt structure and its operation mode, the related mechanisms and functions provided; the service platform structure and its operation mode, the related mechanisms and functions provided, and explains the shunt and service through the request process. How the platform can achieve sustainable service and service optimization.

請參考第一圖:分散式系統架構及運作示意圖,此圖是藉由習知的元件及開發架構加以改良而成。習知的元件包括有:一網路應用程式(客戶端)、 一循環分流器(Round-Robin)(伺服端)、一網路伺服器(伺服端),並將本案所發明之元件分流器及服務平台分別安裝在個別的網路伺服器,以及將習知開發架構的非視圖層及控制層的程式及相關檔案移至服務平台執行,而成為分散式系統架構,並提供服務最佳化的電腦系統。其能提供服務最佳化的理由有以下七點。 一、提供服務平台記憶體存量管控機制,以保全系統運作。 二、提供多種分流策略,以達更精準的負載平衡 。 三、提供特定族群專屬之執行環境 (如專屬之CPU 或CPU之核心、 記憶體空間)。 四、提供自動即時(熱)備援之機制,增強系統之服務,以保全系統運作。 五、提供模組分類管理功能並升級模組程式庫之功能。 六、提供服務不中斷(熱部署及請求時皆能保全系統運作,但有瞬時即逝的 暫停服務)。 七、提供永續之服務(熱部署及請求時皆能保全系統運作且持續服務)。 而能實現上述之功能,主要為本案所發明之元件 :一分流器及一服務平台。Please refer to the first figure: Decentralized system architecture and operational diagram, which is improved by conventional components and development architecture. The conventional components include: a network application (client), a Round-Robin (servo), a network server (servo), and the component shunt invented in the present invention. And the service platform is installed on a separate network server, and the non-view layer and control layer programs and related files of the conventional development architecture are moved to the service platform for execution, thereby becoming a decentralized system architecture and providing service optimization. Computer system. There are seven reasons why it can provide service optimization. First, provide a service platform memory inventory management mechanism to protect the system operation. Second, provide a variety of diversion strategies to achieve more accurate load balancing. Third, provide a specific community-specific execution environment (such as the core of the dedicated CPU or CPU, memory space). Fourth, provide automatic real-time (hot) backup mechanism, enhance the system's services to ensure system operation. 5. Provide module classification management functions and upgrade the function of the module library. Sixth, the provision of services is not interrupted (the system can be fully operated during hot deployment and request, but there is a momentary suspension of service). VII. Providing sustainable services (all systems can be maintained and serviced on demand during hot deployment and request). The above functions can be realized, mainly for the components invented in the present invention: a shunt and a service platform.

請參考第二圖:分流器結構及其運作示意圖,分流器,包含有:一選擇器 、一平台註冊中心、一平台監控機制及網路伺服器(習知元件)。 1.選擇器:用以依分流策略,分派請求。 2.平台註冊中心:用以提供登錄或同步服務平台及模組資訊之記錄。 3.平台監控機制:用以監控服務平台狀態,並依設定自動啟動備援服務平台。 4.網路伺服器:用以安裝並啟動分流器,以使分流器可接收請求,為一習知 元件。 5.運作方式:藉由網路伺服器之啟動,讀取分流器配置檔各參數值(請參考分流器配置檔說明),並啟動分流器,創建選擇器及平台註冊中心以待服務平台及模組註冊,於註冊完成後,啟動平台監控機制,等待請求。 註:網路伺服器為一上位概念,為一可接收請求的伺服器或容器,可為應用伺服器,EJB容器等等。Please refer to the second figure: the structure of the shunt and its operation diagram. The shunt includes: a selector, a platform registration center, a platform monitoring mechanism and a network server (known components). 1. Selector: used to dispatch requests according to the split strategy. 2. Platform Registration Center: used to provide a record of login or synchronization service platform and module information. 3. Platform monitoring mechanism: used to monitor the status of the service platform and automatically start the backup service platform according to the settings. 4. Network server: used to install and start the shunt so that the shunt can receive the request as a conventional component. 5. Operation mode: By starting the network server, read the parameter values of the shunt configuration file (please refer to the shunt configuration file description), and start the shunt, create the selector and platform registration center to wait for the service platform and Module registration, after the registration is completed, start the platform monitoring mechanism and wait for the request. Note: The web server is a superordinate concept, which is a server or container that can receive requests, and can be an application server, an EJB container, and the like.

請參考第三圖:服務平台結構及其運作示意圖,服務平台,包含有:一模組管理員,包含有:1.量化式部署機制、2.模組程式庫優先機制、3.模組過載保全機制、4.零請求監控機制、5.熱部署監控機制、6.資訊記錄器、7.訊息通知器、8.模組委任機制、9.請求過載保全機制(請求超時超量保全機制及請求量迅增保全機制),及一網路伺服器(習知元件)。 1.模組管理員: 1.1.量化式部署機制:用以進行各種模式的部署(請參考部署模式說明) ,使設計者可依模組功能或數量,規劃出獨立的模組(單一功能至多個功能),其用意在於使系統之各功能模組可依相互獨立,完全窮盡(MECE)的思考原則下設計,促使各模組獨立,以利移植、安裝並縮短啟動時間。 1.2.模組程式庫優先機制:用以優先取得不同版本之相同程式庫,相 較於存在共用程式庫目錄下相同程式庫,有利於讓新模組得以使用新 版程式庫部署而不影響原系統運作,有助於系統技術升級。 1.3.模組過載保全機制:用以保全服務平台免於部署時因服務平台記 憶體存量不足而無法運行。 1.4.零請求監控機制:用以防止因模組需要重新部署或移除而中斷尚 在執行中之請求。 1.5.熱部署監控機制:用以監控運行中之模組及模組目錄之相關檔案異動以及模組之新增,並調用量化式部署機制完成熱部署。 1.6.資訊記錄器:用以提供於量化式部署機制及熱部署監控機制記錄平台資訊及模組資訊。 1.6.1平台資訊,包含有:服務平台名稱、狀態、服務平台記憶存量、服務平台位址、服務平台保全定量、模組部署預估量、平台註冊中心位址、請求過載保全定量、請求期限定量、及模組監控間隔時間。 1.6.2模組資訊,包含有:模組名稱(實體名稱)、版本、模組狀態、類別載入器、待請求總筆數、待請求處理總筆數、熱部署模組名稱(邏輯名稱)、模組實際部署所需量等資訊 。 1.7.訊息通知器:用以向平台註冊中心登錄及同步服務平台及模組資訊,由量化式部署機制、熱部署監控機制及請求過載保全機制所觸發。 1.8.模組委任機制:用以將請求委任該模組執行請求。 1.9.請求過載保全機制 :用以保全系統免於因請求過載而無法運行。 2.網路伺服器(習知元件):用以安裝並啟動服務平台,以使服務平台可接收請求。 3.運作方式:藉由網路伺服器之啟動讀取服務平台配置檔各參數值(請參考服務平台配置檔說明),依初始化部署(流程),完成模組之初始化而成為運行中之模組,並同步服務平台及模組資訊於資訊記錄器(平台/模組),之後啟動熱部署監控機制,以執行監控部署(流程),而完成服務平台之啟動 。啟動後,等待客戶端請求或觸發訊息通知器藉由平台註冊中心位址登錄服務平台及模組資訊,並使分流器利用服務平台位址與該服務平台建立連結,而完成服務平台及模組的註冊,等待由分流器分派請求。Please refer to the third figure: service platform structure and its operation diagram, service platform, including: a module administrator, including: 1. Quantitative deployment mechanism, 2. Module library priority mechanism, 3. Module overload Security mechanism, 4. Zero request monitoring mechanism, 5. Hot deployment monitoring mechanism, 6. Information recorder, 7. Message notifier, 8. Module appointment mechanism, 9. Request overload protection mechanism (Request timeout over-preservation mechanism) And the request volume is fast and secure), and a network server (known component). 1. Module administrator: 1.1. Quantitative deployment mechanism: used to deploy various modes (please refer to the deployment mode description), so that designers can plan independent modules according to the function or quantity of modules (single function at most The function is to make the function modules of the system independent of each other and completely exhausted (MECE) thinking principle, so that each module is independent, in order to facilitate transplantation, installation and shorten the startup time. 1.2. Module library priority mechanism: It is used to prioritize different versions of the same library. Compared with the same library in the shared library directory, it is beneficial to allow new modules to be deployed using the new library without affecting the original system. Operation helps to upgrade the system technology. 1.3. Module overload security mechanism: It is used to protect the service platform from being deployed due to insufficient memory of the service platform. 1.4. Zero Request Monitoring Mechanism: Used to prevent requests that are still being executed due to the need for modules to be redeployed or removed. 1.5. Hot deployment monitoring mechanism: It is used to monitor the related file changes of the modules and module catalogs in operation and the addition of modules, and call the quantitative deployment mechanism to complete the hot deployment. 1.6. Information Logger: Used to provide quantitative information on the platform information and module information provided by the quantitative deployment mechanism and the hot deployment monitoring mechanism. 1.6.1 Platform information, including: service platform name, status, service platform memory inventory, service platform address, service platform security quantification, module deployment estimate, platform registration center address, request overload security quantification, request period Quantitative, and module monitoring interval. 1.6.2 Module information, including: module name (entity name), version, module status, category loader, total number of pending requests, total number of pending requests, hot deployment module name (logical name) ), the actual amount of module deployment required and other information. 1.7. Message Notifier: Used to log in to the platform registration center and synchronize the service platform and module information, triggered by the quantitative deployment mechanism, the hot deployment monitoring mechanism and the request overload protection mechanism. 1.8. Module Appointment Mechanism: Used to request the module to execute the request. 1.9. Request overload protection mechanism: to protect the system from being overloaded due to request overload. 2. Network server (known component): used to install and start the service platform so that the service platform can receive the request. 3. Operation mode: read the parameter values of the service platform configuration file by the start of the network server (please refer to the service platform configuration file description), and complete the initialization of the module to become the running mode according to the initial deployment (process). Group, and synchronize the service platform and module information to the information recorder (platform/module), and then start the hot deployment monitoring mechanism to perform the monitoring deployment (process) and complete the startup of the service platform. After the startup, wait for the client to request or trigger the message notifier to log in to the service platform and module information through the platform registration center address, and make the taper establish a connection with the service platform by using the service platform address to complete the service platform and the module. Registration, waiting for a request to be dispatched by the shunt.

註:服務平台之網路伺服器可由分流器啟動或人工啟動;分流器與服務平台亦可安裝於同一台網路伺服器,為分散系統之緣故而分別安裝於不同之網路伺服器。Note: The network server of the service platform can be started or manually started by the shunt; the shunt and the service platform can also be installed on the same network server, and are respectively installed on different network servers for the sake of the distributed system.

接下來說明服務平台的初始化部署(流程)、監控部署(流程)、請求過程以及保全機制,並藉此說明服務最佳化的各點理由。Next, the initial deployment (process) of the service platform, the monitoring deployment (process), the request process, and the security mechanism are explained, and the reasons for the service optimization are explained.

請參考第三圖:服務平台結構及其運作示意圖、第四圖:服務平台目錄結構圖。Please refer to the third figure: the service platform structure and its operation diagram, and the fourth picture: the service platform directory structure diagram.

1.初始化部署(流程):量化式部署機制依部署模式在系統目錄下的平台目錄,依序搜尋各模組(即第三圖中系統目錄/平台目錄下之MA、MB、MC、MD)並依目錄層次及目錄名稱之關係及服務平台名稱創建各模組的名稱,之後以模組程式庫優先機制建立各模組檔案資訊(依序為模組程式集合、熱部署版本檔案、模組檔案集合、模組程式庫集合以及共用程式庫集合)後,創建各模組之類別載入器,並通過模組過載保全機制之檢核以完成部署,完成後,同步該平台資訊及其所有模組資訊,並啟動熱部署監控機制。 運作狀態說明: 1.1依據服務平台保全定量及模組部署預估量之設定,由模組過載保全機制判斷目前系統記憶體存量是否足以完成部署。 1.1.1若足夠則啟動且設定該模組狀態為啟動中,完成部署後設定模組狀態為運行中(即第三圖中運行中的模組MA、MB、MC、MD)且同步該模組資訊。 1.1.1.1若啟動失敗,則設定該模組狀態為待啟動(由熱部署監控機制再啟動)且同步該模組資訊。 1.1.2若不足夠則不啟動,並設定該模組狀態為待啟動(由熱部署監控機制再啟動)且同步該模組資訊。 註:1.同步平台資訊及模組資訊之對象為資訊記錄器及平台註冊中心。 2.藉由模組程式庫優先機制升級模組程式庫之功能。1. Initial deployment (process): The quantitative deployment mechanism searches for each module in the platform directory under the system directory according to the deployment mode (ie, MA, MB, MC, MD under the system directory/platform directory in the third figure) The names of the modules are created according to the relationship between the directory hierarchy and the directory name and the name of the service platform. Then, the module file information is established by the module library priority mechanism (the module program collection, the hot deployment version file, and the module in sequence). After the file collection, the module library collection, and the shared library collection, the class loader of each module is created, and the module overload check mechanism is checked to complete the deployment. After the completion, the platform information and all of the information are synchronized. Module information and launch a hot deployment monitoring mechanism. Operation status description: 1.1 According to the service platform security quantification and module deployment estimation, the module overload protection mechanism determines whether the current system memory inventory is sufficient for deployment. 1.1.1 If it is enough, start and set the module status to start. After the deployment is complete, set the module status to running (ie, the running modules MA, MB, MC, MD in the third figure) and synchronize the module. Group information. 1.1.1.1 If the startup fails, set the module status to be started (restarted by the hot deployment monitoring mechanism) and synchronize the module information. 1.1.2 If it is not enough, it will not start, and set the module status to be started (restarted by the hot deployment monitoring mechanism) and synchronize the module information. Note: 1. The target of synchronous platform information and module information is the information recorder and platform registration center. 2. Upgrade the functionality of the module library by the module library priority mechanism.

2.監控部署(流程):熱部署監控機制於平台目錄中依序監控搜尋各模組的模組程式集合、模組檔案集合、模組程式庫集合及共用程式庫集合是否異動、或已移除並監控檢查運行中之各模組之模組狀態,藉由量化式部署機制、模組程式庫優先機制、模組過載保全機制及零請求監控機制完成重新部署或移除以及模組之新增,於完成所有模組檢查後,同步該平台資訊及其所有模組資訊,並依模組監控間隔時間再監控。 運作狀態說明: 2.1若該模組狀態待啟動,則依步驟1.1重新部署該模組。 2.2若該模組目錄為新增,則依步驟1.1部署該模組。 2.3若該模組目錄已移除且無請求,則設定模組狀態為待移除且立即 同步該模組資訊後執行移除該模組,完成後,設定模組狀態為已移除 立即同步該模組資訊。 2.3.1若有請求則設定該模組狀態為待移除(請求中)且立即同步該模組資訊,於該模組之請求皆已執行完成後(零請求)執行移除該模組,完成後,設定模組狀態為已移除立即同步該模組資訊。 2.4若該模組相關檔案異動且無請求,設定該模組狀態為待更新且立 即同步該模組資訊後依步驟1.1 重新部署該模組,並於完成部署設 定該模組狀態為運行中且立即同步該模組資訊。 2.4.1若有請求則設定該模組狀態為待更新(請求中)且立即同步該模組資訊,使其不得再接受請求,於該模組之請求皆已執行完成後(零請求),執行該模組之重新部署,並於完成部署設定該模組狀態為運行中且立即同步該模組資訊,以接收請求。 註:藉由監控部署(流程)達成提供服務不中斷。2. Monitoring deployment (process): The hot deployment monitoring mechanism sequentially monitors the module program collection, the module file collection, the module library collection, and the shared library collection of each module in the platform directory for change or has been moved. In addition to monitoring and monitoring the module status of each module in the operation, the redeployment or removal and the new module are completed by the quantitative deployment mechanism, the module library priority mechanism, the module overload protection mechanism and the zero request monitoring mechanism. After the completion of all module checks, the platform information and all its module information are synchronized and monitored according to the module monitoring interval. Operation status description: 2.1 If the module status is to be started, re-deploy the module according to step 1.1. 2.2 If the module directory is new, deploy the module according to step 1.1. 2.3 If the module directory has been removed and there is no request, set the module status to be removed and immediately synchronize the module information to perform the removal of the module. After completion, set the module status to removed immediately. The module information. 2.3.1 If there is a request, set the module status to be removed (in the request) and immediately synchronize the module information. After the request of the module has been executed (zero request), the module is removed. After the completion, set the module status to removed and immediately synchronize the module information. 2.4 If the module related file is changed and there is no request, set the module status to be updated and immediately synchronize the module information, then redeploy the module according to step 1.1, and set the module state to be running after the deployment is completed. Synchronize the module information immediately. 2.4.1 If there is a request, set the module status to be updated (in the request) and immediately synchronize the module information so that it can no longer accept the request. After the request of the module has been executed (zero request), Performing the redeployment of the module, and setting the module state to be running and immediately synchronizing the module information to complete the request to receive the request. Note: The provision of services by monitoring the deployment (process) is not interrupted.

請參考第五圖:請求過程及請求保全機制運作流程圖。Please refer to the fifth picture: the request process and the flow chart of the request security mechanism.

3.於請求時,選擇器藉由請求資訊(熱部署模組名稱、版本、服務範疇名稱、請求處理筆數、請求內容)之熱部署模組名稱(邏輯名稱),至平台註冊中心,在相同之熱部署模組名稱中依所設定之分流策略(依最新版、或依指定版本、或依服務範疇、或依待請求處理總筆數最少、或依待請求總筆數最少、或依服務平台記憶體存量存量最多、或依上述分流策略組合)選擇狀態為運行中之模組名稱及服務平台位址。3. Upon request, the selector sends the module name (logical name) to the platform registry by requesting information (hot deployment module name, version, service category name, request processing number, request content) The same hot deployment module name according to the set diversion policy (according to the latest version, or according to the specified version, or according to the service category, or the minimum number of requests processed according to the request, or the minimum number of requests for the request, or The service platform has the largest memory inventory, or is combined according to the above-mentioned split strategy. The selected state is the running module name and the service platform address.

再將模組名稱、請求內容、請求處理筆數,藉由服務平台位址轉傳至該模組之服務平台,並藉由模組委任機制,以模組名稱於資訊記錄器中,取得該模組執行請求,並將累計請求數及累計請求處理筆數記錄於資訊記錄器中,於請求完成後,扣除該請求筆數及該請求處理筆數,同時取得服務平台記憶存量並將請求結果、待請求處理總筆數、待請求總筆數及服務平台記憶體存量回傳選擇器,同步於平台註冊中心(供下一個請求參考),最後回傳請求結果。 註: 請求處理筆數為請求內容須要商務邏輯處理之筆數。 待請求處理總筆數=累計請求處理筆數加上或扣除該請求處理筆數。 待請求總筆數=累計請求筆數加上或扣除該請求筆數(一般而言,該請求筆數=1)。 若請求筆數為1,而該請求處理筆數可為1至多筆。The module name, the request content, and the number of requests processed are transferred to the service platform of the module through the service platform address, and the module name is used to obtain the module name in the information recorder. The module executes the request, and records the cumulative number of requests and the number of accumulated request processing records in the information recorder. After the request is completed, the number of requests and the number of requests processed are deducted, and the service platform memory inventory is obtained and the result is requested. The total number of requests to be processed, the total number of requests to be requested, and the service platform memory inventory return selector are synchronized with the platform registration center (for the next request reference), and finally the result of the request is returned. Note: The number of requests processed is the number of transactions required by the business logic for the requested content. Total number of pending requests = cumulative request processing number plus or minus the number of requests processed. Total number of pending requests = cumulative number of requests plus or minus the number of requests (generally, the number of requests = 1). If the number of requests is 1, the number of requests processed can be 1 or more.

註:藉依待請求處理總筆數最少、或依待請求總筆數最少、或依服務平台記憶體存量最多之分流方式達成提供多種分流策略及更精準之負載平衡。Note: Multiple shunting strategies and more accurate load balancing are achieved by processing the request with the least number of requests, or by the minimum number of requests, or by the shunting method with the most memory of the service platform.

註:藉由依服務範疇之分流方式達成為特定族群提供專屬之執行環境,進言之,藉由預先將一服務平台設定供其所執行之記憶體量及CPU或CPU之核心,若請求資訊中附帶有服務範疇名稱並與服務平台名稱相同,則分派至該服務平台;另一種服務範疇的分流方式為將服務範疇名稱與模組名稱比對,找出合適的模組名稱集合(可能一或多個模組名稱),或再依其他分流策略分派請求。Note: By providing a specific execution environment for a specific group by means of diversion of services, in other words, by setting a service platform in advance for the amount of memory and CPU or CPU core to be executed, if the request information is included If there is a service category name and the same name as the service platform, it is assigned to the service platform; the other service category is to compare the service category name with the module name to find a suitable set of module names (may be one or more Module name), or dispatch requests based on other offload policies.

註:藉由分流策略中依最新版之分流方式,而達成永續之服務,進言之,以第三圖中系統目錄/模組目錄下之MA、MB 為例,假設服務平台名稱為S1,若以熱部署模組名稱為MX,將功能相同之兩模組S1.MA及S1.MB建立關連(建立關連方式可採用任何可供記錄的電子檔如:檔案、多層次目錄之名稱等等),而於S1.MA重新部署前,立即同步模組狀態為待更新,使請求皆由S1.MB完成,於S1.MA完成部署後,同步模組狀態為運行中且其版本為最新版,而使得請求皆由S1.MA完成,待S1.MB亦完成部署並與S1.MA為相同的版本,再依其他分流方式完成請求之分派。Note: The sustainable service is achieved by the shunting strategy according to the latest version of the diversion method. In other words, take the MA and MB under the system directory/module directory in the third figure as an example, assuming the service platform name is S1. If the name of the hot deployment module is MX, the two modules S1.MA and S1.MB with the same function are connected (the establishment of the connection mode can use any recordable electronic file such as: file, multi-level directory name, etc. Before the S1.MA is redeployed, the status of the synchronization module is to be updated immediately, so that the request is completed by S1.MB. After the S1.MA is deployed, the status of the synchronization module is running and its version is the latest version. Therefore, the request is completed by S1.MA, and the S1.MB is also deployed and is the same version as S1.MA, and the request is dispatched according to other distribution methods.

4.保全機制說明: 4.1模組過載保全機制 4.1.1初始化部署時須滿足下列條件:該服務平台記憶體存量須大於該服務平台保全定量+該模組部署預估量,始可部署。 4.1.2監控部署時須滿足下列條件:該服務平台記憶體存量須大於該服務平台保全定量+該模組實際部署所需量,始可部署。 4.2請求過載保全機制 4.2.1請求超時超量保全,設定該服務平台一請求期限定量及請求過載保全定量,於該服務平台的模組委任機制委任該模組執行該請求時,同時啟動一保全監控機制,定期檢查該請求所使用之記憶量,及所花費之時間,若有超時超量則中斷該請求之執行,並回報中斷原因,以保全該服務平台免於因請求過載而無法運行。 4.2.2請求量迅增保全,設定該服務平台一服務平台保全定量,定期與該服務平台記憶體存量相比較,若該服務平台記憶體存量低於所設定的服務平台保全定量,則同步該服務平台狀態為暫停服務,待該服務平台記憶體存量高於所設定之服務平台保全定量時,再同步該服務平台狀態為服務中。 註:藉由4.1及4.2達成服務平台記憶體存量管控機制,保全系統運作。 4.3平台監控機制,依平台監控間隔時間,監控服務平台為服務中之數量,若服務平台之狀態為服務中之量數低於服務平台服務定量時,則啟動備援服務平台啟動設定檔,以達成備援服務平台之自動擴充; 若大於或等於服務平台服務定量時則啟動備援服務平台關閉設定檔。 註:藉由4.3達成自動即時(熱)備援之機制,增強系統之服務,保全系統運作。4. Description of the security mechanism: 4.1 Module overload security mechanism 4.1.1 Initial deployment must meet the following conditions: The storage capacity of the service platform must be greater than the service platform security quantitative + the module deployment estimate, can be deployed. 4.1.2 Monitoring and deployment must meet the following conditions: The memory of the service platform must be greater than the service platform's security and quantity + the actual deployment of the module, and can be deployed. 4.2 Request overload protection mechanism 4.2.1 Request timeout over-preservation, set the service platform for a request period quantitative and request overload preservation quantitative, when the module delegation mechanism of the service platform appoints the module to execute the request, simultaneously start one The security monitoring mechanism periodically checks the amount of memory used by the request and the time spent. If there is a timeout, the execution of the request is interrupted, and the reason for the interruption is reported to save the service platform from being overloaded by the request. run. 4.2.2 The request volume is increased and maintained, and the service platform is set to maintain the quantity of the service platform. The memory of the service platform is compared with the memory of the service platform. If the memory of the service platform is lower than the set service platform, the synchronization is synchronized. The service platform status is a pause service. When the service platform memory inventory is higher than the set service platform security quota, the service platform status is re-synchronized to the service. Note: The service inventory management mechanism of the service platform is achieved by 4.1 and 4.2 to ensure the operation of the system. 4.3 platform monitoring mechanism, according to the monitoring interval of the platform, the monitoring service platform is the quantity in the service. If the status of the service platform is that the quantity in the service is lower than the service platform service quantity, the backup service platform starts the setting file to Achieve automatic expansion of the backup service platform; if greater than or equal to the service platform service quota, start the backup service platform to close the configuration file. Note: By means of 4.3 automatic automatic (hot) backup mechanism, the system's services are enhanced and the system is guaranteed to operate.

5.配置檔說明: 5.1分流器配置檔參數說明,包含有: 5.1.1服務平台設定檔:包含各服務平台啟動及關閉檔路徑之記錄。 5.1.2備援服務平台設定檔:包含各備援服務平台啟動及關閉檔路徑之記錄。 5.1.3服務平台服務定量:保全該分散式系統所需服務平台之數量。 5.1.4平台監控間隔時間:提供於平台監控機制再監控平台註冊中心之間隔時間。 5.2服務平台配置檔參數說明,包含有: 5.2.1系統名稱:用以定義系統名稱。 5.2.2系統目錄: 如D:\abc\system。 5.2.3服務平台名稱:該服務平台名稱,如:S1。 5.2.4服務平台位址:該服務平台位址,提供分流器連接該服務平台。 5.2.5平台註冊中心位址:提供登錄及同步該服務平台資訊、模組資訊之平台註冊中心的位址。 5.2.6平台目錄名稱:用以定義存放各模組的目錄名稱。 5.2.7部署模式:如部署模式說明。 5.2.8服務平台保全定量:保全服務平台運行之記憶體定量。 5.2.9模組部署預估量:模組部署時,預估所需之記憶體基本量。 5.2.10請求過載保全定量:該服務平台之請求可執行最大記憶體使用量。 5.2.10請求期限定量:該服務平台之請求可執行的最久時間 。 5.2.11模組監控間隔時間:提供於熱部署監控機制再監控之間隔時間。5. Configuration file description: 5.1 shunt configuration file parameter description, including: 5.1.1 service platform configuration file: contains the record of each service platform startup and shutdown file path. 5.1.2 Backup Service Platform Profile: Contains records of the startup and shutdown paths of each backup service platform. 5.1.3 Service Platform Service Quantification: The number of service platforms required to maintain the distributed system. 5.1.4 Platform monitoring interval: Provides the interval between the platform monitoring mechanism and the monitoring platform registration center. 5.2 Service Platform Configuration File Parameter Description, including: 5.2.1 System Name: Used to define the system name. 5.2.2 System Directory: For example, D:\abc\system. 5.2.3 Service Platform Name: The name of the service platform, such as: S1. 5.2.4 Service Platform Address: The address of the service platform, which provides a shunt to connect to the service platform. 5.2.5 Platform Registration Center Address: The address of the platform registration center that provides login and synchronization of the service platform information and module information. 5.2.6 Platform Directory Name: Used to define the directory name where each module is stored. 5.2.7 Deployment Mode: As explained in the deployment mode. 5.2.8 Service Platform Preservation Quantitative: Quantify the memory of the service platform. 5.2.9 Module deployment estimate: The estimated amount of memory required for module deployment. 5.2.10 Request Overload Security Quantitation: The request for this service platform can perform the maximum memory usage. 5.2.10 Request Period Quantification: The maximum time that the service platform's request can be executed. 5.2.11 Module monitoring interval: Provides the interval between the monitoring and monitoring mechanism of the hot deployment.

6.部署模式說明:假設一系統目錄(如c:\system)下,有一包含各模組之平台目錄(如:module),若有一模組,置於一名為MA的目錄,則依不同之部署模式(Module、Package、Operation),其所呈現之目錄結構層次及其模組名稱(實體名稱),如下所示: 6.1 Module模式:平台目錄下包含一層目錄,該模組所有相關檔案置於此目錄中,以此方式部署之目錄結構為系統目錄+平台目錄+該模組目錄。如例,則其目錄結構為c:\system\module\MA,該模組之模組名稱為: MA,配合服務平台名稱(若為S1),則模組名稱為:S1.MA。 6.2 Package 模式:平台目錄下包含二層目錄,該模組所有相關檔案置於該模組目錄之第二層目錄,以此方式部署之目錄結構為系統目錄+平台目錄+該模組目錄之第一層目錄+該模組目錄之第二層目錄。如例,則其目錄結構可為c:\system\module\X\MA,該模組之模組名稱則為:X.MA,配合服務平台名稱(若為S1),則模組名稱為:S1.X.MA。 6.3 Operation模式:平台目錄下包含三層目錄,該模組所有相關檔案置於該模組目錄之第三層目錄,以此方式部署之目錄結構為系統目錄+平台目錄+該模組目錄之第一層目錄+該模組目錄之第二層+該模組目錄之第三層目錄。如例,則其目錄結構可為c:\system\module\X\Y\MA,該模組之模組名稱則為:X.Y.MA,配合服務平台名稱(若為S1),則模組名稱為:S1.X.Y.MA。 註:藉由部署模式所提供之多層目錄結構命名模組名稱而達成模組分類管理; 亦可以以此建立模組關連的熱部署模組名稱,如以S1.X.1及S2.X.2,即可視為不同平台下X模組的不同版本。6. Deployment mode description: Suppose a system directory (such as c:\system) has a platform directory (such as module) containing each module. If there is a module, it is placed in a directory of MA. The deployment mode (Module, Package, Operation), the directory structure level and its module name (entity name) are as follows: 6.1 Module mode: The platform directory contains a layer of directories, all related files of the module In this directory, the directory structure deployed in this way is system directory + platform directory + the module directory. For example, the directory structure is c:\system\module\MA, and the module name of the module is: MA, and the name of the service platform (if S1), the module name is: S1.MA. 6.2 Package mode: The platform directory contains a second-level directory. All related files of the module are placed in the second-level directory of the module directory. The directory structure deployed in this way is system directory + platform directory + the module directory. One level directory + the second level directory of the module directory. For example, the directory structure can be c:\system\module\X\MA, and the module name of the module is: X.MA. If the service platform name (if S1), the module name is: S1.X.MA. 6.3 Operation mode: The platform directory contains three levels of directories. All related files of the module are placed in the third level directory of the module directory. The directory structure deployed in this way is system directory + platform directory + the module directory. One level directory + the second level of the module directory + the third level directory of the module directory. For example, the directory structure can be c:\system\module\X\Y\MA, and the module name of the module is: X.Y.MA, with the service platform name (if S1), the module The group name is: S1.X.Y.MA. Note: Module classification management is achieved by naming the module name of the multi-layer directory structure provided by the deployment mode; it is also possible to establish the name of the thermal deployment module associated with the module, such as S1.X.1 and S2.X. 2, can be regarded as different versions of the X module under different platforms.

7.服務平台目錄說明(請參考第四圖:服務平台目錄結構圖): 7.1系統目錄/平台目錄:即服務平台配置檔參數所設定之系統目錄名稱及平台目錄名稱,各模組至於平台目錄中。 7.2模組目錄:為一模組之相關檔案存放目錄。 7.2.1模組程式集合:為該模組之應用程式集合如商業邏輯程式、資料存取物件(DAO)等。 7.2.2熱部署版本檔案:提供設定熱部署模組名稱(邏輯名稱)、版本(註:熱部署模組名稱用以關連相同功能之模組,而視為同一模組;版本用以設定該模組版本)。 7.2.3模組相關檔案目錄:即存放該模組設定檔、多國語言檔等等之目錄。 7.2.4模組檔案集合:為該模組設定檔、多國語言檔等等。 7.2.5模組程式庫目錄:為只提供該模組所需參考程式庫之目錄。 7.2.6模組程式庫集合:為只提供該模組所需參考之程式庫。 7.3共用程式庫目錄:為提供各模組所需參考程式庫之目錄。 7.3.1共用程式庫集合:為提供各模組所需參考之各類程式庫。7. Service platform directory description (please refer to the fourth picture: service platform directory structure diagram): 7.1 system directory / platform directory: the system directory name and platform directory name set by the service platform configuration file parameters, each module to the platform directory in. 7.2 Module Catalog: A directory for the related files of a module. 7.2.1 Module program collection: A collection of applications for the module, such as business logic programs, data access objects (DAO), and so on. 7.2.2 Hot Deployment Version File: Provides the name (logical name) and version of the hot deployment module (Note: The name of the hot deployment module is used to associate the same function module, and is regarded as the same module; the version is used to set the Module version). 7.2.3 Module related file directory: that is, the directory where the module configuration file, multi-language file, etc. are stored. 7.2.4 Module file collection: set the file for the module, multi-language file, and so on. 7.2.5 Module Library Directory: A directory that provides only the reference libraries required for the module. 7.2.6 Module library collection: A library that only provides the reference for the module. 7.3 Shared library directory: A directory for providing reference libraries for each module. 7.3.1 Shared library collection: A library of various types of references that are required for each module.

8.以上所述僅為本發明之較佳實施例,並將方法(機制),流程名詞化以便說明,任何名詞之修改但其功能相似或依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。8. The above is only the preferred embodiment of the present invention, and the method (mechanism) and process are nominalized to illustrate the modification of any noun, but the function is similar or the equal change and modification according to the scope of the patent application of the present invention. All should fall within the scope of the present invention.

no

第一圖:是分散式系統架構及運作示意圖。 第二圖:是分流器結構及其運作示意圖。 第三圖:是服務平台結構及運作示意圖。 第四圖:是服務平台目錄結構圖。 第五圖:是請求過程及請求保全機制運作示意圖。The first picture is a schematic diagram of the decentralized system architecture and operation. The second picture is a schematic diagram of the shunt structure and its operation. The third picture is a schematic diagram of the structure and operation of the service platform. The fourth picture: is the service platform directory structure diagram. Figure 5: Schematic diagram of the request process and the operation of the request security mechanism.

Claims (10)

一種服務不中斷的電腦系統,包含有:一部署器,用以部署各獨立模組;一模組過載保全機制,用以保全服務平台免於部署時因服務平台記憶體存量不足而無法運行;一零請求監控機制,用以防止因模組需要重新部署或移除而中斷尚在執行中之請求;一熱部署監控機制,用以監控運行中之模組及模組目錄之相關檔案異動或模組之新增,並執行熱佈署,或模組之移除;一模組委任器,用以將請求依模組名稱委任該模組執行。 A computer system with uninterrupted service includes: a deployer for deploying each independent module; and a module overload protection mechanism for ensuring that the service platform is free from deployment due to insufficient memory of the service platform; A zero-request monitoring mechanism to prevent interrupts from being executed while the module needs to be redeployed or removed; a hot deployment monitoring mechanism to monitor related file changes in the running module and module catalog or The module is added, and the hot deployment or module removal is performed; a module appointor is used to appoint the module to execute the request according to the module name. 一種使用於電腦系統的服務不中斷的方法,包含:藉由網路伺服器之啟動讀取服務平台配置檔各參數值,依初始化部署流程,完成模組之初始化而成為運行中之模組,並同步服務平台及模組資訊於資訊記錄器,之後啟動熱部署監控機制,以執行監控部署流程,而完成服務平台之啟動,等待客戶端請求,於請求時,透過一模組委任器,藉由模組名稱,取得該模組以執行相關功能。 A method for uninterrupted service of a computer system includes: reading a parameter value of a service platform configuration file by starting a network server, and completing the initialization of the module to become a running module according to an initial deployment process; And synchronize the service platform and module information to the information recorder, and then start the hot deployment monitoring mechanism to execute the monitoring deployment process, complete the service platform startup, wait for the client request, and request, through a module appointor, The module is obtained from the module name to perform related functions. 如請求項2所述之方法,其中藉由一模組過載保全機制,用以保全服務平台免於部署時因服務平台記憶體存量不足而無法運行,其方法包含步驟:於初始化部署流程時,該服務平台記憶體存量須大於該服務平台保全定量加上該模組部署預估量,始可部署;於監控部署流程時,該服務平台記憶體存量須大於該服務平台保全定量加上該模組實際部署所需量,始可部署。 The method of claim 2, wherein the module overload protection mechanism is used to protect the service platform from being incapable of running due to insufficient memory of the service platform during deployment, and the method comprises the steps of: during initializing the deployment process, The service platform memory inventory must be greater than the service platform security quota plus the module deployment estimate, and can be deployed; when monitoring the deployment process, the service platform memory inventory must be greater than the service platform security quota plus the model The actual amount of deployment required by the group can be deployed. 如請求項2所述之方法,其中藉由一請求過載保全機制,用以保全系統免於因請求過載而無法運行,進一步包含有:請求超時超量保全機制,以及請求量迅增保全機制,其方法包含步驟:於請求委任後,同時啟動一請求監控程式,監控該請求之執行時間及該請求之記憶體使用量,若超過請求期限定量或請求過載保全定量則中斷該請求之執行,以及依該服務平台保全定量之設定,定期與該服務平台記憶體存量相比較,若該服務平台記憶體存量低於所設定之該服務平台保全定量,則設定該服務平台狀態為暫停服務。 The method of claim 2, wherein the request overload protection mechanism is used to protect the system from being overloaded due to request overload, and further includes: a request timeout over-preservation mechanism, and a request quantity fast-increasing mechanism The method includes the steps of: after requesting the appointment, simultaneously starting a request monitoring program, monitoring the execution time of the request and the memory usage of the request, and interrupting the execution of the request if the request deadline is quantified or the overload protection is requested. And according to the setting of the security platform of the service platform, the memory of the service platform is periodically compared with the memory of the service platform. If the memory of the service platform is lower than the set security of the service platform, the service platform state is set to be suspended. 如請求項2所述之方法,其中藉由一零請求監控機制,用以防止因模組需要重新部署或移除而中斷尚在執行中之請求,其方法包含步驟:於請求時,將該請求累計於該模組資訊記錄器中的待請求總筆數,於該模組完成請求後,回應前,將該模組資訊記錄器中的待請求總筆數扣除該請求,移除 或重新部署時,該模組待請求總筆數須為零,始可重新部署或移除。 The method of claim 2, wherein the zero-request monitoring mechanism is used to prevent the request that is still being executed due to the module being required to be redeployed or removed, and the method includes the step of: when requesting, Requesting the total number of pending requests in the module information recorder, after the module completes the request, before the response, the total number of pending requests in the module information recorder is deducted from the request, and removed. Or when redeploying, the total number of pending requests for this module must be zero and can be redeployed or removed. 一種服務最佳化的電腦系統,包含有:如請求項1所述之電腦系統並加入一訊息通知器,用以登錄或同步平台資訊及模組資訊於平台註冊中心,一模組程式庫優先處理器,用以優先取得不同版本的相同程式庫,以及一模組分類管理器,用以分類模組;一分流器,用以分流請求,加入一自動即時(熱)備援之機制,用以自動啟動備援服務台。 A computer system for optimizing services includes: a computer system as claimed in claim 1 and a message notifier for logging in or synchronizing platform information and module information in a platform registration center, a module library priority a processor for preferentially obtaining different versions of the same library, and a module classification manager for classifying modules; a shunt for offloading requests, adding an automatic instant (hot) backup mechanism, To automatically start the backup service desk. 如請求項6所述之系統,其中該模組分類管理器提供至少二層目錄結構以命名模組名稱而分類模組。 The system of claim 6, wherein the module classification manager provides at least a two-level directory structure to classify the module name and classify the module. 如請求項6所述之系統,其中該模組程式庫優先處理器在該模組目錄結構,提供該模組程式庫目錄及共用程式庫目錄,並置放相關程式庫,於部署流程建立程式庫時,先行建立該模組程式庫目錄下的程式庫,再建立共用程式庫目錄下的程式庫。 The system of claim 6, wherein the module library priority processor is in the module directory structure, providing the module library directory and the shared library directory, and placing the relevant library to create a library in the deployment process. When you first create a library in the module library directory, and then create a library in the shared library directory. 一種服務最佳化的電腦系統的方法,包含:藉由網路伺服器之啟動讀取服務平台配置檔各參數值,依初始化部署流程,完成模組之初始化而成為運行中之模組,並同步服務平台及模組資訊於資訊記錄器,之後啟動熱部署監控機制,以執行監控部署流程,而完成服務平台之啟動,並登錄或同步平台資訊及模組資訊至一網路伺服器之平台註冊中心,以供該網路伺服器傳送請求至該服務平台,或供該網路伺服器之分流器依最新版本分流或其他分流策略(不含相互組合及指定版本)分派請求至該服務平台。 A method for optimizing a computer system includes: reading a parameter value of a service platform configuration file by starting a network server, completing an initialization of the module according to an initial deployment process, and becoming a running module, and Synchronize the service platform and module information to the information logger, and then start the hot deployment monitoring mechanism to perform the monitoring and deployment process, complete the service platform startup, and log in or synchronize the platform information and module information to a network server platform. a registration center for the web server to send a request to the service platform, or for the network server's splitter to dispatch requests to the service platform according to the latest version of the offload or other offload policies (excluding mutual combination and specified version) . 如請求項9所述之方法,進一步包含有自動即時(熱)備援之方法包含流程:藉由一分流器中加入一平台監控機制,用以監控服務平台之狀態,若該分流器之服務平台之狀態為服務中之數量低於服務平台服務定量時,則啟動一備援服務平台啟動設定檔,以使一備援服務平台向平台註冊中心登錄完成註冊,以供分流器分派請求。The method of claim 9, further comprising an automatic instant (hot) backup method comprising the process of: adding a platform monitoring mechanism to a router to monitor the status of the service platform, if the service of the power splitter When the status of the platform is that the quantity in the service is lower than the service platform service quantity, a backup service platform startup profile is started, so that a backup service platform registers with the platform registration center to complete the registration for the splitter to dispatch the request.
TW104110140A 2015-03-27 2015-03-27 Method and system for optimization service TWI584654B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
TW104110140A TWI584654B (en) 2015-03-27 2015-03-27 Method and system for optimization service
CN201610177195.6A CN106027591B (en) 2015-03-27 2016-03-24 Service optimization computer system and method thereof
CN201811558724.2A CN109660618A (en) 2015-03-27 2016-03-24 A kind of the load balance current divider and its method of multiple distributing strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW104110140A TWI584654B (en) 2015-03-27 2015-03-27 Method and system for optimization service

Publications (2)

Publication Number Publication Date
TW201536057A TW201536057A (en) 2015-09-16
TWI584654B true TWI584654B (en) 2017-05-21

Family

ID=54695383

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104110140A TWI584654B (en) 2015-03-27 2015-03-27 Method and system for optimization service

Country Status (2)

Country Link
CN (2) CN106027591B (en)
TW (1) TWI584654B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI695329B (en) * 2019-04-01 2020-06-01 中華電信股份有限公司 Data sharding management system and method on container platform

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI573025B (en) * 2015-10-01 2017-03-01 Chunghwa Telecom Co Ltd The method of deploying the cloud system and the computer to read the media device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327351B2 (en) * 2009-04-30 2012-12-04 Sap Ag Application modification framework
CN103546572A (en) * 2013-10-30 2014-01-29 北京荣之联科技股份有限公司 Cloud storage device and multi-cloud storage networking system and method
US20140215452A1 (en) * 2013-01-28 2014-07-31 Red Hat, Inc. Deployment Optimization for High Availability in a Multi-Tenant Platform-as-a-Service (PaaS) System

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192937B (en) * 2006-11-24 2010-05-12 华为技术有限公司 A hot deployable method and its system
CN101309167B (en) * 2008-06-27 2011-04-20 华中科技大学 Disaster allowable system and method based on cluster backup
CN102402427B (en) * 2010-09-09 2015-09-02 阿里巴巴集团控股有限公司 A kind of update method of java application and device
US8447894B2 (en) * 2011-01-05 2013-05-21 Alibaba Group Holding Limited Upgrading an elastic computing cloud system
CN103678240B (en) * 2012-09-18 2018-08-24 阿里巴巴集团控股有限公司 Method and system for carrying out modularization management to Distributed Calculation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8327351B2 (en) * 2009-04-30 2012-12-04 Sap Ag Application modification framework
US20140215452A1 (en) * 2013-01-28 2014-07-31 Red Hat, Inc. Deployment Optimization for High Availability in a Multi-Tenant Platform-as-a-Service (PaaS) System
CN103546572A (en) * 2013-10-30 2014-01-29 北京荣之联科技股份有限公司 Cloud storage device and multi-cloud storage networking system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI695329B (en) * 2019-04-01 2020-06-01 中華電信股份有限公司 Data sharding management system and method on container platform

Also Published As

Publication number Publication date
CN106027591B (en) 2020-03-27
CN109660618A (en) 2019-04-19
CN106027591A (en) 2016-10-12
TW201536057A (en) 2015-09-16

Similar Documents

Publication Publication Date Title
JP7391862B2 (en) AUTOMATICALLY DEPLOYED INFORMATION TECHNOLOGY (IT) SYSTEMS AND METHODS
US10824455B2 (en) Virtualized server systems and methods including load balancing for virtualized file servers
JP6630792B2 (en) Manage computing sessions
US8930953B2 (en) Dynamic checking of hardware resources for virtual environments
US9104461B2 (en) Hypervisor-based management and migration of services executing within virtual environments based on service dependencies and hardware requirements
US11146620B2 (en) Systems and methods for instantiating services on top of services
CN111290834B (en) Method, device and equipment for realizing high service availability based on cloud management platform
JP5984926B2 (en) Controlling network usage
US9015177B2 (en) Dynamically splitting multi-tenant databases
US9075661B2 (en) Placing objects on hosts using hard and soft constraints
US9842037B2 (en) Method and apparatus for verifying configuration
JP6182265B2 (en) Managing computing sessions
US9710249B2 (en) Dynamic configuration of virtual appliances
RU2653292C2 (en) Service migration across cluster boundaries
JP6840099B2 (en) Service provision system, resource allocation method, and resource allocation program
JP2003114801A (en) System and method to automate management of computer services and programmable devices
US8245233B2 (en) Selection of a redundant controller based on resource view
CN115665147A (en) Data plane API in a distributed computing network
Rajalakshmi et al. An improved dynamic data replica selection and placement in cloud
US8995424B2 (en) Network infrastructure provisioning with automated channel assignment
US10965616B2 (en) Nonstop computing fabric arrangements
TWI584654B (en) Method and system for optimization service
Stack et al. Self-healing in a decentralised cloud management system
TWI644571B (en) Method and loading balance distributor for multiple-dispatch strategy
US10855521B2 (en) Efficient replacement of clients running large scale applications

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees