學術產出-學位論文
文章檢視/開啟
書目匯出
-
題名 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-七月-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/10http://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 2009http://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: 9781617291142http://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, wikipediahttp://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 AOPhttp://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, Kung en_US dc.contributor.author (作者) 高沛功 zh_TW dc.contributor.author (作者) Kao, Pei Gogn en_US dc.creator (作者) 高沛功 zh_TW dc.creator (作者) Kao, Pei Gogn en_US dc.date (日期) 2013 en_US dc.date.accessioned 7-七月-2014 11:08:46 (UTC+8) - dc.date.available 7-七月-2014 11:08:46 (UTC+8) - dc.date.issued (上傳時間) 7-七月-2014 11:08:46 (UTC+8) - dc.identifier (其他 識別碼) G0101971018 en_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 (描述) 101971018 zh_TW dc.description (描述) 102 zh_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章 緒論 11.1 前言 11.2 研究動機 21.3 研究目的 31.4 研究成果 51.5 論文大綱 6第2章 相關研究與技術背景 72.1 Catch And Retry 72.1.1. Basic Retry 102.1.2. Parameterized Retry 102.1.3. Recovery From Multiple Exception 112.1.4. Scheduling Control Over Retries 112.2 Aspect-Oriented Programming 122.2.1 AOP術語 132.2.2 How AOP Works: Weaving 172.2.1 AOP Benefits 182.3 Implementing Retry - Featuring AOP 192.3.1 Related Works For Catch And Retry 212.3.2 Architecture And Programming Model 232.4 AspectJ 262.5 AspectF 292.5.1 AOP的一般案例 302.5.2 一個簡單的AOP框架 322.5.3 與一般AOP方案比較 33第3章 系統設計與架構 353.1 設計理念 353.1.1 緣由 353.1.2 理念 373.1.3 功能規劃 373.1.4 為何決定打造AspectW 393.2 設計原理 473.2.1 AspectW核心原理 473.2.2 Catch-And-Retry指令設計 533.2.3 Restore設計原理說明 573.2.4 常見例外故障情境與指令下法 593.3 設計過程 633.3.1 AspectW核心碼開發過程 633.3.2 AspectW補獲與重試指令設計過程 643.3.3 與AspectF的重試指令比較 65第4章 系統實作與展示 674.1 實作語言與工具 674.2 系統實作展示 694.2.1 三個基本應用模式 694.2.2 二個Facebook案例套用 74第5章 結論與建議 795.1 結論 795.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/#G0101971018 en_US dc.subject (關鍵詞) Exception zh_TW dc.subject (關鍵詞) Exception handling zh_TW dc.subject (關鍵詞) Try-and-Catch zh_TW dc.subject (關鍵詞) AOP zh_TW dc.subject (關鍵詞) Catch-and-Retry zh_TW dc.subject (關鍵詞) Exception en_US dc.subject (關鍵詞) Exception handling en_US dc.subject (關鍵詞) Try-and-Catch en_US dc.subject (關鍵詞) AOP en_US dc.subject (關鍵詞) Catch-and-Retry en_US dc.title (題名) AspectW:剖面導向之例外處理與重試機制 zh_TW dc.title (題名) AspectW: an Aspect-Oriented Catch and Retry en_US dc.type (資料類型) thesis en 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/10http://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 2009http://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: 9781617291142http://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, wikipediahttp://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 AOPhttp://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