TWI376127B - A dependable web service invocation framework with asynchronous communication - Google Patents

A dependable web service invocation framework with asynchronous communication Download PDF

Info

Publication number
TWI376127B
TWI376127B TW96145833A TW96145833A TWI376127B TW I376127 B TWI376127 B TW I376127B TW 96145833 A TW96145833 A TW 96145833A TW 96145833 A TW96145833 A TW 96145833A TW I376127 B TWI376127 B TW I376127B
Authority
TW
Taiwan
Prior art keywords
service
message
module
program
reply
Prior art date
Application number
TW96145833A
Other languages
Chinese (zh)
Other versions
TW200926697A (en
Inventor
Ing Yi Chen
Original Assignee
Univ Nat Taipei Technology
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 Univ Nat Taipei Technology filed Critical Univ Nat Taipei Technology
Priority to TW96145833A priority Critical patent/TWI376127B/en
Publication of TW200926697A publication Critical patent/TW200926697A/en
Application granted granted Critical
Publication of TWI376127B publication Critical patent/TWI376127B/en

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Description

1376127 九、發明說明: 【發明所屬之技術領域】 本發明係關於一種高可靠之非同步網路服務呼叫架構及方法,特別是 指一種以非同步呼叫網路服務的方法,其在服務導向架構下可提供穩定的 網路呼叫服務。 【先前技術】 網路服務(Web Services)是一個具有開放性與分散性的軟體元件,其 基礎建立在HTTP、XML、WSDL及SOAP等標準上。網路服務提供標準 的遠端呼叫介面和應用程式撰寫方法,程式設計師可以透過任何程式語言 開發工具來撰寫與使用網路服務程式。由於網路服務採用XML·標準規格, 並且使用簡單物件存取協定(Simple Object Access Protocol, SOAP )作為服 務間的通訊方式,此運賴路服務技術可以輕易的完成跨平台整合的功 能。 由上述概念可知目前網路服務技術主要是利用超文字傳輸協定 (HTTP)作為服務訊息傳遞的媒介。在Ηττρ的規範中,客戶端發出請求 至接到回㈣這段_裡必縣持連線離態。如圖—卿,為習用網路 服務的運作方^,細服務提供者模組5及臟M f者模組4所構成;該 務提供者模組會七供新的網路服務,當服務消費者模組4有需要時,會 向服務提供者她5發出請求訊息並且料服務提供者· $之回應。服 八者模’、!_ 5接收吼息後便依照請求開始進行運算,在服務程式執行之 後立即將執彳了結如傳給服務消費者模組㈣此當客戶料叫—個執行時 5 曰乂長的網路服務時,網路連線就必須在服務執_程中维持不斷線的情 T如此-來料造成服務呼叫時發生請求逾時與呼叫失敗的情況。網路 線的時間越長就表示本次連線失敗的機率就越高,因為連線時間的長短 和成=歧比’所以服務執行的_增長將導財叫服務的成功率下降。 。HfMt) ’其中ps代表呼叫服務成功的機率,[為該通訊協定每 皁位時間發生失敗的機率,At是連線維持的時間。因此,為了提高呼叫服 ^的成功率’將可運㈣同步方式來呼叫鱗服務。非同步呼叫方式乃指 田客戶端送出射訊息後,並不要求舰器端立㈣應執行結果,而是客 戶端將先中斷與健II之連線,待伺服端完成客戶請求之運算後,再由伺 服端主動告知客户魏行結果。此卿將可降低連線維進而提 间服務呼叫成功的機率。如圖二所#,為習用非同步的網路服務運作方式, 在非同步架構下健是由服務提供者模組5及服刺費者模組4所構成; 顧:務提供者模組5會提供新的網路服務,當服務消費者模組4有需要時, 會向服務提供者模組5發出請求訊息,服務提供者模組5在接收到訊息後, 將立即告知服務消費者模組4已接受請求之訊息,此時服務消費者模組4 便不需要與服務提供者模組5維持連線的狀態。服務提供者模組5在告知 服務消費者模組4已經收請求後便開始進行運算,服務程式%運算完畢後 會透過回呼(eal丨baek)的方式將執行結果傳給服務消費者模組心 目前解決執行時間長的服務程式呼叫不穩定之問題,主要採取非同步 呼叫技術。從上述可知網路服務使用非同步的呼叫方式可以降低連線維持 的時間At之值,因此可以提高網路服務呼叫成功的機率。但是上述的方法 1376127 並沒有降低通訊協定每單位時間發生失敗的機率,因此運用非同步架構吟 叫網路服務的方法還是存在一定程度的失敗率。 由此可見,上述習用方式仍有諸多缺失及不足,實非一良善之設計, 而返待加以改良。 本案發明人鑑社m方柄触的各項缺點及从,思加以 . ’並鮮年苦心孤騎心研究後,終於成功研發完成本件—種高 可靠之非同步網路服務呼叫架構及方法β • 【發明内容】 在先前技術尹提到-個網路服務啤叫成功的機率為卜…⑽。針 對執行時間長的網路服務來說由於At餘大因此容易發生呼叫失敗的情 況,因此為了降低△之值就必須採用非同步呼叫的方式,藉由非同步呼叫 機制提升服務呼叫的可靠度。 本發明之目的即在於提供__以提升網路服務可#度之翻步網路 #服務呼叫架構及方法,除了運用非同步呼叫機制外,還採用-種可靠的訊 息傳輸方式來降低通訊協定每單位時間發生失敗的機率⑴。 彳達成上述發明目的之_種高可#之非同步網路服務呼叫架構及方 法,係由服務消費者模組、服務提供者模組及訊息仵列(m卿q_) 模組所組成,·本發明運用訊息仵列模組及非同対叫技術來建構一個高可 靠_服務雜,本_在_呼,_下,_的膽通訊 協疋改用m宁賴組做為服務訊息傳遞的媒介,藉由訊息仔列模組來保 證訊息送達的特性可以提高傳輸之可靠度,這使得在呼叫執行時間長的網 7 1376127 路服務時’除了可降⑽__収可同断低訊息遺關機率透過 本發明所提出的緖及方法,將可以幫雌式設計師建置—個高可靠服務 導向的計算環境, 【實施方式】 • 吐_士,為本發明—種高可靠之非同步網路服務呼叫架構及方法 .之實施架構不思圖,由圖中可知,本發明係-種可靠的網路服務架構,係 _ *服務提供者模紅2、服務消費者模組!及訊息仵列模組3所構成;其中該 服務提供者触2會提供新的‘晴服務,當服㈣費者模組i有需要時, 會向服務提供麵組2發出請求訊息,祕務例者π所的訊息會被 暫存於π求㈣31巾,等待服務提供者模組2來取走請求訊息。請求訊息 被服務提供_£ 2取走錢轉送給雜减21,職程式21依照請求 訊息進行運算卫作’在服務程式21運算後錄運算縣藉她務回覆者22 將執行結果傳送到回覆侧32,服務消費者模組!會藉由回呼裎式12從回 • 覆佇列32 t取走服務訊息。 上I;參閱圖四,為本發明之服務消費者模組詳細架構示意圆由圖中奇 知,本發明之服務消費者模組1,包含下列子模組: —客戶端程式113,係指使用網路服務關戶端程式,此模組藉由服 務代理程式提供用戶端程式一個呼叫遠端程序的方法; 一程序池130 ’係用來儲存等待服務端回應的客戶端程式113,當客戶 端程式呼叫遠端服務之後便被存於程序池130中等待執行結果; 一回呼程式126,係負責用來接收遠端服務程式的執行結果,並且在 8 接到回覆訊糾能繼續進行後續完成客戶端程式⑴的功能; 服務代理者11卜為客戶端料m _额赫通的橋樑,服務代 理者in封裝了概端物件通訊的邏輯,客戶端程式町以透過操作服 務代理者111物件得到遠端的服務; -件列貧訊設定槽,制來記載請諸㈣訊112與回餅列資訊 服務代理者ill透過获贼訊騎列互動並麟求訊息送至請求仔 列中; 簡單物件存取協定引擎110 ’係負責將使用者所發出的請求包裝成 P格式送丨去並且在其接㈣畴訊息後能夠將Saap的訊息格式轉換 成可供客戶端程式113使用之物件; 回覆跨聽者122,翻來讀取回餅財的訊息,並且將訊息送給 客戶端的回呼程式126 ; 程序刀派者I24 ’係利用回覆訊息中的程序識別編號找到相對應的 客戶端程式113,並將訊息傳給對應的客戶端程式113 ; 一程序識別資料庫125,係用來存放相關的程序識別資料。 請參閱圖五,為本發明之訊息佇列模組詳細架構示意圖,由圖中可知, 本發明之訊息佇列模組3,包含下列子模組: 一請求佇列31,為一先進先出(FIFO)佇列,此佇列用來暫存服務消 費者模組所請求之訊息; 一回覆佇列32,為一先進先出(FIFO)佇列,此佇列用來暫存服務提 供者模組所回覆之訊息。 1376127 ,參閲圖!1:本發明之服務提供者模組詳細架構示意圖,由圖t可知, 本發明之服務提供者模組2,包含下列子模組: -凊求件列冷聽者212,係用來讀取請求件列中的訊息,並且將訊息 送給服務程式215 ; -分列資訊設定檔,係用來記載請求仵列資訊213與回覆彳宁列資訊 22卜回呼代理程式220透過設定檔與訊息仔列互動並將回覆訊息送至回覆 佇列中; -簡單物件存取協定引擎214,係負責將請求㈣、者212所接收 的請求訊息格式賴成可讓服務减215使狀齡,並細覆訊息完成 後再包裝成Soap格式傳送出去; 一服務程式215,係為處理服務消費者模組需求的核心模組,其依據 請求訊息進行運算之作並且在完祕能齡動告知服務㈣者模組此請 求已經完成; 一回呼代理程式220,係將服務程式215的執行結果送回去服務消費 者模組,其擔任服務提供者模組與服務消費者模組之回呼程式的溝通橋 襟’回呼代理程式220封裝了與訊息佇列通訊的邏輯;服務程式215可透 過回呼代理程式220與服務消費者模組之回呼程式溝通。 ,為本發明之系統建置架構示意圖,由圖中可知,本發明 之運作模式,乃由服務提供者模組2提供新的網路服務,當服務消費者模 組1有需要時,便會發出一個請求訊息至請求佇列31之中,該服務提供者 模級2中配有一個請求佇列聆聽者212,當請求佇列聆聽者212察覺請求佇 10 丄376127 列31中有請求訊息之後就會將其轉送給服務程式2i5,服務程式犯在接 到請求訊息之後開始執行運算工作,於工作結束時再透過回呼代理程式创 將執行結果發送至咖宁列32巾,服務消f者模組i也配有—個回覆伶聽 者122 ’回覆跨聽者122在察覺回餅列32中有回覆訊息後便將回覆訊 息透過程序分派者丨24送給正確的回呼程式⑶並告知其執行結果。1376127 IX. Description of the Invention: [Technical Field] The present invention relates to a highly reliable asynchronous network service call architecture and method, and more particularly to a method for asynchronous call network service, which is in a service oriented architecture. It provides a stable network call service. [Prior Art] Web Services is an open and decentralized software component based on standards such as HTTP, XML, WSDL, and SOAP. The web service provides a standard remote call interface and application authoring method. The programmer can write and use the web service program through any programming language development tool. Since the network service adopts the XML standard specification and uses the Simple Object Access Protocol (SOAP) as the communication method between the services, the service technology can easily complete the cross-platform integration function. It can be seen from the above concept that the current network service technology mainly utilizes Hypertext Transfer Protocol (HTTP) as a medium for service message delivery. In the specification of Ηττρ, the client sends a request to receive (4) _ Libi County is connected. As shown in Figure-Qing, it is composed of the operating network service, the fine service provider module 5 and the dirty Mf module 4. The service provider module will provide new network services for the service. When the consumer module 4 needs it, it will send a request message to the service provider 5 and respond to the service provider. After receiving the message, the user will start the operation according to the request, and immediately transfer the certificate to the service consumer module after the service program is executed. (4) When the customer requests it, the execution time is 5 曰In the case of long-term network services, the network connection must maintain a constant line of service during the service process. In this case, the request timeout and the call failure occur when the service call is made. The longer the network line, the higher the probability of failure of this connection, because the length of the connection and the ratio of the connection to the service's growth will reduce the success rate of the service. . HfMt) ' where ps represents the probability of successful call service, [the probability of failure for each soap time of the protocol, and At is the time the connection is maintained. Therefore, in order to improve the success rate of the call service, the scale service can be called in a synchronous (four) synchronous manner. The asynchronous call mode means that after the field client sends out the message, the ship terminal is not required to perform the result (4), but the client will first disconnect the connection with the health II, and wait until the server completes the client request operation. The server actively informs the customer of Wei Wei results. This will reduce the chances of connecting the line and then making the service call successful. As shown in Figure 2, it is a non-synchronized network service operation mode. In the non-synchronous architecture, the service provider module 5 and the service provider module 4 are formed. A new network service will be provided. When the service consumer module 4 needs it, a request message will be sent to the service provider module 5. The service provider module 5 will immediately inform the service consumer module after receiving the message. The group 4 has accepted the request message, and the service consumer module 4 does not need to maintain the connection state with the service provider module 5 at this time. The service provider module 5 starts the operation after notifying the service consumer module 4 that the request has been received. After the service program % calculation is completed, the execution result is transmitted to the service consumer module by means of a callback (eal丨baek). At present, the problem of unstable call processing for a long execution time is mainly solved by the non-synchronous call technology. It can be seen from the above that the use of the asynchronous call mode by the network service can reduce the value of the time At which the connection is maintained, so that the probability of successful network service call can be improved. However, the above method 1376127 does not reduce the probability of failure of the communication protocol per unit time, so there is still a certain degree of failure rate in the method of using the asynchronous architecture to call the network service. It can be seen that there are still many shortcomings and deficiencies in the above-mentioned conventional methods. It is not a good design, but it needs to be improved. In this case, the inventor of the inventor of the company's m-handle touches the shortcomings and the slaves, and thinks. 'After the fresh years of painstaking research, finally successfully developed this piece - a highly reliable asynchronous network service call architecture and method β • [Summary of the Invention] In the prior art, Yin mentioned that the probability of success in a web service beer is... (10). In the case of a network service with a long execution time, it is easy to cause a call failure due to At, so in order to reduce the value of Δ, it is necessary to adopt an asynchronous call mode, and the reliability of the service call is improved by the asynchronous call mechanism. The purpose of the present invention is to provide a network call service architecture and method for improving the network service. In addition to using the asynchronous call mechanism, a reliable message transmission method is used to reduce the communication protocol. The probability of failure per unit time (1). The non-synchronous network service call structure and method of the above-mentioned invention is composed of a service consumer module, a service provider module and a message queue (mqing q_) module, The invention uses the message queue module and the non-same squeaking technology to construct a high reliability _ service miscellaneous, and the _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The medium, by means of the message queue module to ensure the characteristics of the message delivery can improve the reliability of the transmission, which makes the time of the call execution time of the network 7 1376127 road service, in addition to the drop (10) __ can be the same as the low message off rate Through the method proposed by the present invention, the female designer can be built into a highly reliable service-oriented computing environment, [Embodiment] • 吐_士, the invention is a highly reliable asynchronous network The service call architecture and method. The implementation architecture is not considered. As can be seen from the figure, the present invention is a reliable network service architecture, which is a service provider module 2, a service consumer module! And the message queue module 3; wherein the service provider touches 2 to provide a new 'clear service', when the service (4) fee module i needs it, it will send a request message to the service provider quilt 2, the secret The message of the π is temporarily stored in the π (4) 31 towel, waiting for the service provider module 2 to take the request message. The request message is provided by the service _£2, and the money is transferred to the miscellaneous 21, and the job program 21 performs the operation edu according to the request message. After the service program 21 is calculated, the operation counts the county and the replies are sent. 22 The execution result is transmitted to the reply side. 32, service consumer module! The service message will be taken from the back to the list 32 t by calling back. Referring to FIG. 4, a detailed architecture diagram of the service consumer module of the present invention is known from the figure. The service consumer module 1 of the present invention includes the following sub-modules: a client program 113, which refers to Using the network service gateway program, the module provides a method for the client program to call the remote program by the service agent; a program pool 130' is used to store the client program 113 waiting for the server to respond, when the client After the terminal program calls the remote service, it is stored in the program pool 130 to wait for the execution result; a callback program 126 is responsible for receiving the execution result of the remote service program, and receives the reply and corrects the power at 8 Completing the function of the client program (1); the service agent 11 is the bridge of the client material m _ Hertton, the service agent in package encapsulates the logic of the terminal object communication, and the client program program passes the operation service agent 111 object Get the remote service; - The list of the poor set-up slot, the system is required to record (4) News 112 and the returning cake information service agent ill through the thief-inspired riding and interacting with the message to the request The Simple Object Access Protocol Engine 110 is responsible for packaging the request sent by the user into a P format and converting the Saap message format to be usable by the client program 113 after receiving the (4) domain message. Object; reply to the listener 122, flip back to read the message of the cake, and send the message to the client's callback program 126; the program knife I24' uses the program identification number in the reply message to find the corresponding client The end program 113 transmits the message to the corresponding client program 113. A program identification database 125 is used to store related program identification data. Please refer to FIG. 5 , which is a detailed architecture diagram of the message queue module of the present invention. As can be seen from the figure, the message queue module 3 of the present invention includes the following sub-modules: a request queue 31 is a first in first out (FIFO) queue, which is used to temporarily store the message requested by the service consumer module; a reply queue 32, which is a first in first out (FIFO) queue, which is used to temporarily store the service provider. The message that the module replied to. 1376127, see the picture! A detailed architecture diagram of the service provider module of the present invention. As can be seen from the figure t, the service provider module 2 of the present invention includes the following sub-modules: - a request for the listener 212, for reading Request the message in the item list and send the message to the service program 215; - Distribute the information profile, which is used to record the request information 213 and reply to the information message 22 to the callback agent 220 through the profile and message The child interaction and the reply message are sent to the reply queue; the simple object access agreement engine 214 is responsible for determining the request message format received by the request (4) and 212 to allow the service to be reduced by 215 and fine. After the message is completed, it is packaged and sent out in Soap format. A service program 215 is a core module for processing the needs of the service consumer module, and performs calculation according to the request message and informs the service (4) at the end of the service. The module has completed this request; a callback agent 220 sends the execution result of the service program 215 back to the service consumer module, which serves as a callback program for the service provider module and the service consumer module. The communication bridge 襟 'callback agent 220 encapsulates the logic for communicating with the message queue; the service program 215 can communicate with the callback program of the service consumer module via the callback agent 220. A schematic diagram of the system architecture of the present invention. As can be seen from the figure, the mode of operation of the present invention is that the service provider module 2 provides a new network service. When the service consumer module 1 needs it, it will A request message is sent to the request queue 31, which is provided with a request queue listener 212, after requesting the queue listener 212 to perceive the request 伫10 丄 376127 in column 31 with the request message It will be forwarded to the service program 2i5. The service program will start to perform the calculation work after receiving the request message. At the end of the work, the execution result will be sent to the Caining 32 towel through the callback agent program. Module i is also equipped with a reply listener 122 'Reply cross listener 122 sends a reply message to the correct callback program via the program dispatcher (24 after the reply message is detected in the returning block 32 (3) and informs Its execution results.

在建置本發明之架構時,必須先定義服務介面211與回呼(cal·) 介面⑵’上述介面都只包含輸人訊息,㈣有回傳值。在介面定義完 後再交由客戶端(服務消費者模組)與伺服端(服務提供者模幻依據所 定義之介面各自實作。在服務介面2U中,輸入訊息必須包含客戶端回呼 程式執行端點以及客戶端程序識別碼。在时介面中必須包含客戶端程序 ’識别碼並且兩個"面都無回傳值,為單向呼叫的網路服務介面。 (一)服務消費者模組之建置 (A)匯入服務介面:將服務介面211 入開發模組中,此介面是指 伤WSDL;fs ’介面中規範服務程式215輸入訊息21〇及輸出 訊息2u。在本發明架射並無輪出訊息211,執行結果是藉由 回呼(callback)的方式來告知服務㈣者模組卜 ⑻》又^4求SfL息列資訊:取得訊騎列3中請树列31的連接 資戒,並且將此資訊寫在一個參數槽裡。如此一來,當訊息件 列3的連接資机有改變時,程式設計師只需要修改此參數樓就 可以與新的佇列連線。 (C)實作呼叫服務的代理程式·本發明架構在呼叫遠端服務時,採 用代理者模式,客戶端透過代理程式向服務程式發出請求。目 前大多數的開發工具皆可以產生此代理者程式,只要提供服務 程式的WSDL,開發工具就可以產生此代理者。 (D) 設定回呼程式之訊息佇列:取得訊息佇列3中回覆佇列32的連 接資訊,並且將此資訊寫在一個參數檔裡。如此一來,當訊息 佇列3的連接資訊有改變時,程式設計師只需要修改此參數檔 就可以與新的佇列連線。 (E) 製作回覆訊息聆聽者:回覆佇列聆聽者122是依據先前所設定 之回覆彳宁列資訊123與訊息仵列3連線’並且依據設定讀取回 覆佇列32中之訊息。 (F) 依照回呼介面實作事件處理程式:客戶端必須依照先前所定義 之回呼介面來實作事件處理程式,透過事件處理程式來完成服 務取得服務結果的後續處理程序。 (G) 實作程序分派者模組:程序分派者模組在接到回覆訊息時必須 依照程序識別資訊將此訊息回傳給正確的用戶端程式113的回 呼程式126。 ()將回呼知式轉換成網路服務:將回呼程式126轉換成網路服務 讓服務提供者模組2可以透過此網路服務將執行結果回傳給服 務消費者模組i。 (一)服務提供者模組之建置 (貫作服務程式·依照先前所定義之服務介面211實作服務程式 12 1376127 215。此程式的特性是只有輸入值沒有回傳值。 (B) 設定服務之請求訊息佇列:取得訊息佇列3中請求佇列31的連 接資訊,.並且將此資訊寫在一個參數檔裡。如此一來,當訊息 佇列3的連接資訊有改變時,程式設計師只需要修改此參數檔 就可以與新的彳宁列連線。 (C) 將服務程式轉成網路服務:本發明架構採用非同步方式呼叫網 路服務’因此在轉成網路服務時必須轉成單向呼叫沒有回傳值 的網路服務。 (D) 製作請求佇列聆聽者:請求佇列聆聽者212是依據先前所設定 之請求佇列連接資訊213與訊息佇列3連線,並且依據設定讀 取請求佇列31中之訊息。 (E) 匯入回呼介面:將回呼介面12ι匯入開發模組中,此介面是指 一份WSDL檔,介面中規範回呼程式126輸入訊息120。在本 發明架構中並無輸出訊息’回呼轾式在接收到服務結果後便進 行事件處理動作。 (F) 產生呼叫回呼介面的代理程式:本發明架構在呼叫遠端服務時 採用代理者模式’服務提供者模組2透過代理程式將執行結果 傳送給服務消費者模組卜目前大多數的開發工具皆可以產生此 代理者程式’只要提供服務程式的WSDL,開發工具就可以產 生此代理者。 (G) 將執行結果透過回呼代理程式傳給服務消費者模組:運用步驟 13 1376127 2.6所建立的代a减在服難式執行結树,職行結果透過 回覆代理者220傳給服務消費者模組i。 (三)訊息彳宁列之建置 (A)建立請树列:在訊息㈣3巾建立—個請求洲&來暫存請 求訊息。 ⑻建立回覆仔列:在訊息仔列3中建立一個回覆行列Μ來暫存回 覆訊息。 本發明所提供之—種③可靠之糊步鱗服務呼叫架構及方法,與其 他習用技術相互比較時,更具備下列優點: 1·本發明為—種刺步呼叫鴨服務的方法,其在服務導向架構下提 供一個穩定的網路服務呼叫架構。 本發月乃由服務提供者模組、服務消費者模組及訊息仔列模組所架 设而成’透過訊息仵列模組之保證送達特性與非同步呼叫的機制, 來建立一個高可靠度的網路服務呼叫方式。 3.本發明所提出㈣構及方法,將可以幫雜式設計師建置—個高可 靠服務導向的計算環境。 上列坪細說明係針對本發明之一可行實施例之具體說明,惟該實施例 並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實 施或變更,均應包含於本案之專利範圍中。 斤述纟案不但在技術思想上確屬創新,並能較習用物品增進上 述^項姐顧充分符合新雜及進步性之法定㈣翻要件,麦依法 /0127 /0127 以勵發明,至感德便。 提出申請’想請f局核准本件發明專利申請案, 【圖式簡單說明】 圖一為習用網路服務的運作架構示意圓; 圖二為習用非同步的網路服務運作架構示意圖; 圖二為本發明-種高可靠之非同步網路服務呼叫架構及方法之實施架 構示意圖; 圖四為本發明之服務消費者模組詳細架構示意圖; 圖五為本發明之訊息佇列模組詳細架構示意圖; 圖六為本發明之服務提供者模組詳細架構示意圖;以及 圖七為本發明之系統建置架構示意圖。 【主要元件符號說明】 1 服務消費者模組 11 服務呼叫者 12 回呼程式 110 簡單物件存取協定引擎 111 服務代理者 112 請求佇列資訊 113 客戶端程式 120 輸入訊息 121 回平介面 122 回f聆聽者 15 1376127In constructing the architecture of the present invention, the service interface 211 and the callback (cal.) interface (2) must be defined first. The above interface only contains the input message, and (4) has the return value. After the interface is defined, it is handed over to the client (service consumer module) and the server (the service provider phantom according to the defined interface. In the service interface 2U, the input message must contain the client callback program. Execution endpoint and client program identifier. The client program 'identity code must be included in the interface and the two "faces have no return value, which is the network service interface for one-way call. (1) Service consumer Module construction (A) import service interface: the service interface 211 into the development module, this interface refers to the injury WSDL; fs 'interface in the specification service program 215 input message 21 〇 and output message 2u. In the present invention There is no rounding message 211, the result of the execution is to inform the service (4) by means of callback (4), and then to find the SfL information column: to obtain the information in the column 3 Connect the resource and write this information in a parameter slot. As a result, when the connection value of the message column 3 changes, the programmer only needs to modify the parameter building to connect with the new queue. Line (C) implementation call service The agent architecture of the present invention adopts the agent mode when calling the remote service, and the client sends a request to the service program through the agent. Currently, most development tools can generate the agent program, as long as the WSDL of the service program is provided. The development tool can generate the agent. (D) Set the message queue of the callback program: Get the connection information of the reply queue 32 in the message queue 3, and write the information in a parameter file. When the connection information of message queue 3 changes, the programmer only needs to modify this parameter file to connect with the new queue. (E) Create a reply message Listener: Reply to the list of listeners 122 is based on the previous The set response is the connection between the information 123 and the message queue 3 and the message in the reply queue 32 is read according to the setting. (F) The event handler is implemented according to the callback interface: the client must be as previously defined The callback interface is used to implement the event handler, and the event handler is used to complete the subsequent processing of the service to obtain the service result. (G) Implementation program dispatcher module : The program dispatcher module must return this message to the callback program 126 of the correct client program 113 according to the program identification information when receiving the reply message. () Convert the callback to the network service: will return The conversion of the program 126 into a network service allows the service provider module 2 to transmit the execution result back to the service consumer module i through the network service. (1) The establishment of the service provider module (through the service program) The service program 12 1376127 215 is implemented according to the service interface 211 defined previously. The characteristic of this program is that only the input value has no return value. (B) The request message queue for setting the service: the request queue in the message queue 3 31 connection information, and write this information in a parameter file. As a result, when the connection information of the message queue 3 changes, the programmer only needs to modify the parameter file to be able to interact with the new parameter. Connected. (C) Converting the service program into a network service: The architecture of the present invention uses a non-synchronous call network service. Therefore, when converting to a network service, it must be converted into a one-way call for a network service that does not have a return value. (D) Making a request for the listener: The requesting listener 212 is connected to the message queue 3 in accordance with the previously set request link information 213, and the message in the request list 31 is set according to the setting. (E) Import callback interface: Import the callback interface 12 into the development module. This interface refers to a WSDL file, and the interface callback program 126 inputs the message 120 in the interface. There is no output message in the architecture of the present invention. The callback action is performed after receiving the service result. (F) An agent that generates a call back interface: the architecture of the present invention uses a proxy mode when calling a remote service. The service provider module 2 transmits the execution result to the service consumer module through the agent. The development tool can generate this agent program. As long as the WSDL of the service program is provided, the development tool can generate the agent. (G) Pass the execution result to the service consumer module through the callback agent: use the generation a created in step 13 1376127 2.6 to perform the service execution tree, and the job result is transmitted to the service consumer through the reply agent 220. Module i. (3) The establishment of the message is set up (A) The establishment of the request tree: in the message (4) 3 towel establishment - a request for the continent & to temporarily store the request message. (8) Create a reply column: Create a reply queue in the message queue 3 to temporarily store the reply message. The invention provides a 3 reliable paste step service call structure and method, and has the following advantages when compared with other conventional technologies: 1. The present invention is a method for calling a duck service, which is in service Provide a stable network service call architecture under the guiding architecture. This month, the service provider module, the service consumer module and the message queue module are set up to establish a high reliability through the mechanism of guaranteed delivery characteristics and non-synchronized calls through the message queue module. The way the network service calls. 3. The (4) structure and method proposed by the present invention will enable a heterogeneous designer to build a highly reliable service-oriented computing environment. The detailed description of the preferred embodiments of the present invention is intended to be illustrative, and is not intended to limit the scope of the invention. In the scope of the patent in this case. It is not only innovative in terms of technical thinking, but also able to improve the above-mentioned legal items in accordance with the customary (four) reversal of the above-mentioned items, and the law is invented, to the sense of virtue. Will. Applying for 'I would like to ask the F Bureau to approve the invention patent application, [Simplified illustration] Figure 1 is a schematic diagram of the operational architecture of the conventional network service; Figure 2 is a schematic diagram of the operational architecture of the unsynchronized network service; The present invention is a schematic diagram of a high-reliability asynchronous network service call architecture and method; FIG. 4 is a schematic diagram of a detailed architecture of a service consumer module according to the present invention; Figure 6 is a schematic diagram of a detailed architecture of a service provider module of the present invention; and Figure 7 is a schematic diagram of a system architecture of the present invention. [Main component symbol description] 1 Service consumer module 11 Service caller 12 Callback program 110 Simple object access agreement engine 111 Service agent 112 Request queue information 113 Client program 120 Input message 121 Leveling interface 122 Back f Listener 15 1376127

123 回覆佇列資訊 124 程序分派者 125 程序識別資料庫 126 回呼程式 130 程序池 2 服務提供者模組 21 服務程式 22 服務回覆者 210 輸入訊息 211 輸出訊息 212 請求佇列聆聽者 213 請求彳宁列資訊 214 簡單物件存取協定引擎 215 服務程式 220 回呼代理程式 221 回覆佇列資訊 3 訊息佇列模組 31 請求4宁列 32 回覆佇列 4 服務消費者模組 5 服務提供者模組 16 1376127 50 服務程式123 Reply to queue information 124 Program dispatcher 125 Program identification database 126 Callback program 130 Program pool 2 Service provider module 21 Service program 22 Service responder 210 Input message 211 Output message 212 Request queue listener 213 Request Suining Column information 214 Simple object access agreement engine 215 Service program 220 Callback agent 221 Reply to queue information 3 Message queue module 31 Request 4 columns 32 Reply queue 4 Service consumer module 5 Service provider module 16 1376127 50 service program

Claims (1)

1376127 101年3月08日修正替換頁 十、申請專利範圍: κ —種高可靠之非同步網路服務呼叫架構’主要包括: 一服務消費者模組,係可將一請求訊息傳輸至訊息佇列模組之請求 佇列上;或透過訊息佇列模組之回覆佇列,將由服務提供者模組所 提供之服務訊息取回; 一訊息佇列模組,係包括請求佇列及回覆佇列,其中該請求佇列乃 用來暫存由服務消費者模組所發出之請求訊息,而該回覆仔列乃用 來暫存由服務提供者模組所回覆的服務訊息;1376127 Revised replacement page on March 08, 101. Patent application scope: κ—a highly reliable asynchronous network service call architecture' mainly includes: A service consumer module that transmits a request message to a message伫The request for the module is listed or the service message provided by the service provider module is retrieved through the reply queue of the message module; a message queue module includes the request queue and reply 伫The request queue is used to temporarily store the request message sent by the service consumer module, and the reply queue is used to temporarily store the service message replied by the service provider module; 一服務提供者模組,係由訊息佇列模組中取得請求訊息,依照請求 訊息進行運算工作,並將運算結果傳送到回覆佇列,待服務消費者 模組從回覆佇列中取走服務訊息, 其中該服務消費者模組包含: 一客戶端程式,係指使賴路服務的用戶端程式,此模組藉由 服務代理程式提供用戶端程式—個呼叫相程序的方法; 一程序池,係用來儲存等碰務㈣翻客戶端程式,當客戶 端程式呼叫遠魏叙後㈣杨㈣池中料執行結果; 一回啤«’係貞責用來触遠魏務料的執行結果,並且 接到回覆訊息時能繼續進行後續完成客戶端程式的功能. -:=者,為客戶端程式與— 理者封裝了有關遠端程序呼叫的邏輯,客、 戈 作服務代理者物件❹m端的服務; 1可以透過操 一佇列資訊設定檔 係用來記載請求仵 列資訊與回覆佇歹,] 資 18 1376127 101年3月08日修正替換頁 訊,服務代理者透過設定檔與訊息佇列互動並將請求訊息送至 請求佇列中; 一簡單物件存取協定引擎,係負責將使用者所發出的請求包裝 成Soap格式送出去,並且在其接收到回覆訊息後能夠將Soap 的訊息格式轉換成可供客戶端程式使用之物件; 一回覆聆聽者,係用來讀取回覆佇列中的訊息,並且將訊息送 給客戶端的回呼程式;A service provider module obtains a request message from a message queue module, performs an operation according to the request message, and transmits the operation result to the reply queue, and the service consumer module removes the service from the reply queue. The message, wherein the service consumer module comprises: a client program, which is a client program for the service of the service, the module provides a client program by the service agent - a method for calling a phase program; It is used to store the other tasks (4) to turn over the client program, when the client program calls the far Wei Xu (4) Yang (four) pool material execution results; a beer «'s system is used to touch the implementation results of Wei Wei materials, And when receiving the reply message, it can continue to perform the function of the client program. -:=, for the client program and the controller encapsulates the logic about the remote program call, the guest, the service agent object ❹m end Service; 1 can be used to record the information and reply to the request through the operation of the information list,] 18 1376127 revised the replacement page on March 08, 101, service The administrator interacts with the message through the profile and sends the request message to the request queue. A simple object access protocol engine is responsible for packaging the request sent by the user into Soap format and receiving it. After replying to the message, the Soap message format can be converted into an object that can be used by the client program; a reply listener is used to read the message in the reply queue and send the message to the client's callback program; 一程序分派者,係利用回覆訊息中的程序識別編號找到相對應 的客戶端程式,並將訊息傳給對應的客戶端程式; 一程序識別資料庫,係用來存放相關的程序識別資料, 其中該服務提供者模組包含: 一請求佇列聆聽者,係用來讀取請求佇列中的訊息,並且將訊 息送給服務程式;A program dispatcher uses the program identification number in the reply message to find a corresponding client program and transmits the message to the corresponding client program; a program identification database is used to store related program identification data, wherein The service provider module includes: a request queue listener, which is used to read the message in the request queue and send the message to the service program; 一佇列資訊設定擋,係用來記載請求佇列資訊與回覆佇列資 訊,回呼代理程式透過設定擋與訊息佇列互動並將回覆訊息送 至回覆佇列中; 一簡單物件存取協定引擎,係負責將請求佇列聆聽者所接收的 請求訊息格式轉換成可讓服務程式使用之物件,並待回覆訊息 完成後再包裝成Soap格式傳送出去; 一服務程式,係為處理服務消費者模組需求的核Θ模組,其依 據請求訊息進行運算之工作並且在完成後能夠主動告知服務消 費者模組此請求已經完成; 19 1376127 101年3月08曰修正替換頁 7回啤代理程式’係將服務程式的執行絲送回去服務消費者 杈組,其擔任服務提供者模組與服務消費者模組之回啤程式的 溝通橋樑,回呼代理程式封裝了與訊息仔列通訊的邏輯/、 2.如申請專利範圍第】項所述之一種高可靠之非同步網路服務呼叫架 構,其中該訊息佇列模組,包含下列子模組·' 〇月·:Μ丁歹J ’此γ丁列用來暫存服務消費者模組所請求之訊息; -回覆仵列’此件列用來暫存服務提供者模組所回覆之訊息。 3. 如f請專利範圍第2 " 種冋可靠之非同步網路服務 構’,、中該請求㈣為-先進先出料。 ’、 4. 如申請專利範圍第2項所述之一 種问了靠非同步網路服務呼叫竿 構,其中該回覆件列為-先進先出符列。 5. -種南可靠之非同步網路服務呼叫方法,係包括: (A) 服務提供者㈣提供新的服務,供服務消費者模組來作 (B) 服務消費者模組發 伴, 自料Μ纽騎賴k請求件列 聽者 (c)服務k供者(组中配有—個請求件列跨聽者,當請求件列跨 察覺請切Μ料求訊息之魏會將其料給服務程式. (D)服務程式在接到請求訊息之後開始執行運算工作; 呼代理程式將執行結果發送至 (e)服務m作結束時,再透過 訊息仵列模組之回覆仔列中; (F)服務消費者樓+ 、配有—個’回覆跨聽者’回覆#聽者在察覺 20 1376127 101年3月08日修正替換頁 佇列令有回覆訊息後,便會將回覆訊息透過程序分派者送給正確的 回呼程式並告知其執行結果。A list of information settings is used to record the requested information and reply to the queue information. The callback agent interacts with the message queue and sends the reply message to the reply queue. A simple object access protocol The engine is responsible for converting the format of the request message received by the requesting listener into an object that can be used by the service program, and then packaging the message into Soap format after the reply message is completed; a service program is for processing the service consumer The core module of the module requirement, which performs the operation according to the request message and can actively inform the service consumer module that the request has been completed after completion; 19 1376127 101 March 101 曰Replacement page 7 back beer agent 'The service thread is sent back to the service consumer group, which serves as a communication bridge between the service provider module and the service consumer module, and the callback agent encapsulates the logic for communication with the message. /, 2. A highly reliable asynchronous network service call architecture as described in the patent application scope, wherein the message is , including the following sub-modules · '〇月·:Μ丁歹J 'This γ list is used to temporarily store the message requested by the service consumer module; - Reply to the queue 'This column is used to stage the service provider The message that the module replied to. 3. If f is required, the patent scope 2 " reliable non-synchronous network service structure', and the request (4) is - advanced first-out material. ', 4. As described in item 2 of the scope of the patent application, the asynchronous network service call structure is asked, wherein the reply is listed as a -first in first out queue. 5. - Reliable asynchronous network service calling method, including: (A) Service Provider (4) Provide new service for service consumer module (B) Service Consumer Module Partner, from It is expected that the new rider will request the listener (c) the service provider (there is a request for the cross-lister in the group, and when the request is listed, please refer to the message and ask for the message.) (a) the service program begins to perform the computing operation after receiving the request message; the calling agent sends the execution result to (e) the service m is finished, and then through the reply queue of the message queue module; (F) Service Consumers Building + with a 'Reply Listener' Reply # Listener is aware of the 20 1376127 Correction of the replacement page on March 08, 101. After the reply message, the reply message will be The program dispatcher sends the correct callback program and informs him of the execution result. 21twenty one
TW96145833A 2007-12-03 2007-12-03 A dependable web service invocation framework with asynchronous communication TWI376127B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96145833A TWI376127B (en) 2007-12-03 2007-12-03 A dependable web service invocation framework with asynchronous communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96145833A TWI376127B (en) 2007-12-03 2007-12-03 A dependable web service invocation framework with asynchronous communication

Publications (2)

Publication Number Publication Date
TW200926697A TW200926697A (en) 2009-06-16
TWI376127B true TWI376127B (en) 2012-11-01

Family

ID=44729769

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96145833A TWI376127B (en) 2007-12-03 2007-12-03 A dependable web service invocation framework with asynchronous communication

Country Status (1)

Country Link
TW (1) TWI376127B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10841390B2 (en) 2018-11-22 2020-11-17 Industrial Technology Research Institute Method and system for synchronizing publication and subscription of message queues

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10841390B2 (en) 2018-11-22 2020-11-17 Industrial Technology Research Institute Method and system for synchronizing publication and subscription of message queues

Also Published As

Publication number Publication date
TW200926697A (en) 2009-06-16

Similar Documents

Publication Publication Date Title
EP3748908B1 (en) Method, system, network device, storage medium for creating a network slice
CN109246251A (en) A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN103117983B (en) The method for designing of data service request answer method and data, services protocol stack
TWI337485B (en) Transmitting and receiving messages through a customizable communication channel and programming model
CN101981897A (en) Method and device for communicating according to the standard protocol OPC UA in a client/server system
US20050080930A1 (en) Method and apparatus for processing service requests in a service-oriented architecture
CN105531979B (en) It is a kind of for exchanging the method and server of data between a client and a server
CN105763619B (en) The method and device that client and server-side are communicated
CN103098433A (en) SERVLET API and method for XMPP protocol
EP1679620A1 (en) Bulk transmission of messages using a single HTTP request
JP2006244472A (en) Web service processing using mapi-compliant mail application
WO2015021650A1 (en) Transmission method, device and system for media stream
Bernstein et al. Using XMPP as a transport in Intercloud Protocols
WO2009138001A1 (en) Method, centralized control device and system for service accounting
CN105068801A (en) Method and system for modifying json date format
CN101621516B (en) Interactive method for enterprise service bus and external Web service
TWI376127B (en) A dependable web service invocation framework with asynchronous communication
CN101339520A (en) Method for accessing EJB into enterprise service bus
WO2023208132A1 (en) Api conversion system and access request processing method therefor, and electronic device and medium
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
CN106611455A (en) WeChat platform system of queuing system and implementation method thereof
CN102857482A (en) Method and system for transmitting data on basis of multiple servers
JP5326045B2 (en) Bidirectional communication system and server device used therefor
CA2592881C (en) Dynamic endpoint aggregator for web services
CN103473127B (en) A kind of method and system by JSP technical limit spacing cross-system variables

Legal Events

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