transactional caching of application data using recent
play

Transactional Caching of Application Data using Recent Snapshots - PowerPoint PPT Presentation

Transactional Caching of Application Data using Recent Snapshots Dan R. K. Ports Austin T. Clements Irene Y. Zhang Samuel Madden Barbara Liskov MIT CSAIL How to improve performance of DB-driven web site? Distributed in-memory caching ( e.g.


  1. Transactional Caching of Application Data using Recent Snapshots Dan R. K. Ports Austin T. Clements Irene Y. Zhang Samuel Madden Barbara Liskov MIT CSAIL

  2. How to improve performance of DB-driven web site? Distributed in-memory caching ( e.g. memcached)

  3. Distributed In-Memory Caching Database Application

  4. Distributed In-Memory Caching Cache Database Application

  5. Distributed In-Memory Caching Cache Database • in-memory DHT; very lightweight • stores application objects (not part of DB) Application

  6. Databases work hard to provide transactional consistency. Existing application caches violate these guarantees!

  7. Consistency Properties usual goal: freshness: cache is up-to-date with database our goal: consistency: all accesses to cache and database in a transaction see the same snapshot Can’t guarantee both without blocking!

  8. Consistency Properties usual goal: freshness: cache is up-to-date with database our goal: consistency: all accesses to cache and database in a transaction see the same snapshot Can’t guarantee both without blocking!

  9. Embracing Staleness Run r/o transactions on previous snapshots – avoids blocking – improves cache utilization Safe: stale data is already everywhere! Allow application control over staleness

  10. TxCache Anatomy Cache Database TxCache Library Application

  11. TxCache Anatomy K1 K2 • Cache is a versioned DHT, time tagged by validity interval Cache Database TxCache Library Application

  12. TxCache Anatomy SELECT * FROM users… [...result...] • Cache is a versioned DHT, VALID FROM tagged by validity interval t=50 TO t=53 Cache Database • Database returns validity interval with each query TxCache Library Application

  13. TxCache Anatomy • Cache is a versioned DHT, tagged by validity interval Cache Database • Database returns validity interval with each query • Library assigns timestamp to each transaction TxCache Library • Uses timestamp to request data from cache & DB Application

Recommend


More recommend