TWI726431B - A methodology and architecture of task nodes systems - Google Patents
A methodology and architecture of task nodes systems Download PDFInfo
- Publication number
- TWI726431B TWI726431B TW108135508A TW108135508A TWI726431B TW I726431 B TWI726431 B TW I726431B TW 108135508 A TW108135508 A TW 108135508A TW 108135508 A TW108135508 A TW 108135508A TW I726431 B TWI726431 B TW I726431B
- Authority
- TW
- Taiwan
- Prior art keywords
- task
- node
- information
- microservice
- working
- Prior art date
Links
Images
Landscapes
- Multi Processors (AREA)
Abstract
Description
本發明係關於一種任務式工作節點系統及方法,其特別在於將微服務進行規格化使能協同運作於以階層式任務節點流程所設計組成之分散式系統。 The present invention relates to a task-based work node system and method, and particularly relates to standardizing microservices to enable collaborative operation in a distributed system designed and composed of a hierarchical task node process.
傳統分散式、3 tier架構之資訊系統的開發通常以前端使用介面層(WEB)、後端資料處理中間層(AP)、後端資料處理底層(DB)來建構相關的服務,前端使用介面層(WEB)接收資訊後轉拋後端由後端資料處理中間層(AP)或後端資料處理底層(DB)對資料進行處理後進行儲存、並將處理結果回饋給前端使用介面層(WEB)。一旦業務邏輯有增修異動時,通常影響的範圍可能包含前端使用介面層(WEB)須新增、修改或異動所接收資訊,後端資料處理中間層(AP)或後端資料處理底層(DB)也必須同步作API的增修異動。而API為取最大效能處理通常會進行整合,因此在新舊邏輯並存複雜度提高的情形下進行API的增修異動,無疑會增加在API的人力開發及整測時間成本,如此將難以快速因應服務需求變化的情況,整體系統的擴充性及延展性將受限於此。 The development of traditional distributed, 3-tier architecture information system usually uses front-end user interface layer (WEB), back-end data processing middle layer (AP), back-end data processing bottom layer (DB) to construct related services, and front-end uses interface layer (WEB) After receiving the information, the back-end is transferred to the back-end. The back-end data processing middle layer (AP) or the back-end data processing bottom layer (DB) processes the data and stores it, and feeds the processing results back to the front-end user interface layer (WEB) . Once the business logic changes, the usually affected range may include the front-end user interface layer (WEB) must add, modify or change the received information, the back-end data processing middle layer (AP) or the back-end data processing bottom layer (DB) ) Must also be synchronized to make API additions and changes. APIs are usually integrated for maximum performance processing. Therefore, if the new and old logic coexist and increase the complexity of the API, it will undoubtedly increase the cost of manpower development and overall testing time in the API, which will be difficult to respond quickly. As service demand changes, the scalability and scalability of the overall system will be limited by this.
現今資訊系統也有運用物聯網技術嘗試改善以上架構上的瓶頸,如我國專利號”I465944”、專利名稱為「一種資料傳輸系統及方法」,其發明目的便是在於提供應用於雲端運算之網路資料傳輸環境,其資料傳輸系統及方法係將資料與傳送邏輯予以切割、分開,無須考慮傳送資料型式所具有之內容為何,而是使用傳輸規則中之邏輯做為傳送邏輯依據,按不同之公司代碼及/或POS代碼,來完成雲端與銷售端POS之間的資料訊息(message)交換,以解決原資料傳輸結構須將資料及/或記錄及/或新記錄、表單(table)結構之公司代碼、POS代碼與傳輸邏輯綁在一起之問題。 Today's information systems also use IoT technology to try to improve the bottleneck of the above architecture. For example, China's patent number "I465944", the patent name is "a data transmission system and method". The purpose of the invention is to provide a network for cloud computing. In the data transmission environment, the data transmission system and method are to cut and separate the data and the transmission logic. There is no need to consider the content of the transmission data type. Instead, the logic in the transmission rule is used as the basis for the transmission logic, according to different companies Code and/or POS code to complete the exchange of data messages between the cloud and the point of sale POS, to solve the original data transmission structure that requires data and/or records and/or new records, table structure companies Code, POS code and transmission logic are tied together.
然該發明雖降低資料結構與傳輸邏輯的耦合性,但銷售端POS與雲端之資料流的邏輯仍需透過邏輯中心(Policy Center)控制,因此該發明仍無法解決業務複雜度提高可能導致邏輯中心過度集中無法做有效處理而恐成系統瓶頸點之問題。 Although the invention reduces the coupling between the data structure and the transmission logic, the logic of the data flow between the point of sale POS and the cloud still needs to be controlled through the Policy Center. Therefore, the invention still cannot solve the problem that the increase in business complexity may lead to the logic center. Excessive concentration cannot be effectively handled and may become a system bottleneck problem.
本發明所述之任務式工作節點(簡稱為工作節點),其主要被應用於將業務邏輯拆解為各項具階層形式之任務後以系統流程節點概念之識別資訊綁定於特定微服務,各微服務即依據所綁定之具有系統流程節點概念之識別資訊進行運作,而微服務採本方法運作即稱為微服務規格化程序。本發明之微服務規格化程序之傳輸基礎採用訊息序列遙測傳輸(message queuing telemetry transport;MQTT)技術。MQTT為物聯網所設計的M2M通訊協定,網路頻寬與硬體需求非常少,是極為輕便的通 訊協議。MQTT通訊為一對多的M2M傳輸,使用發布(Publish)/訂閱(Subscribe)的訊息傳送機制,此機制中包含4個主要的元素,發布者(Publisher)、訂閱者(Subscriber)、標題(Topic)、訊息代理(Broker)。Publisher為訊息的來源,傳送夾帶有Topic資訊的訊息至Broker,訂閱者向Broker註冊想要接受到之訊息的Topic,例如有一Publisher發布一則Topic為”Dinner”的訊息,只要是有對Broker訂閱Topic為”Dinner”的Subscriber都能接收到此訊息。基於此技術特點,本發明之微服務於規格化程序中可依據所綁定之具有系統流程節點概念之識別資訊於互聯網路中對Broker訂閱來源節點資訊,且在接收到所訂閱之來源節點資訊為最新且正確之狀態或結果即主動執行所綁定識別資訊之任務處理次程序,完成後依據所綁定之識別資訊對Broker發布該次任務處理最新狀態或結果資訊;或是依據所綁定之具有系統流程節點概念之識別資訊主動定時執行所綁定識別資訊之任務處理次程序,完成後依據所綁定之識別資訊對Broker發布該次任務處理最新狀態或結果資訊;或是接收外部系統要求執行所綁定識別資訊之任務處理次程序,完成後依據所綁定之識別資訊對Broker發布該次任務處理最新狀態或結果資訊。本發明藉由微服務規格化程序,提供分散式系統之微服務以標準化、非同步之方式處理各項任務,簡化微服務各自內部業務處理的複雜度,並藉由彈性調整系統服務流程,提升整體系統的效能表現及優化服務的延展性。 The task-based work node (referred to as work node for short) of the present invention is mainly used to disassemble business logic into hierarchical tasks and bind the identification information of the system process node concept to specific microservices. Each microservice operates according to the binding identification information with the concept of a system process node, and the microservice operates in this method, which is called the microservice standardization process. The transmission basis of the microservice standardization program of the present invention adopts the message queuing telemetry transport (MQTT) technology. MQTT is the M2M communication protocol designed for the Internet of Things. The network bandwidth and hardware requirements are very small, and it is an extremely portable communication protocol. 讯 Agreement. MQTT communication is a one-to-many M2M transmission, using a publish/subscribe message transmission mechanism. This mechanism contains 4 main elements: Publisher, Subscriber, and Topic ), message broker (Broker). Publisher is the source of the message. It sends messages with Topic information to the Broker. Subscribers register the Topic of the message that they want to receive with the Broker. For example, a Publisher publishes a message with a topic of "Dinner", as long as there is a subscription to the Broker. Subscribers whose name is "Dinner" can receive this message. Based on this technical feature, the microservice of the present invention can subscribe the source node information to the Broker on the Internet based on the binding identification information with the concept of the system process node in the normalization process, and after receiving the subscribed source node information If the status or result is the latest and correct, it means that the task processing sub-procedure of the bound identification information is actively executed. After completion, the broker will publish the latest status or result information of the task processing according to the bound identification information; or according to the bound identification information. The identification information with the concept of system process node automatically executes the task processing sub-procedure of the bound identification information at a fixed time, and then releases the latest status or result information of the task processing to the Broker based on the bound identification information after completion; or receives the external system Request the execution of the task processing sub-procedure of the bound identification information, and after completion, release the latest status or result information of the task processing to the Broker based on the bound identification information. The present invention provides the microservices of a distributed system to process various tasks in a standardized and asynchronous manner through the microservice standardization process, simplifies the complexity of the internal business processing of the microservices, and flexibly adjusts the system service process to improve The performance of the overall system and the scalability of the optimization service.
本發明之一種任務式工作節點系統及方法,其主要目的係提供各微服務一規格化機制,並能使其協同運作於以階層式任務節點流程所設計組成之分散式系統。本發明將業務邏輯及服務流程進行切割,將業 務邏輯拆解成複雜度低且耦合性低的各項任務、並以工作節點形式綁定於複雜度高之服務流程由各微服務進行處理。各微服務透過標準化之作業流程且依據工作節點任務規格資訊進行運作而始能完成規格化之程序。而導入本發明方法將得以讓一系統實現微服務規格化,提供微服務一標準作業流程以處理單純簡化之內部業務作業,且整體系統的服務流程可更彈性的擴充,藉以優化整體系統效能、提升服務延展性。 The main purpose of the task-based work node system and method of the present invention is to provide a standardized mechanism for each microservice and enable it to cooperate in a distributed system designed and composed by a hierarchical task node process. The present invention cuts the business logic and service process, and cuts the business logic and service process The service logic is disassembled into low-complexity and low-coupling tasks, and is bound to the high-complexity service process in the form of work nodes to be processed by each microservice. Each microservice can complete the standardized process only by operating a standardized operation process and operating according to the task specification information of the working node. The introduction of the method of the present invention will allow a system to realize the standardization of microservices, provide a standard operating process of microservices to handle simple and simplified internal business operations, and the service process of the overall system can be expanded more flexibly, thereby optimizing the overall system performance, Improve service scalability.
本發明提供一種任務式工作節點系統,係包括:一任務設定模組,用於供設定各任務於整體服務流程中相對應之工作階段,以產生各工作節點的任務規格資訊,其中,該各任務係由業務邏輯拆解而成;一任務資料模組,用於儲存該各工作節點的任務規格資訊;至少一個微服務,係各自包括主程序及任務處理次程序,該至少一個微服務之至少一者係綁定至該各工作節點之至少一者,由該至少一個微服務之至少一者向該任務資料模組取得其所綁定之該各工作節點之至少一者的任務規格資訊,以依據其所綁定之該各工作節點之至少一者的任務規格資訊進行運作,俾於運作後輸出工作節點狀態或結果資訊;一工作節點狀態結果更新模組,用於將該至少一個微服務之至少一者所輸出之工作節點狀態或結果資訊更新至該任務資料模組;以及至少一個專案訊息代理服務模組,係支援訊息佇列(Message Queue)架構並用於提供該至少一個微服務間之訊息發布或訂閱之代理服務。 The present invention provides a task-based work node system, which includes: a task setting module for setting each task in the corresponding work phase in the overall service process to generate task specification information for each work node. Tasks are disassembled from business logic; a task data module is used to store the task specification information of each work node; at least one microservice is each including a main program and a task processing subprogram, the at least one microservice At least one is bound to at least one of the working nodes, and at least one of the at least one microservice obtains the task specification information of at least one of the working nodes to which it is bound from the task data module , To operate according to the task specification information of at least one of the working nodes to which it is bound, so as to output the working node status or result information after operation; a working node status result update module for the at least one The work node status or result information output by at least one of the microservices is updated to the task data module; and at least one project message proxy service module supports the Message Queue architecture and is used to provide the at least one microservice Agency service for publishing or subscribing messages between services.
於該任務式工作節點系統中,該至少一個微服務之至少一者向該任務資料模組取得其所綁定之該各工作節點之至少一者的任務規格資訊係包括時序標準設定及來源資訊設定,供該至少一個微服務根據該時 序標準設定及該來源資訊設定判定是否執行其任務處理次程序,以於完成其任務處理次程序後,輸出工作節點狀態或結果資訊,供該工作節點狀態結果更新模組將該輸出工作節點狀態或結果資訊更新至該任務資料模組,再向該至少一個專案訊息代理服務模組發布帶有該工作節點狀態或結果資訊之工作節點標題。 In the task-based work node system, at least one of the at least one microservice obtains from the task data module the task specification information of at least one of the work nodes to which it is bound, including timing standard settings and source information Set for the at least one microservice to be based on the time Sequence standard setting and the source information setting determine whether to execute its task processing subroutine, so that after completing its task processing subroutine, output the work node status or result information for the work node status result update module to output the work node status Or the result information is updated to the task data module, and then the work node title with the work node status or result information is released to the at least one project information agent service module.
本發明另提供一種任務式工作節點方法,係包括下列步驟:將業務邏輯拆解成各任務;設定該各任務於整體服務流程中相對應之工作階段,以產生各工作節點的任務規格資訊;執行微服務規格化程序,包括:程序1:令至少一個微服務之至少一者依據其所包含之主程序及任務處理次程序,取回其所綁定之該各工作節點之至少一者的任務規格資訊;以及俾使該至少一個微服務之至少一者依據其所綁定之該各工作節點之至少一者的任務規格資訊進行運作。 The present invention also provides a task-based work node method, which includes the following steps: disassembling business logic into tasks; setting each task in the corresponding work stage in the overall service process to generate task specification information for each work node; Executing the microservice standardization process, including: Process 1: At least one of at least one microservice retrieves at least one of the working nodes to which it is bound according to the main program and task processing subprogram contained in it Task specification information; and enabling at least one of the at least one microservice to operate according to the task specification information of at least one of the working nodes to which it is bound.
該微服務規格化程序更包含:程序2:該至少一個微服務之至少一者檢查其所綁定之該各工作節點之至少一者的任務規格資訊中時序標準設定及來源資訊設定;以及程序3:若該時序標準設定非為空值且該來源資訊設定為空值,則該至少一個微服務之至少一者依據該時序標準設定定時執行自身之任務處理次程序;若該時序標準設定為空值且該來源資訊設定非為空值,則該至少一個微服務之至少一者依據該來源資訊設定對其所綁定之該各工作節點之至少一者的任務規格資訊中專案訊息代理服務訂閱帶有來源節點狀態結果資訊之來源節點標題,以在接收到該訂閱之來源節點標題後查詢比對該訂閱之來源節點標題的來源節點狀態結果資訊是否為最新且正確者,若是,即執行自身之該任務處理次程序,若否,則不 執行;若該時序標準設定為空值且該來源資訊設定亦為空值,則該至少一個微服務之至少一者接收外部系統的要求而被動執行自身之該任務處理次程序;以及若該時序標準設定非為空值且該來源資訊設定亦非為空值,則該至少一個微服務之至少一者不執行自身之該任務處理次程序。 The microservice normalization process further includes: Process 2: At least one of the at least one microservice checks the timing standard setting and source information setting in the task specification information of at least one of the working nodes to which it is bound; and 3: If the timing standard is set to a non-null value and the source information is set to a null value, at least one of the at least one microservice will execute its own task processing subroutine according to the timing standard setting; if the timing standard is set to Null value and the source information setting is not null, then at least one of the at least one microservice is based on the source information setting to the task specification information of at least one of the working nodes to which it is bound to the project message agent service Subscribe to the source node title with the source node status result information to query whether the source node status result information of the source node title of the subscription is the latest and correct after receiving the source node title of the subscription. If so, execute The task processing subroutine of its own, if not, it will not Execution; if the timing standard is set to a null value and the source information setting is also a null value, at least one of the at least one microservice receives a request from an external system and passively executes its own task processing subroutine; and if the timing If the standard setting is not a null value and the source information setting is not a null value, at least one of the at least one microservice does not execute its own task processing subroutine.
接著,該至少一個微服務之至少一者依據其所綁定之該各工作節點之至少一者的任務規格資訊進行運作後,輸出工作節點狀態或結果資訊以供更新,再由該至少一個微服務之至少一者發布帶有該工作節點狀態或結果資訊之工作節點標題。 Then, after at least one of the at least one microservice operates according to the task specification information of at least one of the work nodes to which it is bound, the work node status or result information is output for update, and then the at least one microservice At least one of the services publishes the work node title with the work node status or result information.
換言之,本發明系統至少可由一任務設定模組、一任務資料模組、一工作節點狀態結果更新模組、至少一個微服務、至少一個專案訊息代理服務模組所組成。本發明先將業務分析拆解成各項任務,並利用任務設定模組設定各任務於整體系統流程中相對應之工作階段以產生工作節點任務規格資訊儲存於任務資料模組,以提供微服務綁定特定工作節點之依據以進行後續規格化程序。 In other words, the system of the present invention can be composed of at least a task setting module, a task data module, a working node status result update module, at least one microservice, and at least one project message agent service module. The present invention first disassembles the business analysis into various tasks, and uses the task setting module to set the corresponding working stage of each task in the overall system process to generate the task specification information of the working node and store it in the task data module to provide microservices Binding the basis of specific work nodes for subsequent normalization procedures.
此外,本發明所指微服務可由一主程序及一或多個任務處理次程序所組成,各個任務處理次程序分別為不同的業務邏輯處理作業單元且均需綁定一工作節點任務規格資訊以進行運作。一微服務將依據工作節點任務規格資訊之來源資訊設定及時序標準設定判斷執行任務之時機:(1)若來源資訊設定非為空值且時序標準設定為空值,則依據來源資訊設定對工作節點之專案訊息代理服務模組訂閱帶有來源節點最新狀態結果資訊之來源節點標題,一旦接收到訂閱標題資訊則將來源節點最新狀態或結果資訊向任務資料模組進行查詢比對,若確認無誤即主動執行所綁定工作 節點之任務處理次程序,完成後依據所綁定之工作節點任務規格資訊之狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再對工作節點之專案訊息代理服務模組發布帶有工作節點狀態或結果資訊之工作節點標題(2)若來源資訊設定為空值且時序標準設定非為空值,則依據時序標準設定主動定時執行所綁定工作節點之任務處理次程序,完成後依據所綁定之狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再對工作節點之專案訊息代理服務模組發布帶有工作節點狀態或結果資訊之工作節點標題(3)若來源資訊設定為空值且時序標準設定亦為空值,則接收外部系統要求被動執行所綁定識別資訊之任務處理次程序,完成後依據所綁定之狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再對工作節點之專案訊息代理服務模組發布帶有工作節點狀態或結果資訊之工作節點標題。 In addition, the microservice referred to in the present invention can be composed of a main program and one or more task processing subprograms. Each task processing subprogram is a different business logic processing unit and needs to be bound to a task specification information of a working node. To operate. A microservice will determine the timing of executing the task based on the source information setting and timing standard setting of the task specification information of the work node: (1) If the source information setting is not a null value and the timing standard is set to a null value, the task will be performed according to the source information setting The project information agent service module of the node subscribes to the source node title with the latest status and result information of the source node. Once the subscription title information is received, the latest status or result information of the source node will be checked and compared with the task data module. If it is confirmed to be correct Actively perform the bound work The task processing subroutine of the node. After completion, the status or result information of the working node will be sent to the working node status result update module according to the status result setting of the bound task specification information of the working node, and the status result update module will send it to the working node status result update module. After updating to the task data module, publish the work node title with the work node status or result information to the project information agent service module of the work node (2) If the source information is set to a null value and the timing standard setting is not a null value , The task processing subroutine of the bound working node is automatically and regularly executed according to the timing standard. After completion, the state or result information of the working node is sent to the working node status result update module according to the bound status result setting, and the working node After the status result update module updates it to the task data module, the project message agent service module of the worker node publishes the job node title with the job node status or result information (3) If the source information is set to a null value and The timing standard setting is also a null value, then the task processing subroutine that receives the external system request to passively execute the bound identification information, after completion, sends the status or result information of the working node to the working node according to the bound status result setting. The result is updated Module: After the work node status result update module updates it to the task data module, the work node title with the work node status or result information is issued to the project information agent service module of the work node.
為了避免微服務協同運作於整體系統下多個服務流程程序設定時發生排擠或衝突之瑕疵,本發明之工作節點設定係以任務層級設定原則將各任務指定其於整體系統的服務流程順序。任務層級設定原則將任務層級分為N層(T1~TN),層級T1為最高層級、層級TN為最低層級。一工作節點之層級係依據該任務於整體服務流程中所在階段而定,而工作節點之間有著父與子之關係;層級高之工作節點為層級低者之父節點、層級低之工作節點為層級高者之子節點。一個任務處理次程序需綁定一工作節 點,該任務處理次程序之執行可由所綁定之工作節點之來源節點進行觸發。又來源節點分為子節點或父節點;若為多個來源節點所觸發則來源節點須為該工作節點之子節點才可設定為之,若僅由單一來源節點所觸發則來源節點須為該工作節點之父節點或同層級節點才可設定為之,一工作節點之來源節點只能設定其父節點或子節點,不能同時並存。 In order to avoid the defects of crowding or conflict in the setting of multiple service flow programs under the microservices cooperative operation in the overall system, the working node setting of the present invention assigns each task to the service flow sequence of the overall system based on the task level setting principle. The task level setting principle divides the task level into N levels (T1~TN), level T1 is the highest level, and level TN is the lowest level. The level of a work node is determined by the stage of the task in the overall service process, and there is a parent-child relationship between work nodes; the higher-level work node is the parent node of the lower-level work node, and the lower-level work node is The child node of the higher level. A task processing subprogram needs to be bound to a work section Point, the execution of the task processing subroutine can be triggered by the source node of the bound working node. And the source node is divided into child node or parent node; if it is triggered by multiple source nodes, the source node must be the child node of the working node to set it, and if only triggered by a single source node, the source node must be the working node Only the parent node of a node or nodes of the same level can be set. The source node of a working node can only be set to its parent node or child node, and cannot coexist at the same time.
21‧‧‧任務設定模組 21‧‧‧Task Setting Module
22‧‧‧任務資料模組 22‧‧‧Task Data Module
231..23n‧‧‧微服務 231..23n‧‧‧Microservice
241..24n‧‧‧專案訊息代理服務模組 241..24n‧‧‧Project Information Agency Service Module
25‧‧‧工作節點狀態結果更新模組 25‧‧‧Work node status result update module
51~55‧‧‧微服務 51~55‧‧‧Microservice
61~66‧‧‧任務 61~66‧‧‧Task
MQ1‧‧‧專案訊息代理服務模組 MQ1‧‧‧Project Message Agency Service Module
S31~S34‧‧‧步驟 S31~S34‧‧‧Step
S331、S332、S3331~S3338‧‧‧步驟 S331, S332, S3331~S3338‧‧‧Step
T1~T6‧‧‧任務層級 T1~T6‧‧‧Task level
T5-3、T6-4、T3-5、T2-1T4-6、T1-2‧‧‧工作節點 T5-3, T6-4, T3-5, T2-1T4-6, T1-2‧‧‧Working node
第1圖為本發明之任務式工作節點系統之示意圖;第2A圖為本發明之任務式工作節點方法之示意圖;第2B圖為本發明之微服務規格化程序圖;第3圖為本發明之工作節點流程範例圖;以及第4圖為本發明之微服務訂閱發布標題範例圖。 Figure 1 is a schematic diagram of the task-based worker node system of the present invention; Figure 2A is a schematic diagram of the task-based worker node method of the present invention; Figure 2B is a schematic diagram of the microservice standardization process of the present invention; Figure 3 is the present invention The working node process example diagram; and Figure 4 is an example diagram of the microservice subscription publishing title of the present invention.
請參考第1圖之任務式工作節點系統之示意圖,本發明之任務式工作節點系統包括一任務設定模組21、一任務資料模組22、一或多個微服務231..23n、一或多個專案訊息代理服務模組241..24n、一工作節點狀態結果更新模組25。
Please refer to the schematic diagram of the task-based worker node system in Figure 1. The task-based worker node system of the present invention includes a
本發明將業務邏輯及服務流程進行切割,將業務邏輯拆解成複雜度低且耦合性低的各項任務以進行微服務之開發,微服務231..23n之各微服務可由一主程序及一或多個任務處理次程序所組成,各任務處理
次程序分別進行不同的業務邏輯處理且均需綁定有一工作節點的任務規格資訊以進行運作,而工作節點的任務規格資訊即為由管理者利用任務設定模組21將各微服務所執行之任務設定其具有系統流程節點概念之任務識別資訊,並儲存於任務資料模組22。
The present invention cuts the business logic and service process, and disassembles the business logic into tasks with low complexity and low coupling for the development of microservices. Each microservice of the
微服務231..23n從任務資料模組22取得個別綁定之工作節點的任務規格資訊後,依據取得之任務規格資訊來判定採用以下其中一種方式進行任務運作:(1)對個別綁定之專案訊息代理服務模組241..24n進行來源節點之訂閱並在接收確認訂閱標題資訊後主動執行;(2)主動定時執行;以及(3)接收外部系統要求被動執行。一或多個微服務231..23n在完成任務執行後對個別綁定之專案訊息代理服務模組241..24n發布處理狀態結果。此外,微服務231..23n在完成任務執行後可將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組25,而工作節點狀態結果更新模組25將各微服務所傳入之工作節點狀態或結果資訊更新於任務資料模組22。
After the
任務設定模組21可依據任務層級設定原則提供管理者設定各任務之工作節點任務規格資訊。本發明之任務層級設定原則係將任務層級分為N層(T1~TN),層級T1為最高層級、層級TN為最低層級。層級高之工作節點為層級低者之父節點、層級低之工作節點為層級高者之子節點。一工作節點可由其來源節點進行觸發。而來源節點分為子節點或父節點;若為多個來源節點所觸發則來源節點須為該工作節點之子節點才可設定為之,若僅由單一來源節點所觸發則來源節點須為該工作節點之父節點
或同層級節點才可設定為之,一工作節點之來源節點只能設定其父節點或子節點,不能同時並存。
The
工作節點的任務規格資訊至少包括:工作節點之微服務設定、專案訊息代理設定、來源資訊設定、時序標準設定、狀態結果設定。時序標準設定至少包含每單位時段、每單位時段執行次數、每單位執行起始時間,其組成結構為:{每單位時段}TS{每單位時段執行次數}-{每單位執行起始時間}。每單位時段以小時/天/月/周/年為一單位時段、其代碼分別為_byHourly/_byDaily/_byMonthly/_byWeekly/_byYearly;每單位時段執行次數共2碼;每單位執行起始時間至少5碼。若以月為每單位時段,則可設定first為每月的第一日執行日、last為每月的最末一日執行日、每月的指定日期為執行日並以”|”分隔;若以周為每單位時段,則可設定first為每周的第一日執行日、last為每周的最末一日執行日、每周的指定日期為執行日並以”|”分隔;若以年為每單位時段,則可設定4碼為指定執行日並以”|”分隔。例如: The task specification information of the working node includes at least: the microservice setting of the working node, the project message proxy setting, the source information setting, the timing standard setting, and the status result setting. The timing standard setting includes at least each unit period, the number of executions per unit period, and the execution start time of each unit. Its composition structure is: {per unit period}TS{execution times per unit period}-{execution start time per unit}. Each unit period is hour/day/month/week/year as a unit period, and its codes are _byHourly/_byDaily/_byMonthly/_byWeekly/_byYearly; the number of execution times per unit period is 2 codes; the execution start time of each unit is at least 5 code. If month is the unit time period, you can set first as the execution day of the first day of the month, last as the execution day of the last day of the month, and the specified date of the month as the execution day, separated by "|"; if With week as the unit time period, you can set first as the execution day of the first day of the week, last as the execution day of the last day of the week, and the specified date of the week as the execution day, separated by "|"; Year is per unit time period, you can set 4 digits as the designated execution day and separated by "|". E.g:
(1)以每小時為單位時段,執行時間單位以分鐘計算 (1) The time period is per hour, and the execution time unit is calculated in minutes
˙_byHourlyTS01-00:00(60/1=60:以小時計算次數,每小時執行1次,從00:00開始每60分鐘執行一次) ˙_byHourlyTS01-00:00 (60/1=60: Calculate the number of times in hours, execute once per hour, and execute once every 60 minutes from 00:00)
˙_byHourlyTS12-00:00(60/12=5:以小時計算次數,每小時執行12次,從00:00開始每5分鐘執行一次) ˙_byHourlyTS12-00:00 (60/12=5: Calculate the number of times in hours, execute 12 times per hour, and execute once every 5 minutes from 00:00)
˙_byHourlyTS06-00:00(60/6=10:以小時計算次數,每小時執行6次,從00:00開始每10分鐘執行一次) ˙_byHourlyTS06-00:00 (60/6=10: Calculate the number of times in hours, execute 6 times per hour, and execute once every 10 minutes from 00:00)
(2)以每日為單位時段,執行時間單位以小時計算 (2) Take daily as the unit time period, and the execution time unit is calculated in hours
˙_byDailyTS01-00:00(24/1=24:以日計算次數,每日執行1次,從00:00開始每24小時執行一次) ˙_byDailyTS01-00:00 (24/1=24: Calculate the number of times per day, execute once a day, and execute once every 24 hours from 00:00)
˙_byDailyTS12-00:00(24/12=2:以日計算次數,每日執行12次,從00:00開始每2小時執行一次) ˙_byDailyTS12-00: 00 (24/12=2: Calculate the number of times per day, execute 12 times a day, and execute once every 2 hours from 00:00)
˙_byDailyTS24-00:00(24/24=1:以日計算次數,每日執行24次,從00:00開始每1小時執行一次) ˙_byDailyTS24-00: 00 (24/24=1: Calculate the number of times per day, execute 24 times a day, and execute once every 1 hour from 00:00)
(3)以每月為單位時段,執行時間單位以日計算 (3) Take monthly as the unit time period, and the execution time unit is calculated by day
˙_byMonthlyTS01-first-00:00(以月計算次數,每月執行一次,每月的第一天00:00執行) ˙_byMonthlyTS01-first-00:00 (calculated by the number of months, executed once a month, executed at 00:00 on the first day of each month)
˙_byMonthlyTS01-last-12:00(以月計算次數,每月執行一次,每月的最後一天12:00執行) ˙_byMonthlyTS01-last-12: 00 (calculated by the number of months, executed once a month, executed at 12:00 on the last day of each month)
˙_byMonthlyTS02-01|15-00:00(以月計算次數,每月執行二次,每月的1號、15號的00:00執行) ˙_byMonthlyTS02-01|15-00:00 (calculated by the number of months, executed twice a month, executed at 00:00 on the 1st and 15th of each month)
(4)以每周為單位時段,執行時間單位以日計算 (4) Use weekly as the unit time period, and the execution time unit is calculated by the day
˙_byWeeklyTS01-first-00:00(以周計算次數,每周執行一次,每周的第一天00:00執行) ˙_byWeeklyTS01-first-00:00 (calculated by the number of weeks, executed once a week, executed at 00:00 on the first day of the week)
˙_byWeeklyTS01-last-12:00(以周計算次數,每周執行一次,每周的最後一天12:00執行) ˙_byWeeklyTS01-last-12: 00 (calculated by weeks, executed once a week, executed at 12:00 on the last day of the week)
˙_byWeeklyTS02-01|04-00:00(以周計算次數,每周執行二次,每周的禮拜一、禮拜四的00:00執行) ˙_byWeeklyTS02-01|04-00:00 (calculated on a weekly basis, executed twice a week, executed every Monday and Thursday at 00:00)
(5)以每年為單位時段,執行時間單位以月計算 (5) The unit of time is per year, and the unit of execution time is calculated by month
˙_byYearlyTS01-0101-00:00(以年計算次數,每年執行一次, 每年的第一天00:00執行) ˙_byYearlyTS01-0101-00: 00 (calculated by the number of years, executed once a year, (Executed at 00:00 on the first day of each year)
˙_byYearlyTS01-1231-12:00(以年計算次數,每年執行一次,每年的最後一天12:00執行) ˙_byYearlyTS01-1231-12: 00 (calculated by the number of years, executed once a year, executed at 12:00 on the last day of the year)
˙_byYearlyTS02-0101|0601-00:00(以年計算次數,每年執行二次,每年的1/1、6/1的00:00執行) ˙_byYearlyTS02-0101|0601-00:00 (calculated by the number of years, executed twice a year, executed at 00:00 on 1/1, 6/1 each year)
請參考第2A圖之任務式工作節點方法之示意圖及第2B圖之微服務規格化程序圖。 Please refer to the schematic diagram of the task-based worker node method in Figure 2A and the microservice standardization process diagram in Figure 2B.
於步驟S31中,將業務邏輯拆解成各任務,接著於步驟S32中,設定各任務於整體服務流程中相對應之工作階段,以產生各工作節點的任務規格資訊,接著於步驟S33中,進行微服務規格化程序。微服務規格化程序包括步驟S331:一或多個微服務中至少一微服務依據自身主程序及任務處理次程序向任務資料模組取回相符之微服務設定所綁定之工作節點的任務規格資訊,接著進至步驟S332。步驟S332:檢查工作節點的任務規格資訊中時序標準設定及來源資訊設定;若如步驟S3331所示之時序標準設定非為空值且來源資訊設定為空值,則進至步驟S3332:該至少一微服務依據時序標準設定定時執行自身之任務處理次程序;若如步驟S3333所示之時序標準設定為空值且來源資訊設定非為空值,則進至步驟S3334:該至少一微服務依據來源資訊設定向工作節點之專案訊息代理服務模組訂閱帶有來源節點狀態結果資訊之來源節點標題,並在接收到所訂閱的來源節點標題後向任務資料模組查詢比對該來源節點標題所包含之狀態結果資訊是否為最新且正確,若是即執行自身之任務處理次程序;若如 步驟S3335所示之時序標準設定為空值且來源資訊設定亦為空值,則進至步驟S3336:該至少一微服務接收外部系統要求被動執行自身之任務處理次程序;若如步驟S3337所示之時序標準設定非為空值且來源資訊設定亦非為空值,則進至步驟S3338:該至少一微服務不執行自身之任務處理次程序。 In step S31, the business logic is disassembled into tasks, and then in step S32, each task is set in the corresponding work stage in the overall service process to generate task specification information for each work node, and then in step S33, Carry out the microservice standardization process. The microservice standardization process includes step S331: at least one of the one or more microservices retrieves the task specifications of the working node bound to the matching microservice settings from the task data module according to its own main program and task processing subprogram Information, and then go to step S332. Step S332: Check the timing standard setting and source information setting in the task specification information of the working node; if the timing standard setting shown in step S3331 is not a null value and the source information is set to a null value, proceed to step S3332: the at least one The microservice executes its own task processing subroutines according to the timing standard settings; if the timing standard is set to a null value and the source information is set to a non-null value as shown in step S3333, proceed to step S3334: the at least one microservice is based on the source The information setting subscribes the source node title with the source node status result information to the project message agent service module of the working node, and after receiving the subscribed source node title, it queries the task data module and compares what the source node title contains If the status result information is up-to-date and correct, if it is, it will execute its own task processing subroutine; if such If the timing criterion shown in step S3335 is set to a null value and the source information setting is also a null value, proceed to step S3336: the at least one microservice receives an external system request to passively execute its own task processing subroutine; if as shown in step S3337 If the timing standard setting is not a null value and the source information setting is not a null value, then proceed to step S3338: the at least one microservice does not execute its own task processing subroutine.
當完成步驟S3331~S3338之後,則執行步驟S34:該至少一微服務依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將其更新至任務資料模組後,該微服務再對工作節點之專案訊息代理服務模組發布帶有工作節點狀態或結果資訊之工作節點標題。 After completing steps S3331~S3338, step S34 is executed: the at least one microservice transmits the status or result information of the worker node to the status result update module according to the status result setting, and the status result update module updates it After reaching the task data module, the microservice then publishes the work node title with the work node status or result information to the project information agent service module of the work node.
具體說明如第3圖之工作節點流程範例圖,範例將業務邏輯及服務流程進行切割,將業務邏輯拆解成原料進貨、產品製作、原料庫存統計、產品銷售、產品銷售分析、產品庫存統計等6項任務61~66,將任務層級分為任務層級T1~T6,其服務流程為當定期任務61:原料進貨(工作節點:T5-3)後任務62:產品製作(工作節點:T6-4)即開始執行,同時任務63:原料庫存統計(工作節點:T3-5)須依據入出庫即時反應庫存統計;每次任務64:產品銷售(工作節點:T2-1)後須立即進行任務65:產品銷售分析(工作節點:T4-6);任務62:產品製作(工作節點:T6-4)完成及任務64:產品銷售(工作節點:T2-1)完成亦須同步進行任務66:產品庫存統計(工作節點:T1-2)。以下說明各任務61~66所綁定微服務之工作節點的任務規格資訊及其運作程序:
The specific description is as shown in the example diagram of the working node process in Figure 3. The example cuts the business logic and service process, and disassembles the business logic into raw material purchase, product production, raw material inventory statistics, product sales, product sales analysis, product inventory statistics, etc. 6
任務61:原料進貨,係由微服務依據自身主程序AP2及任務處理次程序AP2SP1向任務資料模組取回相符之微服務設定所綁定之工作節點T5-3之任務規格資訊進行運作。工作節點T5-3之時序標準設定為”_byDailyTS02-00:30”、來源資訊設定為空值、狀態結果設定為”rB31/T5-3”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T5-3之時序標準設定非為空值且來源資訊設定為空值,因此微服務主程序AP2將依據時序標準設定每日定時執行任務處理次程序AP2SP1二次,從每日00:30開始每12小時執行一次。執行完畢後依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB31/T5-3。 Task 61: Purchase of raw materials. The microservice retrieves the task specification information of the working node T5-3 bound to the matching microservice settings from the task data module according to its own main program AP2 and task processing subprogram AP2SP1 for operation. The timing standard of working node T5-3 is set to "_byDailyTS02-00:30", the source information is set to null, the status result is set to "rB31/T5-3", and the project message agent is set to "MQ1", according to the microservice specifications The process determines that because the timing standard setting of the working node T5-3 is not a null value and the source information is set to a null value, the microservice main program AP2 will set the daily timed task processing subroutine AP2SP1 twice according to the timing standard. It will be executed every 12 hours starting at 00:30 on the day. After the execution is completed, the status or result information of the worker node is sent to the worker node status result update module according to the status result setting. After the worker node status result update module updates it to the task data module, it is then sent to the project according to the project message agent setting The message broker service module (MQ1) publishes the title information rB31/T5-3 containing the status result setting information.
任務62:產品製作,係由微服務依據自身主程序AP1及任務處理次程序AP1SP1向任務資料模組取回相符之微服務設定所綁定之工作節點T6-4之任務規格資訊進行運作。工作節點T6-4之時序標準設定為空值、來源資訊設定為”rB31/T5-3”、狀態結果設定為”rB32/T6-4”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T6-4之時序標準設定為空值且來源資訊設定非為空值,因此微服務主程序AP1將依據來源資訊設定及專案訊息代理設定向專案訊息代理服務模組(MQ1)訂閱含有狀態結果資訊之來源節點標題資訊rB31/T5-3,並在接收到訂閱標題rB31/T5-3資訊後向任務資料模組查詢比對該rB31/T5-3標題所包含資訊是否為最新且正確,若是則執行任務處理次程序AP1SP1。完畢後依據 狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB32/T6-4。 Task 62: Product production. The microservice retrieves the task specification information of the working node T6-4 bound to the matching microservice settings from the task data module according to its own main program AP1 and task processing subprogram AP1SP1 for operation. The timing standard of the working node T6-4 is set to null, the source information is set to "rB31/T5-3", the status result is set to "rB32/T6-4", and the project message agent is set to "MQ1", according to the microservice specifications The process determines that because the timing standard of the working node T6-4 is set to a null value and the source information is set to a non-null value, the microservice main program AP1 will send the project message agent service module (MQ1 ) Subscribe to the source node title information rB31/T5-3 that contains the status result information, and after receiving the subscription title rB31/T5-3 information, query the task data module to check whether the information contained in the rB31/T5-3 title is The latest and correct, if yes, execute the task processing sub-program AP1SP1. After completion The status result setting sends the status or result information of the worker node to the status result update module of the worker node. After the status result update module of the worker node updates it to the task data module, it is then sent to the project information agent service module according to the project information agent settings. The group (MQ1) publishes the title information rB32/T6-4 containing the status result setting information.
任務63:原料庫存統計及任務66:產品庫存統計,係由微服務依據自身主程序AP3及任務處理次程序AP3SP1、AP3SP2向任務資料模組取回相符之微服務設定所綁定之工作節點T3-5、T1-2之任務規格資訊進行運作。工作節點T3-5之時序標準設定為空值、來源資訊設定為”rB31/T5-3,rB32/T6-4”、狀態結果設定為”rB32/T3-5”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T3-5之時序標準設定為空值且來源資訊設定非為空值,因此微服務主程序AP3將依據來源資訊設定及專案訊息代理設定向專案訊息代理服務模組(MQ1)訂閱含有狀態結果資訊之來源節點標題資訊rB31/T5-3及rB32/T6-4,並在接收到訂閱標題rB31/T5-3或rB32/T6-4資訊後向任務資料模組查詢比對該rB31/T5-3或rB32/T6-4標題所包含資訊是否為最新且正確,若是則執行任務處理次程序AP3SP1。完畢後依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB32/T3-5。工作節點T1-2之時序標準設定為空值、來源資訊設定為”rB36/T2-1,rB32/T6-4”、狀態結果設定為”rB32/T1-2”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T1-2之時序標準設定為空值且來源資訊設定非為 空值,因此微服務主程序AP3將依據來源資訊設定及專案訊息代理設定向專案訊息代理服務模組(MQ1)訂閱含有狀態結果資訊之來源節點標題資訊rB36/T2-1及rB32/T6-4,並在接收到訂閱標題rB36/T2-1或rB32/T6-4資訊後向任務資料模組查詢比對該rB36/T2-1或rB32/T6-4標題所包含資訊是否為最新且正確之資訊,若是則執行任務處理次程序AP3SP2,完畢後依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB32/T1-2。 Task 63: Raw Material Inventory Statistics and Task 66: Product Inventory Statistics, by the microservice according to its own main program AP3 and task processing subprograms AP3SP1 and AP3SP2 to retrieve the working node T3 bound by the matching microservice settings from the task data module -5. The task specification information of T1-2 is operated. The timing standard of the work node T3-5 is set to null, the source information is set to "rB31/T5-3, rB32/T6-4", the status result is set to "rB32/T3-5", and the project message agent is set to "MQ1" According to the microservice standardization process, it is determined that the timing standard of the working node T3-5 is set to a null value and the source information setting is not a null value. Therefore, the main microservice program AP3 will send the message to the project based on the source information setting and the project message agent setting. The agent service module (MQ1) subscribes to the source node title information rB31/T5-3 and rB32/T6-4 containing the status result information, and forwards the task after receiving the subscription title rB31/T5-3 or rB32/T6-4 information The data module queries whether the information contained in the rB31/T5-3 or rB32/T6-4 header is the latest and correct. If so, execute the task processing sub-program AP3SP1. After completion, the status or result information of the worker node is sent to the worker node status result update module according to the status result setting. After the worker node status result update module updates it to the task data module, it then sends the project message according to the project message agent setting The agent service module (MQ1) publishes the title information rB32/T3-5 containing the status result setting information. The timing standard of the work node T1-2 is set to null, the source information is set to "rB36/T2-1, rB32/T6-4", the status result is set to "rB32/T1-2", and the project message agent is set to "MQ1" ", according to the microservice normalization process, it is determined that the timing standard of the working node T1-2 is set to a null value and the source information is set to a non- Null value, so the microservice main program AP3 will subscribe to the project message broker service module (MQ1) the source node header information rB36/T2-1 and rB32/T6-4 containing the status result information according to the source information setting and the project message broker setting , And after receiving the subscribed title rB36/T2-1 or rB32/T6-4 information, check the task data module to see if the information contained in the rB36/T2-1 or rB32/T6-4 title is the latest and correct Information, if yes, execute the task processing sub-program AP3SP2. After completion, according to the status result setting, the worker node status or result information will be sent to the worker node status result update module, and the worker node status result update module will update it to the task data module Then, according to the project message proxy setting, the title information rB32/T1-2 containing the status result setting information is released to the project message proxy service module (MQ1).
任務64:產品銷售,係由微服務依據自身主程序WS1及任務處理次程序WS1SP1向任務資料模組取回相符之微服務設定所綁定之工作節點T2-1之任務規格資訊進行運作。工作節點T2-1之時序標準設定為空值、來源資訊設定為空值、狀態結果設定為”rB36/T2-1”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T2-1之時序標準設定及來源資訊設定皆為空值,因此微服務主程序WS1接收外部系統要求被動執行任務處理次程序WS1SP1,並在執行完畢後依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息服務設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB36/T2-1。 Task 64: Product sales. The microservice retrieves the task specification information of the working node T2-1 bound to the matching microservice settings from the task data module according to its own main program WS1 and task processing subprogram WS1SP1. The timing standard of the work node T2-1 is set to null value, the source information is set to null value, the status result is set to "rB36/T2-1", and the project information agent is set to "MQ1". The timing standard setting and source information setting of node T2-1 are all empty values, so the main microservice program WS1 receives the request from the external system to passively execute the task processing subprogram WS1SP1, and after the execution is completed, the status or result of the working node is set according to the status result. The information is sent to the worker node status result update module, and the worker node status result update module updates it to the task data module, and then publishes the status result setting to the project message agent service module (MQ1) according to the project message service setting Information title information rB36/T2-1.
任務65:產品銷售分析係由微服務依據自身主程序AP4及任務處理次程序AP4SP1向任務資料模組取回相符之微服務設定所綁定之 工作節點T4-6之任務規格資訊進行運作。工作節點T4-6之時序標準設定為空值、來源資訊設定為”rB36/T2-1”、狀態結果設定為”rB32/T4-6”、專案訊息代理設定為”MQ1”,依據微服務規格化程序判定由於工作節點T4-6之時序標準設定為空值且來源資訊設定非為空值,因此微服務主程序AP4將依據來源資訊設定及專案訊息代理設定向專案訊息代理服務模組(MQ1)訂閱含有狀態結果資訊之來源節點標題資訊rB36/T2-1,並在接收到訂閱標題rB36/T2-1資訊後向任務資料模組查詢比對該rB36/T2-1標題所包含資訊是否為最新且正確之資訊,若是則執行任務處理次程序AP4SP1,完畢後依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理設定向專案訊息代理服務模組(MQ1)發布含有狀態結果設定資訊之標題資訊rB32/T4-6。 Task 65: Product sales analysis is bound by the microservice according to its own main program AP4 and task processing subprogram AP4SP1 to retrieve the matching microservice settings from the task data module The task specification information of working node T4-6 is operated. The timing standard of the working node T4-6 is set to null, the source information is set to "rB36/T2-1", the status result is set to "rB32/T4-6", and the project message agent is set to "MQ1", according to the microservice specifications The process determines that because the timing standard of the working node T4-6 is set to a null value and the source information is set to a non-null value, the microservice main program AP4 will send the project message agent service module (MQ1 ) Subscribe to the source node title information rB36/T2-1 that contains the status result information, and after receiving the subscription title rB36/T2-1 information, query the task data module to check whether the information contained in the rB36/T2-1 title is The latest and correct information. If yes, execute the task processing sub-program AP4SP1. After completion, according to the status result setting, the worker node status or result information will be sent to the worker node status result update module, and the worker node status result update module will update it to After the task data module, the title information rB32/T4-6 containing the status result setting information is released to the project message proxy service module (MQ1) according to the project message proxy setting.
請參考第4圖之微服務訂閱發布標題範例圖所示者,於專案訊息代理服務模組MQ1中之虛線二端分別代表一標題資訊之發送來源端及接收目的端。以粗細區分,若實線與虛線之粗細相同則該微服務為該標題資訊之發布端,反之,另一端則該微服務為該標題資訊之訂閱接收端。各微服務51~55主程序分別依據所綁定之工作節點的任務規格資訊對專案訊息代理服務模組MQ1進行來源節點標題的訂閱及發布含有狀態結果設定資訊之標題資訊。透過專案訊息代理服務模組MQ1利用MQTT通訊之一對多的傳輸機制,凡是訂閱者皆可同時接收到所發布之標題資訊,
如第4圖所示,微服務51主程序AP2依據所綁定之工作節點T5-3之任務規格資訊在定時完成任務處理次程序AP2SP1後依據狀態結果
設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再對專案訊息代理服務模組MQ1發布含有狀態結果設定資訊之標題資訊rB31/T5-3,而微服務52主程序AP1、微服務53主程序AP3亦分別依據所綁定之工作節點任務規格資訊訂閱含有狀態結果資訊之來源節點標題資訊rB31/T5-3,並在接收到訂閱標題資訊rB31/T5-3後向任務資料模組查詢比對該標題所包含資訊是否為最新且正確之資訊,若是則微服務52主程序AP1、微服務53主程序AP3分別執行任務處理次程序AP1SP1、AP3SP1,完畢後分別依據狀態結果設定將工作節點狀態或結果資訊傳送至工作節點狀態結果更新模組,由工作節點狀態結果更新模組將之更新至任務資料模組後,再依據專案訊息代理服務設定向專案訊息代理服務模組MQ1發布含有狀態結果設定資訊之標題資訊rB32/T6-4、rB32/T3-5。
Please refer to the example of the microservice subscription publishing title in Figure 4. The two dotted lines in the project message broker service module MQ1 represent the sending source and receiving destination of a title information respectively. It is divided by thickness. If the thickness of the solid line and the dashed line are the same, the microservice is the publishing end of the title information, otherwise, the other end is the subscription receiving end of the title information. The main program of each microservice 51-55 respectively subscribes the source node title to the project message agent service module MQ1 according to the task specification information of the bound working node and publishes the title information containing the status result setting information. By using the one-to-many transmission mechanism of MQTT communication through the project message broker service module MQ1, all subscribers can receive the published title information at the same time.
As shown in Figure 4, the main program AP2 of the
以細虛線「」代表標題資訊rB31/T5-3來說,微服務51主程序AP2即為標題發布端、而微服務52主程序AP1及微服務53主程序AP3即為標題訂閱接收端;以粗虛線「」代表標題資訊rB32/T6-4來說,微服務52主程序AP1即為標題發布端、而微服務53主程序AP3即為標題訂閱接收端;以虛線「」代表標題資訊rB36/T2-1來說,微服務54主程序WS1即為標題發布端、而微服務53主程序AP3及服務55主程序AP4即為標題訂閱接收端;其他如標題資訊rB32/T4-6及rB32/T3-5、rB32/T1-2因無標題訂閱接收端因此無虛線代表,以此說明。
With a thin dashed line " "For the title information rB31/T5-3, the main program AP2 of
綜上所述,透過本發明之一種任務式工作節點系統及方法,其尤指將業務邏輯及服務流程進行切割,將業務邏輯拆解成複雜度低 且耦合性低的各項任務、並以工作節點形式綁定於複雜度高之服務流程由各微服務進行處理。導入本發明方法將得以讓一系統實現微服務規格化,提供微服務一標準作業流程以處理單純簡化之內部業務作業,並能使其協同運作於以階層式任務節點流程所設計組成之分散式系統。藉由縮小內部各微服務業務邏輯異動範圍減少開發的複雜度,改以外部彈性設定服務流程的複雜度,以此優化整體系統效能、提升服務延展性。 To sum up, through the task-based work node system and method of the present invention, it especially refers to the division of business logic and service flow, and the disassembly of business logic into low complexity In addition, various tasks with low coupling are bound to high-complexity service processes in the form of work nodes and are processed by microservices. The introduction of the method of the present invention will allow a system to realize the standardization of microservices, provide a standard operation process of microservices to handle simple and simplified internal business operations, and enable it to operate collaboratively in a decentralized design composed of hierarchical task node processes. system. Reduce the complexity of development by narrowing the scope of business logic changes in internal microservices, and set the complexity of service processes externally to optimize overall system performance and improve service scalability.
21‧‧‧任務設定模組 21‧‧‧Task Setting Module
22‧‧‧任務資料模組 22‧‧‧Task Data Module
231..23n‧‧‧微服務 231..23n‧‧‧Microservice
241..24n‧‧‧專案訊息代理服務模組 241..24n‧‧‧Project Information Agency Service Module
25‧‧‧工作節點狀態結果更新模組 25‧‧‧Work node status result update module
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108135508A TWI726431B (en) | 2019-10-01 | 2019-10-01 | A methodology and architecture of task nodes systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108135508A TWI726431B (en) | 2019-10-01 | 2019-10-01 | A methodology and architecture of task nodes systems |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202115574A TW202115574A (en) | 2021-04-16 |
TWI726431B true TWI726431B (en) | 2021-05-01 |
Family
ID=76604387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108135508A TWI726431B (en) | 2019-10-01 | 2019-10-01 | A methodology and architecture of task nodes systems |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI726431B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201110026A (en) * | 2008-10-10 | 2011-03-16 | Ibm | Queue manager and method of managing queues in an asynchronous messaging system |
CN105763426A (en) * | 2016-04-12 | 2016-07-13 | 北京理工大学 | Multiprotocol instant messaging system-based Internet of Things business processing system |
CN106797391A (en) * | 2014-07-21 | 2017-05-31 | 康维达无线有限责任公司 | Interworking of the service layer using the MQTT protocol |
CN107734051A (en) * | 2017-11-01 | 2018-02-23 | 广州供电局有限公司 | The efficient management system of electric power instrument that platform of internet of things based on MQTT technologies is realized |
-
2019
- 2019-10-01 TW TW108135508A patent/TWI726431B/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201110026A (en) * | 2008-10-10 | 2011-03-16 | Ibm | Queue manager and method of managing queues in an asynchronous messaging system |
CN106797391A (en) * | 2014-07-21 | 2017-05-31 | 康维达无线有限责任公司 | Interworking of the service layer using the MQTT protocol |
CN105763426A (en) * | 2016-04-12 | 2016-07-13 | 北京理工大学 | Multiprotocol instant messaging system-based Internet of Things business processing system |
CN105763426B (en) | 2016-04-12 | 2018-04-06 | 北京理工大学 | A kind of internet of things service processing system based on multi-protocol instant messaging system |
CN107734051A (en) * | 2017-11-01 | 2018-02-23 | 广州供电局有限公司 | The efficient management system of electric power instrument that platform of internet of things based on MQTT technologies is realized |
CN107734051B (en) | 2017-11-01 | 2018-09-25 | 广州供电局有限公司 | The electric power instrument that platform of internet of things based on MQTT technologies is realized efficiently manages system |
Also Published As
Publication number | Publication date |
---|---|
TW202115574A (en) | 2021-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108132830B (en) | A task scheduling method, device and system | |
US8019863B2 (en) | Synchronizing events between mobile devices and servers | |
US11394794B2 (en) | Fast ingestion of records in a database using data locality and queuing | |
US20130067024A1 (en) | Distributing multi-source push notifications to multiple targets | |
US20070162421A1 (en) | Real-Time Messaging System for Bridging RDBMSs and Message Buses | |
CN106250543B (en) | A kind of automated data inquiry synchronous storage method | |
US8122457B2 (en) | System and method for facilitating the exchange of information among applications | |
US11416497B2 (en) | Exactly-once performance from a streaming pipeline in a fault-vulnerable system | |
US9208476B2 (en) | Counting and resetting broadcast system badge counters | |
US20070190978A1 (en) | System and Methodology for Extending Enterprise Messaging Systems to Mobile Devices | |
US20050033588A1 (en) | Information system comprised of synchronized software application moduless with individual databases for implementing and changing business requirements to be automated | |
MX2014002956A (en) | Marketplace for timely event data distribution. | |
US11741291B2 (en) | Systems and methods for providing error recovery in data transmissions | |
AU2010232791B2 (en) | Employing user-context in connection with backup or restore of data | |
WO2016183565A1 (en) | Remote data object publishing/subscribing system having a multicast key-value protocol | |
JP2010531481A (en) | Transfer of tabular parameters via tabular data stream protocol | |
CN111552885B (en) | System and method for realizing automatic real-time message pushing operation | |
CN106294741B (en) | A kind of automated data inquiry synchronization storage system | |
US20130067025A1 (en) | Target subscription for a notification distribution system | |
US20130066980A1 (en) | Mapping raw event data to customized notifications | |
CN104239000B (en) | Computer approach, apparatus and system for the incoming message sequencing of correspondence processing | |
US20080228853A1 (en) | Software system | |
US20100309911A1 (en) | Transmitting Critical Table Information in Databases | |
EP2756421A2 (en) | Scale-out system to acquire event data | |
TWI726431B (en) | A methodology and architecture of task nodes systems |