On Tue, Jul 24, 2012 at 1:23 AM, Mark Hahn <[email protected]> wrote:
> How would you deal with this situation?

I see a few possible solutions, but none is really satisfactory :

* If you are 100% sure that you will never update/delete any doc, you
could include the db's update_seq in a document. However, there is no
mean to modify a doc on server upon POST/PUTing it. So it would
require two calls, and you are not guaranteed that someone else is not
modifying the db at the same moment

* You could do the same with db's size, but you will have the same
problem of atomicity

* You could use `algorithm=utc_random` for generating uuids, which
would give you sequential uuids. However, this setting is server-wide,
not database-wide.

All in all, I don't see a solution that wouldn't involve a 2-step
POST/PUT. Unless there is some way to modify a doc server-side when
you add it to the store, which could be really handy.
-- 
Matthieu RAKOTOJAONA

Reply via email to