Wishlist for Zephyr CloudStore API

8 views
Skip to first unread message

Markus Sabadello

unread,
May 18, 2013, 8:19:43 AM5/18/13
to xd...@googlegroups.com, Joe Johnston, Andrei Soroker, Peter Hizalev
We have integrated the Zephyr CloudStore as a back-end for the XDI2 server, and we successfully used this for the Personal Clouds demo at IIW.

During the last few days I spent more time on optimizing this integration component to the point where I think it's pretty satisfying for now (although further improvements are possible).
One improvement that is in place now is a cache in the XDI2 server. It reduces the number of HTTP round trips to the CloudStore layer that are required to execute basic operations on the XDI layer.
Another lessons is that the new XDI $set operation is to be favored over the older $add and $mod operations.

There is a testing tool that shows how XDI operations translate to CloudStore API operations:

For potential further optimization, I am trying to formulate a wishlist of changes to the CloudStore API which would reduce the number of HTTP round trips even more.
The items in this list are roughly ordered by priority.

1. Create parent nodes in the tree automatically.
------------------------------------------

If I do a PUT on /a/b/c, then CloudStore does not create /a and /b, so I have to create them "manually" with more PUTs.
It would be great if CloudStore could automatically create /a and /b with empty JSON objects as the value, if /a and /b don't exist yet.

2. Merge JSON arrays.
------------------------------------------

CloudStore has the ability to merge an incoming JSON object into an already existing JSON object.
This is very useful. Maybe something similar could be done for JSON arrays as well.

Let's say that at /=les I have the following JSON object with a JSON array as one of the values: { "+friend":["=markus"] }
And now I want to add "=joseph" to the array.
Currently, I have to do a GET first, and then PUT the ["=markus", "=joseph" ] array back into the CloudStore.
Perhaps it would be possible to have the option to automatically insert the new item to the existing JSON array.
However, I also have to be able to remove "=joseph" again.
Currently, just like before, I have to do a GET first, followed by a PUT with the updated array.
Maybe this could also somehow be done automatically by CloudStore.

The difference between this behavior and the currently existing JSON object merging feature is of course that the latter works at the top level of the JSON structure, whereas the former goes one level down.

3. REPLACE
------------------------------------------

Same as DELETE and PUT.
Currently not implemented.
Could be useful in certain situations.
4. Retrieve immediate child nodes
------------------------------------------

Currently, I have the option to either retrieve /a or /a/*.
The first URL gives me just the JSON object at /a, while the second URL gives me everything underneath it.
Maybe there could also be a way to just retrieve the list of immediate child nodes (without their JSON objects).

Markus

Reply all
Reply to author
Forward
0 new messages