Publications-Theses
Article View/Open
Publication Export
-
Google ScholarTM
NCCU Library
Citation Infomation
Related Publications in TAIR
題名 支援容器化RESTful微服務的分散式交易機制
Supporting Transparent Distributed Transactions among Containerized RESTful Microservices作者 黃薇倫
Huang, Wei-Lun貢獻者 廖峻鋒
Liao, Chun-Feng
黃薇倫
Huang, Wei-Lun關鍵詞 分散式交易
RESTful服務
容器化
Distributed Transaction
RESTful Service
Web API
Container日期 2025 上傳時間 3-Mar-2025 14:04:00 (UTC+8) 摘要 RESTful 架構風格在各種服務互動方式中日漸受歡迎。與此同時,如何支援跨多個服務的分散式交易在現今軟體系統中一直是個挑戰。此外,隨著微服務架構的興起以及將微服務託管於容器的普及,如何實現高效且可擴展的容器化 RESTful 服務交易管理機制成了必要的研究議題。本文介紹的分散式交易協定可以通透地為現有的 RESTful 服務結合容器化方式實現分散式交易。主要理念是將交易處理邏輯獨立,藉由依循邊車模式設計的容器附加到 REST 服務上。與其他針對 RESTful 服務的分散式交易機制不同,本研究提出的方法不需要修改 RESTful 服務邏輯和通訊協議。綜上所述,本研究提出了一個能以透通的方式,整合分散式交易邏輯至既存以容器為基礎的微服務的方法。此外,本文後半段也透過系統測試和實驗證明了方法的可行性並評估其效能。
In modern software systems, supporting transactions across multiple services presents a significant challenge. Among the various interaction approaches, the RESTful architectural style stands out as a popular choice. With the rise of microservice architecture and the growing popularity of hosting microservices in containers, the need for efficient and scalable transaction management mechanisms for containerized RESTful services has become increasingly important. This paper introduces a novel approach that transparently enhances existing non-transactional containerized RESTful services with transaction capabilities. The main idea is to implement transaction handling logic in a sidecar container, which can be attached to service containers as needed. Unlike other distributed transaction mechanisms for RESTful services, this approach eliminates the need to modify both the service logic and the communication protocol (HTTP). This research demonstrates the feasibility of the proposed method through case studies and experiments. Overall, this approach offers a seamless and efficient solution for integrating transaction management into containerized microservices.參考文獻 [1] R. Fielding and R. Taylor, “Principled design of the modern web architecture”, in Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium, 2000, pp. 407–416. [2] R. T. Fielding and R. N. Taylor, “Principled design of the modern web architecture”, vol. 2, no. 2, pp. 115–150, May 2002. [3] A. Elmagarmid, Database Transaction Models for Advanced Applications (The Morgan Kaufmann Series in Data Management Systems). Elsevier Science, 1992, ISBN: 9781558602144. [4] P. Bernstein and E. Newcomer, Principles of Transaction Processing (The Morgan Kaufmann Series in Data Management Systems). Elsevier Science, 2009. [5] A. Verma, L. Pedrosa, M. R. Korupolu, D. Oppenheimer, E. Tune, and J. Wilkes, “Large-scale cluster management at Google with Borg”, in Proceedings of the European Conference on Computer Systems (EuroSys), 2015. [6] M. Fowler and J. Lewis. “Microservices: A definition of this new architectural term”. (2014), [Online]. Available: https://martinfowler.com/articles/microservices. html. [7] E. Daraghmi, C. Zhang, and S. Yuan, “Enhancing saga pattern for distributed transactions within a microservices architecture”, Applied Sciences (Switzerland), vol. 12, no. 12, Jun. 2022, Publisher Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. [8] F. Haupt, F. Leymann, A. Scherer, and K. Vukojevic-Haupt, “A framework for the structural analysis of rest apis”, in 2017 IEEE International Conference on Software Architecture (ICSA), IEEE, 2017, pp. 55–58. [9] S. Kochman, P. T. Wojciechowski, and M. Kmieciak, “Batched transactions for restful web services”, in International Conference on Web Engineering, Springer, 2011, pp. 86–98. [10] L. Frosini, P. Pagano, L. Candela, M. Simi, and C. Bernardeschi, “Relock: A resilient two-phase locking restful transaction model”, Service Oriented Computing and Applications, vol. 15, no. 1, pp. 75–92, 2021. [11] A. Dey, A. Fekete, and U. Röhm, “Rest+t: Scalable transactions over http”, in 2015 IEEE international conference on cloud engineering, IEEE, 2015, pp. 36–41. [12] D. Krafzig, K. Banke, and D. Slama, Enterprise SOA: Service-Oriented Architecture Best Practices (The Coad Series). USA: Prentice Hall PTR, 2004. [13] B. Burns, Designing Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services. O’Reilly Media, 2018, ISBN: 9781491983614. [14] H. Nielsen, J. Mogul, L. M. Masinter, et al., Hypertext Transfer Protocol – HTTP/1.1, RFC 2616, Jun. 1999. DOI: 10.17487/RFC2616. [Online]. Available: https:// www.rfc-editor.org/info/rfc2616. [15] B. Burns, Designing Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services, 1st. O’Reilly Media, Inc., 2018, ISBN: 1491983647. [16] G. Pardon and C. Pautasso, Towards Distributed Atomic Transactions over RESTful Services, E. Wilde and C. Pautasso, Eds. New York, NY: Springer New York, 2011, pp. 507–524. [17] M. Little. “Rest and transactions? [accessed: Dec. 15, 2023]”. (2009). [18] N. Mihindukulasooriya, M. Esteban-Gutiérrez, and R. García-Castro, “Seven challenges for restful transaction models”, in Proceedings of the 23rd International Conference on World Wide Web, 2014, pp. 949–952. [19] O. Group., “Distributed TP: The XA Specification”, Feb. 1992. [20] A. Dey, A. Fekete, and U. Röhm, “Rest+t: Scalable transactions over http”, in 2015 IEEE International Conference on Cloud Engineering, 2015, pp. 36–41. [21] L. Maciel and C. Hirata, “A timestamp-based two phase commit protocol for web services using rest architectural style”, Journal of Web Engineering (JWE), vol. 9, pp. 266–282, Sep. 2010. [22] C.-F. Liao and P.-Y. Chen, “Rosa: Resource-oriented service management schemes for web of things in a smart home”, Sensors, vol. 17, no. 10, 2017. 描述 碩士
國立政治大學
資訊科學系
112753104資料來源 http://thesis.lib.nccu.edu.tw/record/#G0112753104 資料類型 thesis dc.contributor.advisor 廖峻鋒 zh_TW dc.contributor.advisor Liao, Chun-Feng en_US dc.contributor.author (Authors) 黃薇倫 zh_TW dc.contributor.author (Authors) Huang, Wei-Lun en_US dc.creator (作者) 黃薇倫 zh_TW dc.creator (作者) Huang, Wei-Lun en_US dc.date (日期) 2025 en_US dc.date.accessioned 3-Mar-2025 14:04:00 (UTC+8) - dc.date.available 3-Mar-2025 14:04:00 (UTC+8) - dc.date.issued (上傳時間) 3-Mar-2025 14:04:00 (UTC+8) - dc.identifier (Other Identifiers) G0112753104 en_US dc.identifier.uri (URI) https://nccur.lib.nccu.edu.tw/handle/140.119/155973 - dc.description (描述) 碩士 zh_TW dc.description (描述) 國立政治大學 zh_TW dc.description (描述) 資訊科學系 zh_TW dc.description (描述) 112753104 zh_TW dc.description.abstract (摘要) RESTful 架構風格在各種服務互動方式中日漸受歡迎。與此同時,如何支援跨多個服務的分散式交易在現今軟體系統中一直是個挑戰。此外,隨著微服務架構的興起以及將微服務託管於容器的普及,如何實現高效且可擴展的容器化 RESTful 服務交易管理機制成了必要的研究議題。本文介紹的分散式交易協定可以通透地為現有的 RESTful 服務結合容器化方式實現分散式交易。主要理念是將交易處理邏輯獨立,藉由依循邊車模式設計的容器附加到 REST 服務上。與其他針對 RESTful 服務的分散式交易機制不同,本研究提出的方法不需要修改 RESTful 服務邏輯和通訊協議。綜上所述,本研究提出了一個能以透通的方式,整合分散式交易邏輯至既存以容器為基礎的微服務的方法。此外,本文後半段也透過系統測試和實驗證明了方法的可行性並評估其效能。 zh_TW dc.description.abstract (摘要) In modern software systems, supporting transactions across multiple services presents a significant challenge. Among the various interaction approaches, the RESTful architectural style stands out as a popular choice. With the rise of microservice architecture and the growing popularity of hosting microservices in containers, the need for efficient and scalable transaction management mechanisms for containerized RESTful services has become increasingly important. This paper introduces a novel approach that transparently enhances existing non-transactional containerized RESTful services with transaction capabilities. The main idea is to implement transaction handling logic in a sidecar container, which can be attached to service containers as needed. Unlike other distributed transaction mechanisms for RESTful services, this approach eliminates the need to modify both the service logic and the communication protocol (HTTP). This research demonstrates the feasibility of the proposed method through case studies and experiments. Overall, this approach offers a seamless and efficient solution for integrating transaction management into containerized microservices. en_US dc.description.tableofcontents 第 一 章 緒論 - 1 1.1 研究背景 - 1 1.2 研究動機 - 2 1.3 研究目標 - 4 第 二 章 技術背景與相關研究 - 6 2.1 REST - 6 2.1.1 REST 架構的核心概念 - 6 2.1.2 REST 架構中的資源 (Resource) - 7 2.2 邊車模式 Sidecar Pattern - 7 2.3 容器化 Containerization - 9 2.4 交易 Transaction - 10 2.5 隔離層級 - 11 2.6 Two Phase Commit(2PC) - 12 2.7 Try-Confirm-Cancel (TCC) Protocol - 12 2.8 分散式鎖 - 14 2.8.1 Redis 的資料型別 - 15 2.8.2 Redlock 演算法 - 15 2.9 相關研究 - 16 第 三 章 系統設計 - 18 3.1 系統架構 - 18 3.2 交易模型表示式 - 19 3.3 交易協調器 Transaction Coordinator - 20 3.3.1 建立交易 - 21 3.3.2 處理實質交易 - 26 3.4 Tx Sidecar - 28 3.5 Client - 28 3.6 RESTful service - 29 第 四 章 交易協定設計 - 31 4.1 No-Transaction - 31 4.2 Transaction Succeed - 33 4.3 Transaction Canceled - 33 4.4 Transaction Failed - 36 第 五 章 系統評估 - 38 5.1 交易模型 Prototype - 39 5.1.1 Response time of Transaction Coordinator - 41 5.1.2 Transaction success ratio - 42 5.2 Isolation Fault 實驗 - 43 5.3 TPS(Transactions per second) - 44 5.3.1 不同交易間隔下各隔離層級之 TPS 比較 - 45 5.3.2 不同資源數量下各隔離層級之 TPS 比較 - 46 5.4 CPU 使用率 - 46 第 六 章 結論與未來研究 - 50 參考文獻 - 52 zh_TW dc.format.extent 2077316 bytes - dc.format.mimetype application/pdf - dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0112753104 en_US dc.subject (關鍵詞) 分散式交易 zh_TW dc.subject (關鍵詞) RESTful服務 zh_TW dc.subject (關鍵詞) 容器化 zh_TW dc.subject (關鍵詞) Distributed Transaction en_US dc.subject (關鍵詞) RESTful Service en_US dc.subject (關鍵詞) Web API en_US dc.subject (關鍵詞) Container en_US dc.title (題名) 支援容器化RESTful微服務的分散式交易機制 zh_TW dc.title (題名) Supporting Transparent Distributed Transactions among Containerized RESTful Microservices en_US dc.type (資料類型) thesis en_US dc.relation.reference (參考文獻) [1] R. Fielding and R. Taylor, “Principled design of the modern web architecture”, in Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium, 2000, pp. 407–416. [2] R. T. Fielding and R. N. Taylor, “Principled design of the modern web architecture”, vol. 2, no. 2, pp. 115–150, May 2002. [3] A. Elmagarmid, Database Transaction Models for Advanced Applications (The Morgan Kaufmann Series in Data Management Systems). Elsevier Science, 1992, ISBN: 9781558602144. [4] P. Bernstein and E. Newcomer, Principles of Transaction Processing (The Morgan Kaufmann Series in Data Management Systems). Elsevier Science, 2009. [5] A. Verma, L. Pedrosa, M. R. Korupolu, D. Oppenheimer, E. Tune, and J. Wilkes, “Large-scale cluster management at Google with Borg”, in Proceedings of the European Conference on Computer Systems (EuroSys), 2015. [6] M. Fowler and J. Lewis. “Microservices: A definition of this new architectural term”. (2014), [Online]. Available: https://martinfowler.com/articles/microservices. html. [7] E. Daraghmi, C. Zhang, and S. Yuan, “Enhancing saga pattern for distributed transactions within a microservices architecture”, Applied Sciences (Switzerland), vol. 12, no. 12, Jun. 2022, Publisher Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. [8] F. Haupt, F. Leymann, A. Scherer, and K. Vukojevic-Haupt, “A framework for the structural analysis of rest apis”, in 2017 IEEE International Conference on Software Architecture (ICSA), IEEE, 2017, pp. 55–58. [9] S. Kochman, P. T. Wojciechowski, and M. Kmieciak, “Batched transactions for restful web services”, in International Conference on Web Engineering, Springer, 2011, pp. 86–98. [10] L. Frosini, P. Pagano, L. Candela, M. Simi, and C. Bernardeschi, “Relock: A resilient two-phase locking restful transaction model”, Service Oriented Computing and Applications, vol. 15, no. 1, pp. 75–92, 2021. [11] A. Dey, A. Fekete, and U. Röhm, “Rest+t: Scalable transactions over http”, in 2015 IEEE international conference on cloud engineering, IEEE, 2015, pp. 36–41. [12] D. Krafzig, K. Banke, and D. Slama, Enterprise SOA: Service-Oriented Architecture Best Practices (The Coad Series). USA: Prentice Hall PTR, 2004. [13] B. Burns, Designing Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services. O’Reilly Media, 2018, ISBN: 9781491983614. [14] H. Nielsen, J. Mogul, L. M. Masinter, et al., Hypertext Transfer Protocol – HTTP/1.1, RFC 2616, Jun. 1999. DOI: 10.17487/RFC2616. [Online]. Available: https:// www.rfc-editor.org/info/rfc2616. [15] B. Burns, Designing Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services, 1st. O’Reilly Media, Inc., 2018, ISBN: 1491983647. [16] G. Pardon and C. Pautasso, Towards Distributed Atomic Transactions over RESTful Services, E. Wilde and C. Pautasso, Eds. New York, NY: Springer New York, 2011, pp. 507–524. [17] M. Little. “Rest and transactions? [accessed: Dec. 15, 2023]”. (2009). [18] N. Mihindukulasooriya, M. Esteban-Gutiérrez, and R. García-Castro, “Seven challenges for restful transaction models”, in Proceedings of the 23rd International Conference on World Wide Web, 2014, pp. 949–952. [19] O. Group., “Distributed TP: The XA Specification”, Feb. 1992. [20] A. Dey, A. Fekete, and U. Röhm, “Rest+t: Scalable transactions over http”, in 2015 IEEE International Conference on Cloud Engineering, 2015, pp. 36–41. [21] L. Maciel and C. Hirata, “A timestamp-based two phase commit protocol for web services using rest architectural style”, Journal of Web Engineering (JWE), vol. 9, pp. 266–282, Sep. 2010. [22] C.-F. Liao and P.-Y. Chen, “Rosa: Resource-oriented service management schemes for web of things in a smart home”, Sensors, vol. 17, no. 10, 2017. zh_TW
