在資料庫系統層面難以分析理解對於資料一致性的需求,因此在決定讀取/寫入資料時所保證的資料一致性必須由應用程式開發者根據一致性與延遲時間之間的取捨去做設定。不同類型的應用對於資料一致性的需求不同,開發者可以選擇犧牲部份的一致性來達到較快的回應時間。本篇針對應用導向分析不同服務所需的一致性需求,提供應用程式開發者根據其服務類型的特性選擇合適一致性設定的依據:根據所需滿足的一致性需求,提供一個擁有較低延遲時間的一致性設定。在實驗部分,首先觀察不同一致性強度所造成的延遲程度以及讀取和寫入之間造成的延遲時間之差別;再者模擬不同應用的workload比例以及資料傳輸特性所需的一致性以及其造成的延遲時間,並證明根據需求分析所得到之一致性設定能達到較低的延遲。
As long as data replicated, the tradeoff between consistency and latency occurs. Since understanding the consistency requirements at storage system level is not possible, choosing specific consistency policy for reading and writing data requires developers to make decisions. According to application-specific consistency requirements, application developers can choose between stronger consistency with lower performance and relaxed consistency with higher performance. In this work, we propose an approach that helps application administrators to decide which consistency policy is abided by its high-level consistency semantics with lower operation response latency. In Cassandra distributed storage system, it provides flexible and tunable consistency configuration that application administrators have different choice between strong consistency and eventual consistency for both reads and writes. The decision of consistency policy can provide a guideline for developers with varying application-specific consistency requirements. Experiments show that storage system has different ability to perform read and write operation; and the selected consistency policy achieves lower latency with satisfying quorum-based consistency requirement.