透過您的圖書館登入
IP:3.141.35.60
  • 學位論文

Event Sourcing與CQRS架構下的服務穩定機制

Improving Service Stability for Event Sourcing and CQRS Architecture

指導教授 : 廖峻鋒

摘要


隨著雲端運算的興起,分散式系統的重要性逐漸受到重視,大量複雜的系統與服務逐漸成為企業的常態。而容器技術的普及,又為新一波軟體部署與管理方式帶來了前所未有的革命,其中以Docker和Kubernetes 等平台的出現,讓微服務的設計概念得以落實。微服務的設計思維不僅能夠降低系統中服務與服務之間的耦合性,也能夠達成跨程式語言的開發模式。傳統資料存取模式(增刪修改),在面對大量使用者同時寫入的情況下,經常造成單一失效及效能問題。使用命令與查詢責任分離模式 (CQRS, Command Query Responsibility Segregation) 與事件溯源 (ES, Event Sourcing)架構,由軟體層面增加了系統的可擴張性,然而這些機制在基礎設施層面上目前仍欠缺完整的錯誤偵測與回復功能,且面對複數使用者同時對資料庫進行改寫時,亦會遇到一致性的問題。本論文採用CQRS/Event Sourcing架構的系統,設計一個完整且自主的錯誤偵測與回復機制,亦可處理並行讀寫的問題,並透過實作與數據分析驗證此設計機制的可行性。

並列摘要


As the Cloud computing raise rapidly, distributed system gradually attach great importance to a lot of software engineers around the world. Having a great range of complex business’s logic system and services become enterprise’s new normal condition. With the universal of container technology, the new wave of unprecedented revolution has spread into all kinds of software deployments and software managements. The appearance of Kubernetes and Docker platforms makes Microservice pattern have the chance to implement in enterprise’s business system. The design concept of Microservice pattern not only can reduce the coupling between service and service but also can allow user to develop system in multi-platform environment. In the traditional method for data access(CRUD), when a lot of users’ update data simultaneously, this will often cause single failure and low performance. Using Command Query Responsibility Segregation(CQRS) and Event Sourcing can enhance the scalability of system in software level. However, these mechanisms in infrastructure aspect still lack of complete failure detection and failure recovery. Additionally, when facing a huge amount of users update the database at the same time, will also encounter consistency problem. This essay will adopt the pattern of CQRS/Event Sourcing Architecture to design a complete failure detection and automatic failure recovery, this also can solve the problem of data access in parallel. We verify the availability of this system through implementation and data analysis.

參考文獻


[1] C. Richardson, Microservices Patterns
With examples in Java. Published 2017 by Manning Publications, October 2018.
[2] M. T. Nygard, Release It!: Design and Deploy Production-Ready Software. Pragmatic Bookshelf, 2018.
[3] Z. Long, "Improvement and implementation of a high performance CQRS architecture," in 2017 International Conference on Robots & Intelligent System (ICRIS), 2017: IEEE, pp. 170-173.
[4] B. Meyer, Object-oriented software construction. 1997.

延伸閱讀