On Wed, Jul 1, 2009 at 7:28 PM, Gonzalo<[email protected]> wrote:
>
> I wonder how ruote-rest would handle several clients trying to PUT on
> the same workitem. Is it possible that "wi.replace_fields
> (owi.attributes)" method could be executed by several threads at the
> same time and then corrupt the payload.
>
> I run a curl script in which a big amount of threads PUT on the same
> workitem, each of them updating their own set of attributes. Nothing
> seems to break and after all threads had PUT, the payload holds a
> coherent set of attributes.
>
> Does it have something to do with the fact that Mongrel is a single-
> threaded application? I did this test with ruote-rest running on
> GlassfishV3 and I got no errors either. Glassfish is multi-threaded
> but I suspect it only starts one jruby interpreter instance so it may
> behave as single-threaded Mongrel.

Hello Gonzalo,

I guess the last PUT wins.

Each request is treated individually and result in one UPDATE in the
database. The last UPDATE wins.

Database tech has been around for a while and is meant to not mess
with your data.


Sorry for not being more helpful. Somehow we use those technologies
all day and we accept their "magic" without thinking too much...


Cheers,

-- 
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