Foundationপ্রথম নীতি থেকে
LEVEL 9 · Distributed Systems

Causal Consistency

কজুয়াল কনসিস্টেন্সি

Causally সম্পর্কিত write সবাই একই ক্রমে দেখবে; unrelated write-এর ক্রমে ভিন্নমত চলবে।

A: post("প্রশ্ন") ──► B: post("উত্তর")
পাঠক C-এর কাছে: উত্তর-আগে-প্রশ্ন-পরে = violation
দুই unrelated post-এর order ভিন্ন হওয়া = বৈধ
  • Sequential consistency-র চেয়ে শিথিল (unrelated op free), linearizability- র চেয়ে অনেক সস্তা — real-time clock লাগে না
  • Natural fit: comment-reply thread, wiki edit chain, shopping cart merge — যেখানে causality-ই আসল, global order নয়
  • Implementation vector clock-ভিত্তিক (COPS, Cassandra-র light-weight transaction নয়); eventual consistency-র উপরে causal layer হিসেবে বিক্রি হয়