On Sat, May 14, 2011 at 08:02:04AM -0700, Pedro Teixeira wrote:
>
> I'm still struggling to pass all tests for a custom ActiveRecord
> storage.
> 
> Noticed that there is a small difference in the delete method in the
> implementations:
> 
> https://github.com/jmettraux/ruote-dm/blob/master/lib/ruote/dm/storage.rb#L173
> https://github.com/jmettraux/ruote-sequel/blob/master/lib/ruote/sequel/storage.rb#L314
> 
> Each doc has just on rev, right? so it'd be ok to wipe all by ide and
> typ?

Hello,

thanks for pointing to that. The sequel implementation seems the right one.

I'm still struggling to bring back to the green the CI for ruote 
(http://ruote-ci.s3.amazonaws.com/ci.html) I had to spend almost 2 months 
without CI and I'm now paying the price.

> Looking at the put logic:
> nrev = doc['_rev'].to_i + 1
> 
> does not seem safe [concurrency]. Shouldn't we increment this on the
> DB side? or am I missing something?

If there is a possibility to have such an incrementation provided by the 
middleman (ActiveRecord, DataMapper, Sequel), it'd be interesting to explore.

I'm pushing hard for all the storage (when possible) to be concurrency-safe. 
That's the main requirement for them and why there is all this "nil when 
successful, the current version if yours is obsolete, true if your version is 
obsolete and the document is deleted anyway" (the replies to put/delete).

Sorry, I still have to write this document

  http://ruote.rubyforge.org/implementing_a_storage.html

maybe after it's complete you'll have a clearer idea.

Once again, concurrency is central to storage implementations. Those storages 
would be easy to implement if it were not.


Best regards,

-- 
John Mettraux - http://jmettraux.wordpress.com

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to