• 沒有找到結果。

失敗轉移是當故障發生時或異常終止以前的伺服器能夠自動切換到冗餘或 備用伺服器,不頇要任何人為干預,通常使用者沒有察覺伺服器已經自動切換到 冗餘或備用伺服器。首先為了達到失敗轉移的功能除了原本主伺服器(Master BPEL Server)頇要增加一個監督伺服器(Monitor Server)及一個備份伺服器 (Backup BPEL Server),監督伺服器功能為監督主伺服器是否正常運作並且作為 提供服務窗口,當主伺服器發生故障或異常終止時監督伺服器會將備份伺服器啟 用叢集伺服器(cluster server)來當監督伺服器。

若是單以功能面來說也可以使用 BPEL Engine 來達到監督伺服器的功能,監 督伺服器每 5 分鐘會詢問主伺服器是否有問題,若是主伺服器沒有回復正常訊息 則監督伺服器會負責啟動備份伺服器,備份伺服器會根據已序列化程序實體執行 回復動作,當回復動作完成後再繼續執行原本流程。備份伺服器的流程為了達到 根據已序列化程序實體執行回復動作的功能必頇加上額外的步驟。

BPEL[9]為了提供程序執行時即時訊息處理能力特別定訂 Event Handlers 機 制使得當程序執行時有針對此程序執事件發生時會有對應程序 Event Handlers 來處理此事件,監督伺服器利用主伺服器及備份伺服器 Event Handlers 來得知 主伺服器及備份伺服器是否運作正常,判斷方式就是當主伺服器及備份伺服器正 常運作時會回復 ok 訊息,當訊息不是 ok 或逾時還沒有 ok 訊息的話監督伺服器 就斷定該伺服器已經異常終止。Failover Model 架構如圖 3.17

圖 3.18 Failover Model 架構

4.Implementation and experimental result

實作圖 1.6 後勤補給系統(二)工作流程 BPEL[9]使用序列化操作模型 (Serialization Operation Model)為依據產生 BPEL’如 Appendix. A,而一般 補給單位及武器部門及供應商使用 Axis2 提供 Code Generator 協助產生 Web Services 主要程式如 Appendix. B 所示,執行補給系統(二)請求及回覆 SOAP 如 下:

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:sup="http://www.example.org/SupplySystem/">

<soapenv:Header/>

<soapenv:Body>

<sup:SupplyRequestOperation>

<ItemName>F16 Engine</ItemName>

<ItemID>F16_0001</ItemID>

<Amount>2</Amount>

<RequestPerson>Chao-Chen Chiang</RequestPerson>

<RequestDate>2009-07-10T24:00</RequestDate>

<Description>situation emergency</Description>

<Type>weapon</Type>

</sup:SupplyRequestOperation>

</soapenv:Body>

</soapenv:Envelope>

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<aetgt:SupplyRequestOperationResponse

xmlns:aetgt="http://www.example.org/SupplySystem/">

<Result

xmlns:ns1="http://www.example.org/ItemOrder/">OK</Result>

表 5.1 序列化時間及程序實體大小(一)

表 5.1 序列化時間及程序實體大小(一)中 Pid 為實體序列化之識別子,因為 同一個 BPEL 工作流程會由成千上萬個程序實體,當還沒序列化時在作業系統可 以識別不同程序實體,但是序列化後需要提供檔案系統一個識別子,Pid 就是為 了這個目的而創造出來的而且透過 Serialization Register Web Service 產生 同時 BPEL 為了協同運作 Web services 常常需要提供序列化 Web services 該程 序實體 Pid,否則序列化 Web services 無法得知要求序列化程序之正確的程序實 體,步驟(Activity)欄位表示原本 BPEL 之步驟而步驟代號(Aid) 欄位表示 BPEL’

所賦予之步驟代號,序列化費時(毫秒) 欄位則是序列化一個步驟花費多少毫 秒,程序實體大小(Byte)欄位是序列化的程序實體大小,由表 5.1 可知因為序列

<Description xmlns:ns1="http://www.example.org/ItemOrder/">Any thing is fine.</Description>

<ReplyDate>'2009-07-10T24:00'</ReplyDate>

</aetgt:SupplyRequestOperationResponse>

</soapenv:Body>

</soapenv:Envelope>

圖 4.1 後勤補給系統(二)申請人申請及回覆 SOAP 內容一 Pid 1c655bdf-f5ba-4002-8d66-9fbd91e804be

步驟(Activity) 步驟代號(Aid) 序列化費時(毫秒) 程 序 實 體 大 小

化是隨執行的步驟持續序列化所以程序實體大小是一直遞增直到工作流程結束。 Pid 95a2bc8d-ce6e-4b1c-86b6-894df4d2ea88

步驟(Activity) 步驟代號(Aid) 序列化費時(毫秒) 程 序 實 體 大 小

<soapenv:Header/>

<soapenv:Body>

<sup:SupplyRequestOperation>

<ItemName>鋼盔</ItemName>

<ItemID>helmet</ItemID>

<Amount>1000</Amount>

<RequestPerson>Chao-Chen Chiang</RequestPerson>

<RequestDate>2009-07-08T24:00</RequestDate>

<Description>一般補給品,數量要正確</Description>

<Type>normal</Type>

</sup:SupplyRequestOperation>

大小(一)同一 BPEL 工作流程但是申請 SOAP 內容不同,可以發現 Pid 不一樣,基 本上所有的程序實體的 Pid 都不應該重複,步驟(Activity)欄位和表 5.1 同而序 列化費時(毫秒)則不同,檔案系統可能因為效能考量會有誤差不過一般來說每個 步驟序列化平均約花十幾毫秒程序實體大小(Byte)欄位則跟序列化變數大小及 所執行步驟多寡有關。

5.Conclusions & Future work

服務導向架構[2]的概念已經被提出相當一段時間,早期透過 CORBA[26]、

RMI[27]、DCOM[28]或甚至使用 Socket 的技術都可以建立具有服務導向架構[2]

的系統,但是都由於技術及系統平台沒有統一標準使得原意是在軟體設計的概念 和整合性軟體的架構的理念大打折扣,Web Services 的技術成熟成為實踐服務導 向架構[2]非常適合的基礎技術,但是針對服務導向架構[2]的安全機制卻沒有一 個統一標準可以遵循。

本文針對服務導向架構[2]下探討程序實體的安全的重要性及其應用於動態 行為的特性,還有它對於容錯能力及負載平衡能力的提升也有很好的潛力,提出 一個架構透過所提出的 SDL 將軟體元件、服務及流程三個部份整合並定義 Security 及 Serialization 功 能 及 約 束 , 其 中 關 於 訊 息 傳 遞 時 的 安 全 (Communication Security) 借由網路服務安全語言[20]所提出的操作模型達 成,並由 SDL 中 Workflow definition 定義該工作流程與對應網路服務安全語言 關聯。

所提出的 SDL 主要將程序實體的安全定義於 Serialization definition 並 透 過 DynamicBehaviorLogic 定 義 步 驟 的 動 態 行 為 處 理 邏 輯 及 SerializationVariable 定義序列化內容達到賦予動態行為邏輯處理安全機制又 不會造成管理維護的夢魘並確保權責歸屬明確可信的優點。

(Communication Security)的結合的進一步研究,希望能夠達到代理人(Proxy) 在訊息傳遞時能夠透過安全的機制與程序實體的安全更進一步整合,接著就是提 供圖形化介面工具協助管理人員製作 SDL 文件而不頇要了解 SDL 語言,希望製作 SDL 能夠透過拖拉的方式或圖形化操作介面減少錯誤政策制定的情況發展。

References

1. Berson, A, Client/Server Architecture, McGraw-Hill, New York, 1996.

2. T. Erl. Service-Oriented Architecture: Concept, Technology, and Design. Prentice Hall, 2005.

3. H.A. Reijers and I.T.P.Vanderfeesten. Cohesion and Coupling Metrics for Workflow Process Design. In J. Desel, B. Pernici and M. Weske, editors, Proceedings of the 2nd International Conference on Business Process Management (BPM 2004), Lecture Notes in Computer Science 3080, 290-305. Springer Verlag, Berlin, 2004.

4. Casati, F., Ilnicki, S., Jin, L.,Krishnamoorthy, V. and Shan, M.

(2000):Adaptive and dynamic service composition in eflow.Technical Report, HPL-200039, Software Technology Laboratory, Palo Alto, USA.

5. UDDI Version2 Specifications - http://www.oasis-open.org/

committees/uddi-spec/doc/tcspecs.htm #uddiv2

6. Anis Charfi and Mira Mezini,Using Aspects for Security Engineering of Web Service Compositions,Proceedings of the IEEE International Conference on Web Services (ICWS’05)

7. An Liu, Qing Li, Liusheng Huang, and Mingjun Xiao,A Declarative Approach to Enhancing the Reliability of BPEL Processes,2007 IEEE International Conference on Web Services (ICWS 2007)

8. Glen Dobson,Using WS-BPEL to Implement Software Fault Tolerance for Web Services,Proceedings of the 32nd EUROMICRO Conference on Software Engineering and Advanced Applications (EUROMICRO-SEAA'06) 9. Web Services Business Process Execution Language Version 2.0,OASIS

Standard,11 April 2007

10. Jim Lau, Lau Cheuk Lung, Joni da S. Fraga,Giuliana Santos Veronese,

Designing Fault Tolerant Web Services Using BPEL,Seventh IEEE/ACIS International Conference on Computer and Information Science,2008 11. Radio Perlman, An Overview of PKI Trust Models,IEEE Network

November/December 1999

12. Tzilla Elrad, Mehmet Aksit, Gregor Kiczales, Karl Lieberherr, Harold Ossher,Discussing aspects of AOP ,Communications of the ACM,Volume 44, Number 10 (2001), Pages 33-38

13. Pullum, Laura L.,Software Fault Tolerance Techniques and Implementation,ISBN:1580531377

14. Web Services Description Language (WSDL) 1.1, W3C Note 15 March 2001 15. Simple Object Access Protocol (SOAP) 1.1,W3C Note 08 May 2000 16. S.Bajaj, et.al.,Web Services Policy Framework (WS-Policy),September

2004

17. Web Services Security Policy Language (WS-SecurityPolicy) July 2005 Version 1.1

18. Web Services Security: SOAP Message Security 1.1(WS-Security 2004), OASIS Standard Specification, 1 February 2006

19. Hypertext Transfer Protocol -- HTTP/1.1,W3C June, 1999

20. G.H. Hwang, Y.H. Chang, T.K. Chang, An operational model and language support for securing web services, IEEE International Conference on Web Services, ICWS 2007, 9–13 July 2007,

21. Gwan-Hwan Hwang, Tao-Ku Chang, ‚Document Security Language (DSL) V2.0,‛ Technical report, National Taiwan Normal University,

http://www.xml-dsl.com/DSL_Syntax_v2.pdf.

22. Herbert Zimmermann,OSI Reference Model-The IS0 Model of Architecture

for Open Systems Interconnection,IEEE TRANSACTIONS .ON COMMUNICATIONS, VOL. COM-28, NO. 4, APRIL 1980

23. 服務導向架構 (Service Oriented Architecture) 應用專欄:服務導向架 構 (Service Oriented Architecture) 應用,作者:簡西村(台灣微軟開發 工具暨平台推廣處資訊平台策略顧問),2004 年 12

月,http://www.microsoft.com/taiwan/msdn/columns/soa/SOA_overview _2004112901.htm

24. 從原理面探討服務導向架構(SOA),倪文君 叡揚資訊

Architect,http://www.gss.com.tw/tw/eispage/vol52/eispage5202.htm 25. Web Services 介紹,資策會數位教育研究所講師 鄧文

焯,http://www.iiiedu.org.tw/knowledge/knowledge20021231_1.htm 26. S. Vinoski, ‚CORBA: Integrating diverse applications within

distributed heterogenous environments,‛ IEEE Commun. Mag., pp.

46–55, Feb.1997.

27. Troy Bryan Downing. Java RMI: Remote Method Invocation. Number 0764580434. IDG Books, 1998.

28. Chung, P., Huang, Y., Yajnik, S., Liang, D., Shih, J.,Wang, C.-Y., AND Wang, Y. 1998. DCOM and CORBA side by side, step by step, and layer by layer. C++ Rep. 10, 1 (Jan.), 18–29.

Appendix A.

BPEL 使用序列化操作模型為依據產生 BPEL’

後勤補給系統(二)工作流程 BPEL 之執行中程序(Active Process)

後勤補給系統(二)工作流程 BPEL 之程序執行過程

Appendix B.

一般補給單位及武器部門 Web Service 主要功能類別如下:

供應商 Web Service 主要功能類別如下:

public class DesktopReceiveSkeleton implements

DesktopReceiveSkeletonInterface{

/**

* Auto generated method signature

* @param receiveOperation0

*/

public org.example.www.desktopreceive.ReceiveOperationResponse

ReceiveOperation(org.example.www.desktopreceive.ReceiveOperation receiveOperation0)

{

org.example.www.desktopreceive.ReceiveOperationResponse rtn=new org.example.www.desktopreceive.ReceiveOperationResponse();

rtn.setReceivePerson("John");

DateFormat dateformat;

dateformat = new SimpleDateFormat("yyyy-MM-dd'*'HH:mm:ss.SSSS'/'");

rtn.setReceiveDate(dateformat.format(new Date()).replace('*', 'T').replace('/', 'Z'));

rtn.setDescription("I got it");

return rtn;

} }

public class ItemOrderSkeleton implements ItemOrderSkeletonInterface{

public org.example.www.itemorder.OrderOperationResponse OrderOperation

(org.example.www.itemorder.OrderOperation orderOperation0) {

org.example.www.itemorder.OrderOperationResponse rtn = new org.example.www.itemorder.OrderOperationResponse();

rtn.setResult("OK");

rtn.setDescription("Any thing is fine.");

return rtn;

} }

相關文件