Re: Do we need transaction support in LDP?

Hi,

On Fri, May 10, 2013 at 2:22 AM, Wilde, Erik <Erik.Wilde@emc.com> wrote:

> hello ashok.
>
> On 2013-05-09 14:46 , "Ashok Malhotra" <ashok.malhotra@oracle.com> wrote:
> >I think you are saying that you do all updates on the client and then
> >send to server as a single
> >bundle.  Yes, that would work but I don't know how to bundle a bunch of
> >PUTs, POSTs and
> >DELETEs into a single interaction.
>
> that's not what you would do in a RESTful design. in REST, you would
> design a representation that would be able to capture all the things you
> want to do, and then you would just POST this representation. this would
> be the scenario where you design the state that you want to be able to
> transfer from the client to the server in one interaction.
>

I think is easier to think in a typical example like shopping example but
if the transactions are carried out against resources distributed in
multiple servers etc. designing it as one interaction can be tricky.
To achieve this we need the ability to do non-permanent operations (try)
and if something goes wrong revert the operations or make them permanent
(confirm). For example, if we want to delete three resources in three
different servers in a transaction, and if I could delete the first too and
couldn't delete the third for whatever reason, I should be able to go back
to the first two servers and tell them to revert the deletion. Cesare
Pautasso explains this quite well [1]. If we include this to the LDP or if
the servers provide their own mechanisms to do reverts is another question.

Best Regards,
Nandana

[1] -
http://www.slideshare.net/cesare.pautasso/atomic-transactions-for-the-rest-of-us/18

Received on Friday, 10 May 2013 06:40:46 UTC