couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <>
Subject Write/Read/Notification synchronization
Date Sun, 30 Nov 2008 00:25:33 GMT

I'm building a caching system for computed joins. I have an external  
cache process that listens for notifications and uses the notification  
to clear a cache. The external cache process responds to queries and  
repopulates the cache on receipt of a query.

I'm wondering what the intended synchronization is between the  
notification and subsequent queries. My concern is that I might get a  
notification, clear the cache, and simultaneously get a query which  
repopulates the cache, but the cache doesn't see the committed data  
that triggered the update, and hence repopulates with obsolete data.  
Is there any serialization guarantee for the notification/read cycle  
i.e. once I receive a notification will all subsequent reads see the  
updated data? What if I do the read in the notification process? I'm  
hoping that notifications are all post-write, and synchronized with  
the query response machinery.

I can check the source, but I want to know what the architects'  
intention is, and whether there is any intended guarantee.

Antony Blakey
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

I contend that we are both atheists. I just believe in one fewer god  
than you do. When you understand why you dismiss all the other  
possible gods, you will understand why I dismiss yours.
   --Stephen F Roberts

View raw message