簡易檢索 / 詳目顯示

研究生: 謝易廷
Hsieh, Yi-Ting
論文名稱: 利用開源計畫管理被廢棄的程式介面
Leveraging Open Source Projects to Manage Deprecated APIs
指導教授: 焦惠津
Jiau, Hewijin Christine
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2019
畢業學年度: 107
語文別: 英文
論文頁數: 40
中文關鍵詞: 應用程式介面棄用機制被廢棄的程式介面管理客戶端計畫分類
外文關鍵詞: API deprecation, deprecated API management, client project classification
相關次數: 點閱:63下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 應用程式介面提供者 (API provider ) 透過保留被廢棄的應用程式介面 (Deprecated API) 在新版本的框架/函式庫 (Framework/Library) 之中,藉此吸引客戶端計畫 (Client project) 升級框架/函式庫的版本。
    然而,因為保留被廢棄的應用程式介面時,需要付出額外的維護成本的關係,框架/函式庫的成長可能會受到阻礙。
    從開源計畫可以觀察到,由於客戶端計畫的開發者採用反動式監控 (Reactive monitoring) 的方式監控應用程式介面提供者釋出的消息,造成大部分的計畫並未升級框架/函式庫,又或者是很晚才完成升級。
    這意味著,應用程式介面提供者將無法充分地取得,採用應用程式介面廢棄機制 (API deprecation) 管理應用程式介面時,所能夠帶來的優勢。
    除此之外,應用程式介面提供者又將資源浪費在維護已無客戶端計畫使用的被廢棄應用程式介面上。
    這些問題反應出,採用應用程式介面廢棄機制,對於應用程式介面提供者是一件不合乎成本效益的事情。
    而造成這些問題的根本原因,是因為應用程式介面提供者無法有效的透過現行的溝通管道,傳播改版消息給客戶端計畫的開發者知道。
    以及無法透過溝通管道取得被廢棄的應用程式介面在客戶端計畫的使用狀況資料,因此在管理被廢棄的應用程式介面時,應用程式介面提供者無法做出正確的決定。

    為此,這一篇論文提出了一個名叫作「被廢棄的應用程式介面管理助理」的工具,簡稱 DAMA,來克服在使用現行的溝通管道時會遇到的問題,並協助應用程式介面提供者管理被廢棄的應用程式介面。
    首先,DAMA 利用開源計畫來散播框架/函式庫的改版消息,藉此讓客戶端計畫下的開發者能夠更快的得知改版消息,並克服透過現行的溝通管道,無法有效的傳播改版消息的問題。
    並且,DAMA 會從開源計畫中,收集被廢棄的應用程式介面的使用統計數據,提供此統計數據給應用程式介面提供者在管理被廢棄的應用程式介面時參考,讓應用程式介面提供者能夠做出正確決定。

    這篇論文藉由四個研究問題來驗證 DAMA 所能夠帶來的效果。
    最終結果證實了,DAMA 能夠大幅加速客戶端計畫在框架/函式庫升級和應用程式介面遷移 (API migration) 的進度。
    此外,DAMA 亦能夠協助應用程式介面提供者節省在維護被廢棄的應用程式介面所需要付出的資源。
    因此,透過 DAMA 的協助,應用程式介面提供者將能夠使得採用應用程式介面廢棄機制是合乎成本效益。

    API providers preserve deprecated APIs in new versions of frameworks/libraries to serve and wait for client developers to update them.
    However, preserving deprecated APIs may hinder the growth of frameworks/libraries due to additional maintenance cost.
    After observing multiple projects in open source communities shows that most projects never update frameworks/libraries or update them late.
    Thus, API providers do not gain any benefits from employing API deprecation.
    Besides, API providers waste resources on preserving the deprecated APIs which are not used by client projects.
    The root cause of these issues is that API providers do not manage deprecated APIs well through current communication channels.

    In this thesis, a tool, Deprecated API Management Assistant (DAMA), is proposed to conquer the issues of deprecated API management and assist API providers to manage deprecated APIs.
    DAMA leverages open source projects to spread the information of new releases of frameworks/libraries and to gather deprecated API usage statistics for deprecated API management.
    To evaluate the effectiveness of DAMA, four research questions are investigated.
    The results of the research questions show that DAMA significantly speeds up the update and migration progress of client projects.
    Besides, DAMA will assist API providers to save the resources spent on maintaining deprecated APIs through removing useless deprecated APIs.
    Through the assistant of DAMA, API providers will make the result of API deprecation cost-effective.

    摘要i Abstract iii Acknowledgements v Table of Contents vi List of Tables viii List of Figures ix Chapter 1. Introduction 1 Chapter 2. Background 4 2.1 Effort of Updating Frameworks/Libraries . . . . . . . . . . . . . . . . . . . 4 2.1.1 API Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.2 Updating Dependent Frameworks/Libraries . . . . . . . . . . . . . . 5 2.2 API Deprecation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1 Costs and Benefits of API Deprecation . . . . . . . . . . . . . . . . 6 Chapter 3. Preliminary Study 8 3.1 Apache Commons CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3.1 Research Question 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3.2 Research Question 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3.3 Research Question 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.4.1 Delayed Awareness . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.4.2 Unreliable Deprecated API Usage Data . . . . . . . . . . . . . . . . 17 Chapter 4. Approach 18 4.1 Open Source Projects as Channels . . . . . . . . . . . . . . . . . . . . . . . 18 4.2 Overview of Deprecated API Management Assistant . . . . . . . . . . . . . 18 4.3 Providing Needed Information to Client Projects . . . . . . . . . . . . . . . 19 4.4 Version Management Strategy . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.5 Client Project Classification Model (CPCM) . . . . . . . . . . . . . . . . . 20 4.6 Algorithm of the Classification Model . . . . . . . . . . . . . . . . . . . . 22 4.7 Client Project Classification . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.8 Statistics Visualization for API Providers . . . . . . . . . . . . . . . . . . . 25 Chapter 5. Evaluation 28 5.1 Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.2 Research Question 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 Research Question 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.4 Research Question 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.5 Research Question 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Chapter 6. Related Work 35 Chapter 7. Conclusion and Future Work 37 References 39

    [1] Apache. Apache Commons CLI, 2018. https://commons.apache.org/proper/commonscli/.
    [2] Apache. Maven, 2018. https://maven.apache.org/.
    [3] Apache. Maven Repository, 2018. https://mvnrepository.com/.
    [4] C. Bogart, C. Kästner, J. Herbsleb, and F. Thung. How to break an API: cost negotiation
    and community values in three software ecosystems. In Proceedings of the 24th ACM
    SIGSOFT International Symposium on Foundations of Software Engineering, pages
    109–120, Seattle, WA, USA, 2016.
    [5] B. Dagenais and M. P. Robillard. Recommending adaptive changes for framework evolution.
    In Proceedings of the 30th International Conference on Software Engineering
    (ICSE), pages 481–490, Leipzig, Germany, 2008.
    [6] D. Dig and R. Johnson. The role of refactorings in API evolution. In Proceedings of
    21st IEEE International Conference on Software Maintenance (ICSM), pages 389–398,
    2005.
    [7] D. Dig, S. Negara, V. Mohindra, and R. Johnson. ReBA: refactoring-aware binary
    adaptation of evolving libraries. In Proceedings of the 30th International Conference
    on Software Engineering (ICSE), pages 441–450, Leipzig, Germany, 2008.
    [8] django. Deprecation Policy, 2018. https://docs.djangoproject.com/en/dev/internals/releaseprocess/#
    internal-release-deprecation-policy.
    [9] GitHub. GitHub, 2018. https://github.com/.
    [10] J. Henkel and A. Diwan. CatchUp! Capturing and replaying refactorings to support
    API evolution. In Proceedings of the 27th International Conference on Software Engineering
    (ICSE), pages 274–283, 2005.
    [11] R. Holmes and R. J. Walker. Customized awareness: recommending relevant external
    change events. In Proceedings of the 32nd ACM/IEEE International Conference on
    Software Engineering (ICSE) - Volume 1, pages 465–474, Cape Town, South Africa,
    2010.
    [12] R. G. Kula, D. M. German, A. Ouni, T. Ishio, and K. Inoue. Do developers update
    their library dependencies? An empirical study on the impact of security advisories on
    library migration. Empirical Software Engineering, 23(1):384–417, Feb. 2018.
    [13] T. Preston-Werner. Semantic Versioning, 2018. https://semver.org/.
    [14] R. Robbes, M. Lungu, and D. Röthlisberger. How do developers react to API deprecation?
    The case of a Smalltalk ecosystem. In Proceedings of the 20th ACM SIGSOFT International
    Symposium on the Foundations of Software Engineering, pages 56:1–56:11,
    Cary, North Carolina, 2012.
    [15] A. A. Sawant, R. Robbes, and A. Bacchelli. On the reaction to deprecation of 25,357
    clients of 4+1 popular Java APIs. In 2016 IEEE International Conference on Software
    Maintenance and Evolution (ICSME), pages 400–410, Raleigh, NC, USA, 2016.
    [16] I. Sommerville. Software Engineering. Pearson Education Limited, ninth edition, 2010.
    [17] D.-F. Yu, C.-Y. Chang, H. C. Jiau, and K.-F. Ssu. Which API lifecycle model is the
    best for API removal management. In Proceedings of 12th International Conference
    on Software Engineering Advances (ICSEA), pages 219–224, Athens, Greece, 2017.
    [18] J. Zhou and R. J. Walker. API deprecation: a retrospective analysis and detection
    method for code examples on the web. In Proceedings of the 2016 24th ACM SIGSOFT
    International Symposium on Foundations of Software Engineering, pages 266–
    277, Seattle, WA, USA, 2016.

    下載圖示 校內:2024-02-02公開
    校外:2024-02-02公開
    QR CODE