Memcached StorageService
Cantor, Scott
cantor.2 at osu.edu
Mon Sep 29 13:02:22 EDT 2014
On 9/29/14, 11:41 AM, "Marvin Addison" <marvin.addison at gmail.com> wrote:
>
>Ideally, StorageRecord#version would be a long to support #1.
That's immaterial to me, we can make it a long.
>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.
It does, but it wouldn't support the SP's session cache, and that tells me
that it would be a dangerous thing to assume that it's never going to
matter. It's a transactional API, to hide the need to do that exact thing,
a read after an update. It's designed for transactional stores, and pushes
the burden of implementing non-transactional stores on the implementations
of those stores rather than the caller.
One option would be to require that the versions be monotonically
increasing, so that if you call updateWithVersion(), a success guarantees
that the input version is now version + 1. Right now, that's not
technically required, it allows version to be opaque, although in practice
it's probably not.
I'm not as concerned about update() because unlike with the SP that's a
separate call and would reasonably mean you probably don't care about the
version.
-- Scott
More information about the dev
mailing list