home contents changes options help subscribe edit (external edit)

Timestamped Invalidation for ZEO

The ZEO cache validation process can be very expensive, particularly when combined with FileStorage which must read 16 bytes from disk to find the current serial number for an object.

The proposal is to include timestamps in ZEO invalidation messages, and store these timestamps in the ZEO client cache. When a client connects to a server, it sends its last invalidation timestamp. If possible, the server sends all the objects invalidated since that time. Otherwise, the client and server fallback to the current protocol.

The server will maintain a transient list of the last N invalidations in order to respond to client requests.

If the server crashes and restarts, the new approach is very efficient. The client will always be up-to-date or nearly up-to-date, since the server didn't do anything after it crashed. If the client crashes and restarts fairly quickly, the server will have all the invalidations in its list of the last N. If the client is away for a long time or client crashes, then server crashes, we may need to fallback to the old strategy.



subject:
  ( 11 subscribers )