跳到主要內容

簡易檢索 / 詳目顯示

研究生: 高沛功
Kao, Pei Gogn
論文名稱: AspectW:剖面導向之例外處理與重試機制
AspectW: an Aspect-Oriented Catch and Retry
指導教授: 陳恭
Chen, Kung
學位類別: 碩士
Master
系所名稱: 理學院 - 資訊科學系碩士在職專班
Excutive Master Program of Computer Science
論文出版年: 2014
畢業學年度: 102
語文別: 中文
論文頁數: 84
中文關鍵詞: ExceptionException handlingTry-and-CatchAOPCatch-and-Retry
外文關鍵詞: Exception, Exception handling, Try-and-Catch, AOP, Catch-and-Retry
相關次數: 點閱:152下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 雖然絕大多數的現代程式語言都有嚐試與補獲(try-and-catch)的例外處理機制,提供開發人員撰寫模組性高的例外處理程式碼,既可以立即處理例外狀況,也可以將例外傳遞(propagate)到系統其他模組。但是很多例外情況是暫態的(transient),發生後,應用程式是有可能從例外狀況恢復(recovery)過來,而不必啟動例外處理的程序。例如:分散式系統在進行網路連線時,可能因為網路一時不穩定而失敗,但稍停幾秒後再進行連線就可以了。於是就有學者倡議擴充例外處理機制,增加補獲與重試(catch-and-retry)的功能。本研究採用剖面導向(aspect-oriented)的觀點,參考AspectF的方法來實作一個輕量級的補獲與重試模組,AspectW,讓開發人員可以“流利(fluent)介面”的方式輕鬆撰寫例外捕獲與重試的程式碼,達到了讓開發人員不必更動主功能邏輯程式碼就能簡單地加入補獲與重試的功能。


    Most modern programming languages support try-and-catch mechanism that enables developers to write modular exception handling code which can not only process exceptions immediately but also propagate them to the other modules in the system. However, many exceptions are transient, when occurred, the application is likely to recover from the exception, thereby rendering it unnecessary to start up the exception handling code. For example: during a network connection in a distributed system, you may fail due to network instability moment, suffice to wait for a few seconds and then re-connect it. Thus, some scholars initiate to expand the exception handling mechanism, and proposed catch-and-retry mechanism. This thesis takes an aspect-oriented point of view, and adapts the AspectF library to implement a lightweight level catch-and-retry library, AspectW, so that developers can use the “fluent interface” approach to easily write exceptions capture and retry code. As a result, developers do not have to modify the main logic code and could simply add catch-and-retry code to handle exceptions well.

    第1章 緒論 1
    1.1 前言 1
    1.2 研究動機 2
    1.3 研究目的 3
    1.4 研究成果 5
    1.5 論文大綱 6
    第2章 相關研究與技術背景 7
    2.1 Catch And Retry 7
    2.1.1. Basic Retry 10
    2.1.2. Parameterized Retry 10
    2.1.3. Recovery From Multiple Exception 11
    2.1.4. Scheduling Control Over Retries 11
    2.2 Aspect-Oriented Programming 12
    2.2.1 AOP術語 13
    2.2.2 How AOP Works: Weaving 17
    2.2.1 AOP Benefits 18
    2.3 Implementing Retry - Featuring AOP 19
    2.3.1 Related Works For Catch And Retry 21
    2.3.2 Architecture And Programming Model 23
    2.4 AspectJ 26
    2.5 AspectF 29
    2.5.1 AOP的一般案例 30
    2.5.2 一個簡單的AOP框架 32
    2.5.3 與一般AOP方案比較 33
    第3章 系統設計與架構 35
    3.1 設計理念 35
    3.1.1 緣由 35
    3.1.2 理念 37
    3.1.3 功能規劃 37
    3.1.4 為何決定打造AspectW 39
    3.2 設計原理 47
    3.2.1 AspectW核心原理 47
    3.2.2 Catch-And-Retry指令設計 53
    3.2.3 Restore設計原理說明 57
    3.2.4 常見例外故障情境與指令下法 59
    3.3 設計過程 63
    3.3.1 AspectW核心碼開發過程 63
    3.3.2 AspectW補獲與重試指令設計過程 64
    3.3.3 與AspectF的重試指令比較 65
    第4章 系統實作與展示 67
    4.1 實作語言與工具 67
    4.2 系統實作展示 69
    4.2.1 三個基本應用模式 69
    4.2.2 二個Facebook案例套用 74
    第5章 結論與建議 79
    5.1 結論 79
    5.2 未來發展 80
    參考文獻 81

    【1】 Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, John Irwin. (June 1997). Aspect-Oriented Programming. Published in proceedings of the European Conference on Object-Oriented Programming (ECOOP), Finland. Springer-Verlag LNCS 1241. June 1997.
    http://www.cs.ubc.ca/~gregor/papers/kiczales-ECOOP1997-AOP.pdf, May 2014
    【2】 陳恭,「剖面導向程式設計(AOP/AOSD)簡介」, 政大資科系, Last revised: May 14, 2007
    http://www.cs.nccu.edu.tw/~chenk/AOP-intro.pdf, May 2014
    【3】 Emre , Benjamin Livshits, Madanlal Musuvathi (October 2009). CatchAndRetry: Extending Exceptions to Handle Distributed System Failures and Recovery, Microsoft Research. PLOS ’09, October 11, 2009, Big Sky, Montana, USA. Copyright 2009 ACM 978-1-60558-844-5/09/10
    http://research.microsoft.com/en-us/um/people/livshits/papers/pdf/plos09.pdf, May 2014
    【4】 Bruno Cabral, Paulo Marques (Sep. 2009). Implementing Retry - Featuring AOP. 4th Latin-American Symposium on Dependable Computing (LADC'09), September 2009
    http://pmarques.dei.uc.pt/papers/bcabral_pmarques_ladc09.pdf, May 2014
    【5】 系統架構設計 第14章,和春技術學院
    http://el.fotech.edu.tw/localuser/kjyang/992/SA/ch14.ppt, May 2014
    【6】 AOP入門,Spring技術手冊第四章
    http://www.dotspace.idv.tw/Book/chap4.pdf, May 2014
    【7】 Matthew D. Groves (June 2013). AOP in .NET - Practical Aspect-Oriented Programming - chapter 1,2, Copyright 2013 Manning Publications. ISBN: 9781617291142
    http://www.manning.com/groves/, May 2014
    【8】 Aspect-oriented programming, Wikipedia, modified on 1 Feb. 2014.
    http://en.wikipedia.org/wiki/Aspect-oriented_programming, May 2014
    【9】 Omar Al Zabir (11 Jun 2011). AspectF Fluent Way to Add Aspects for Cleaner Maintainable Code.
    http://www.codeproject.com/Articles/42474/AspectF-Fluent-Way-to-Add-Aspects-for-Cleaner-Main, May 2014
    【10】 Fluent interface, wikipedia
    http://en.wikipedia.org/wiki/Fluent_interface , May 2014
    【11】 如何使用AspectJ Compiler開發AspectJ程式 (2006-05-10)
    https://sites.google.com/site/swankyhsiao/aspectj-with-ajc, May 2014
    【12】 Dominik Stein (2002). An Aspect-Oriented Design Model Based on AspectJ and UML – chapter 3: AspectJ. submitted to the Department of Business Arts, Economics, and Management Information Systems, University of Essen, Germany.
    http://www-stud.uni-essen.de/~sw0136/wissensArbeiten/DiplomarbeitDIIDominikStein.pdf, May 2014
    【13】 Dominik Stein, Stefan Hanenberg, and Rainer Unland (2002). An UML-based Aspect-Oriented Design Notation For AspectJ. Institute for Computer Science, University of Essen, Germany. AOSD 2002, Enschede, The Netherlands. Copyright 2002 ACM 1-58113-469-X/02/0004.
    http://www.dawis.wiwi.uni-due.de/uploads/tx_itochairt3/publications/StHaUn_AspectOrientedDesignNotation_AOSD_2002.pdf, May 2014
    【14】 Mohsen (February 23, 2008). Using AspectJ and Java Annotations to Try Again.
    http://zoftware.blogspot.tw/2008/02/using-aspectj-and-java-annotations-to_23.html, May 2014
    【15】Arulkumaran Kumaraswamipillai (July 2007). Creating Java custom annotations with Spring aspectj AOP
    http://java-success.blogspot.tw/2013/07/creating-java-custom-annotations-with.html?utm_source=tuicool, May 2014
    【16】 C#程式語言,維基百科。
    http://zh.wikipedia.org/wiki/C♯ , May 2014
    【17】 Windows 7,維基百科。
    http://zh.wikipedia.org/wiki/Windows7, May 2014
    【18】 Microsoft Visual Studio,維基百科。
    http://zh.wikipedia.org/wiki/Visual_Studio_2010, May 2014
    【19】 .NET Framework,維基百科
    http://zh.wikipedia.org/wiki/.NET框架, May 2014

    QR CODE
    :::