Memcached StorageService

Marvin Addison marvin.addison at gmail.com
Mon Sep 29 11:41:57 EDT 2014


I'm well into a MemcachedStorageService and have all of the design
issues covered except versioning. I _really_ want to leverage the
check-and-set (cas) feature [1] that is designed for this purpose.
Unfortunately there are two problems:

1. The cas_unique value is a 64-bit long integer.
2. There's no way to return the updated value without performing an
additional read.

Ideally, StorageRecord#version would be a long to support #1. As for
#2, I don't really see any value in returning the updated version in
the update methods. It seems sufficient to return boolean, which would
support the current usage in StorageBackedIdPSession.

I realize it's very late in the game for any API changes, but the
changes seem reasonable enough to bring up for discussion.

Thanks,
Marvin

[1] https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L130


More information about the dev mailing list