Subject: [Netconf] Hi Andy, One question about "draft-ietf-netconf-restconf-collection-00"

From: Zhengguangying <[email-masked]>
Date: Fri, 24 Apr 2015 08:37:08 +0000

Hi Andy,

   Suppose "album"  have 10K instances matched the query conditions,

If we get 100 instances per request,  when we get the last 100 instances, the request will like this:
GET /restconf/data/example-jukebox:jukebox/
library/artist=Foo%20Fighters/album/?limit=100&offset=9900 HTTP/1.1
Host: example.com
Content-Type: application/yang.collection+json

In this scenario, the restconf Server have to query data and prepare the result, then move from the first instance to the 9900 instance, and for every get request, the restconf Agent have to do this. There will have a big performance issue for get all matched instances.

For this scenario, whether we can take another candidate solution like common http mode, the following is the suggested sample:

First request from client:

GET /restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album/?limit=100 HTTP/1.1
Host: example.com
Content-Type: application/yang.collection+json

Response from server:
HTTP/1.1 200 OK
Date: Mon, 23 Apr 2012 17:01:00 GMT
Server: example-server
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/yang.collection+xml
<collection xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"
<album xmlns="http://example.com/ns/example-jukebox">
<name>Foo Fighters</name>
<year>1995</year>
...
</album>
<album xmlns="http://example.com/ns/example-jukebox">
<name>The Color and the Shape</name>
<year>1997</year>
...
</album>
<atom:link href="http:// example.com:443/restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album/?limit=100&marker=11111111" rel="next"/>
</collection>

The mid request from client: use the link which server responsed.

GET /restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album/?limit=100&marker=11111111" HTTP/1.1
Host: example.com
Content-Type: application/yang.collection+json

By this solution, the restconf server can give one marker which he think he can do query from that instance, by this method, the server's performance may improve more for this scenario.

Please share your opinion about this question, thanks.

________________________________
Regards&Thanks
Walker Zheng