OK, I think I understand what you are saying.
Let's try to do an example in the field of graph (after all that's why were
here :)

neo4j is generic graph database. One of the interesting usage of graph is to
give meaning to a node by the relations it has, like the category and
product 
sample<http://blog.neo4j.org/2010/03/modeling-categories-in-graph-database.html>
.
In that case when I want to add new product I need to do 2 things:

   1. Create new node with the name of the product
   2. Create new link of type PRODUCT from the category to the new node

How will you go about implement such change using REST interface?

Another example in the same area is suppose I want to change 2 links, say
change a category from been sub-category to another sub-category and let's
say it involve delete one link and create another.

I'm trying to see if there is a generic way to implement such things of
changing multiple resources in generic manager in REST or is it simply to
application (or service) specific.

Thank you,
Ido

On Thu, Dec 30, 2010 at 6:14 PM, Jim Webber <[email protected]> wrote:

> Hi Ido,
>
> [off topic for folks who are just interested in graphs, here be REST
> things]
>
> > My question is Should I have a generic Transaction resource to allow
> atomic
> > changes to any resource in my service which represent data?
>
> No, I don't think so (unless you mean a transaction in the commercial
> sense).
>
> Instead I still think I should be able to interact with a "Transfer"
> resource which under the covers might (or might not) need some kind of
> coordination (similar to 2pc).
>
> If you want to go with that then I suggest both services simple broadcast
> the activities they considered completed (e.g. using an atom feed of
> events). This is a superior solution to that initially suggested by the
> (flawed IMHO) REST-* people.
>
> However I really think that hypermedia wins out here. Instead of a
> distributed 2 phase transaction, why not do this instead:
>
> 1. Client knows the source and destination account URIs
> 2. Client PUTs a transfer representation to a transfer resource related to
> the source account, that representation contains the URI of the destination
> account resource
> 3. The source account service now does a "single-phase" PUT to the
> destination resource.
>
> Any transactions are now under the covers, bounded by a single, repeatable,
> idempotent PUT.
>
> Sweet.
>
> Jim
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to