學術產出-Theses

Article View/Open

Publication Export

Google ScholarTM

政大圖書館

Citation Infomation

  • No doi shows Citation Infomation
題名 AspectW:剖面導向之例外處理與重試機制
AspectW: an Aspect-Oriented Catch and Retry
作者 高沛功
Kao, Pei Gogn
貢獻者 陳恭
Chen, Kung
高沛功
Kao, Pei Gogn
關鍵詞 Exception
Exception handling
Try-and-Catch
AOP
Catch-and-Retry
Exception
Exception handling
Try-and-Catch
AOP
Catch-and-Retry
日期 2013
上傳時間 7-Jul-2014 11:08:46 (UTC+8)
摘要 雖然絕大多數的現代程式語言都有嚐試與補獲(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】 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
描述 碩士
國立政治大學
資訊科學學系
101971018
102
資料來源 http://thesis.lib.nccu.edu.tw/record/#G0101971018
資料類型 thesis
dc.contributor.advisor 陳恭zh_TW
dc.contributor.advisor Chen, Kungen_US
dc.contributor.author (Authors) 高沛功zh_TW
dc.contributor.author (Authors) Kao, Pei Gognen_US
dc.creator (作者) 高沛功zh_TW
dc.creator (作者) Kao, Pei Gognen_US
dc.date (日期) 2013en_US
dc.date.accessioned 7-Jul-2014 11:08:46 (UTC+8)-
dc.date.available 7-Jul-2014 11:08:46 (UTC+8)-
dc.date.issued (上傳時間) 7-Jul-2014 11:08:46 (UTC+8)-
dc.identifier (Other Identifiers) G0101971018en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/67306-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 資訊科學學系zh_TW
dc.description (描述) 101971018zh_TW
dc.description (描述) 102zh_TW
dc.description.abstract (摘要) 雖然絕大多數的現代程式語言都有嚐試與補獲(try-and-catch)的例外處理機制,提供開發人員撰寫模組性高的例外處理程式碼,既可以立即處理例外狀況,也可以將例外傳遞(propagate)到系統其他模組。但是很多例外情況是暫態的(transient),發生後,應用程式是有可能從例外狀況恢復(recovery)過來,而不必啟動例外處理的程序。例如:分散式系統在進行網路連線時,可能因為網路一時不穩定而失敗,但稍停幾秒後再進行連線就可以了。於是就有學者倡議擴充例外處理機制,增加補獲與重試(catch-and-retry)的功能。本研究採用剖面導向(aspect-oriented)的觀點,參考AspectF的方法來實作一個輕量級的補獲與重試模組,AspectW,讓開發人員可以“流利(fluent)介面”的方式輕鬆撰寫例外捕獲與重試的程式碼,達到了讓開發人員不必更動主功能邏輯程式碼就能簡單地加入補獲與重試的功能。zh_TW
dc.description.abstract (摘要) 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.en_US
dc.description.tableofcontents 第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
zh_TW
dc.format.extent 2999857 bytes-
dc.format.mimetype application/pdf-
dc.language.iso en_US-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0101971018en_US
dc.subject (關鍵詞) Exceptionzh_TW
dc.subject (關鍵詞) Exception handlingzh_TW
dc.subject (關鍵詞) Try-and-Catchzh_TW
dc.subject (關鍵詞) AOPzh_TW
dc.subject (關鍵詞) Catch-and-Retryzh_TW
dc.subject (關鍵詞) Exceptionen_US
dc.subject (關鍵詞) Exception handlingen_US
dc.subject (關鍵詞) Try-and-Catchen_US
dc.subject (關鍵詞) AOPen_US
dc.subject (關鍵詞) Catch-and-Retryen_US
dc.title (題名) AspectW:剖面導向之例外處理與重試機制zh_TW
dc.title (題名) AspectW: an Aspect-Oriented Catch and Retryen_US
dc.type (資料類型) thesisen
dc.relation.reference (參考文獻) 【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
zh_TW