Hi there,

We’re extending the use case of RADOSGW to store some lightweight metadata 
which is accessed concurrently by multiple clients. The metadata is stored as a 
RGW object in CEPH. The payload data is JSON array encoded as string. The 
following is a sample payload.
[
  {
    "id": "foo",
    "property": "pro-foo",
  },
  {
  "id": "bar",
  "property": "pro-bar",
  }
]

Each client 1) reads the payload out first, 2) makes some modification in 
memory, and then 3) writes the updated payload to CEPH.

The issue we are encoutering  here is that when there are multiple clients 
adding items concurrently to the metadata, some updates may be lost because the 
concurrent update. Apparently, we need some mechanism to implement an 
optimistic concurrency control. We’d like to have a simple solution that 
If-Match on ETag only. The API is of course compatible with S3.

Suppose we have If-Match ETag on PUT, the client mentioned above will work like 
this 1) reads the payload nd ETag out first, 2) makes some modification in 
memory, and 3) writes the updated payload to CEPH with If-Match: <ETag>, 4) If 
the operation fails, it retry from the first step.

One possible issue for this solution is on consistency between RGW 
replications. But since the current RGW replication is a 
can-write-to-master-only scheme, it seems not a real issue right now.

We are happy to enhance RGW to make it unique from AWS S3 by supporting this 
use case. And suggestion/comments from you guys are highly welcomed :-) We have 
been heading to the feature and opened a feature ticket on tracker: 
http://tracker.ceph.com/issues/8562

Thanks,
Ray
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to