[occi-wg] Preliminary JSON rendering draft, discussion material

Ralf Nyren ralf at nyren.net
Thu Jan 19 06:15:50 EST 2012


Nice summary Florian! Just one comment on the pagination issue, see below.

On Thu, 19 Jan 2012 10:53:04 +0000, <florian.feldhaus at tu-dortmund.de>
wrote:
>>The pagination of GET requests may also prove to be problematic, as
>>resources may be deleted between successive GET requests. As mentioned
>>above, I would prefer to have the OCCI server return ALL OCCI-Locations
>>for a GET request and then let the client do additional GET requests for
>>each resource.
> 
> We couldn't touch this subject properly in the call. From my point of
> view, paginating requests is not a good idea, as we break the
non-stateful
> REST concept. We might consider the HTTP header field range to achieve
> this behaviour. In general, I would prefer not to have pagination due to
> the problem that it may be possible to add or remove entities from the
> list between two consecutive requests with pagination.

I still believe we need pagination, client needs a way to avoid getting
drowned in large collection responses.

Pagination is not a problem if the server does not guarantee that "page 2"
is based on the exact same collection as "page 1".

We simply say that in requesting collection items 10-20 you get those item
based on the collection at the time of the request.

Example:
 - Client request items 1-10
 - A new item is added as "number 2" in the collection (based on the
sorting rules chosen by the server implementation)
 - Client requests items 11-20. The client will see item "10" again but as
number 11 in the list this time.

This should be easy enough to implement on the server side and this kind
of pagination is better than none at all.

What do you think?

/Ralf


More information about the occi-wg mailing list