+1 to 1) and 2) under the Pipe creation but also 3) , because if one has a custom impl for a pipe , he probably needs it for each read<div><br></div><div>Okay for PipeConfig.updateParameterProvider() but he should also be able to pass anytime through the read() to reconfigure , no ? doesn't hurt to have many options to reconfigure IMO</div>
<div><br></div><div>Just a last remark on the "locations" name : metadataLocation and pagingLocation are not enough clear to me to see what's coming in and out, as suggested on IRC : metadataLocationResponse and metadataLocationRequest ? </div>
<div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Jan 18, 2013 at 3:38 PM, Matthias Wessendorf <span dir="ltr"><<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looking at [1]<br>
<br>
<br>
There is ONE detail left...<br>
<br>
The paging "config" contains the following settings:<br>
1) locations:<br>
- metadataLocation<br>
- pagingLocation<br>
2) param provider:<br>
- my custom impl (like in <a href="https://gist.github.com/4564403#comment-732025" target="_blank">https://gist.github.com/4564403#comment-732025</a>)<br>
OR<br>
- default (limit + offset)<br>
3) web linking:<br>
- nextIdentifier<br>
- previousIdentifier<br>
<br>
<br>
Now... where to put these options? On the pipe, or on the actual<br>
"paging read" (e.g. readWithFilter....).<br>
<br>
I can see that 1) and 3) are nice on the umbrella Pipe<br>
definiton/creation. I can also see that it's OK to "install" a "param<br>
provider" on the pipe as well...<br>
<br>
If the "params" changes (for whatever reason), there could be a<br>
"PipeConfig.updateParameterProvider()" hook....<br>
<br>
I also think..... the parameter provider can be defined on the actual<br>
read (get request)....<br>
<br>
thoughts?<br>
<br>
-M<br>
<br>
[1] <a href="https://github.com/aerogear/aerogear.org/blob/client_paging_spec/docs/specs/abstract_aerogear-client-paging.markdown" target="_blank">https://github.com/aerogear/aerogear.org/blob/client_paging_spec/docs/specs/abstract_aerogear-client-paging.markdown</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On Fri, Jan 18, 2013 at 2:53 PM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>> wrote:<br>
> solved... updating the spec<br>
><br>
> On Fri, Jan 18, 2013 at 1:40 PM, Kris Borchers <<a href="mailto:kris@redhat.com">kris@redhat.com</a>> wrote:<br>
>><br>
>> On Jan 18, 2013, at 2:25 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>> wrote:<br>
>><br>
>>> On Fri, Jan 18, 2013 at 6:33 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>> wrote:<br>
>>>>> My suggestion is to name these two parameters something more generic like locator/count where locator=page/offset and count=limit/perPage. Then in our configs we would provide these options:<br>
>>>>><br>
>>>>> pagingType {String} - determines the paging method to be used in calculating next page, etc. and could be either "offset" or "page", default "offset"<br>
>>>>> locatorParam {String} - locator parameter name, default "offset"<br>
>>>>> locatorValue {Number} - page index or offset<br>
>>>>> locatorIdentifier {String} - the locator identifier name, default "AG-Paging-Offset"<br>
>>>>> countParam {String} - count parameter name, default "limit"<br>
>>>>> countValue {Number} - items per page<br>
>>>>> countIdentifier {String} - the count identifier name, default "AG-Paging-Limit"<br>
>>>>><br>
>>>>> Thoughts?<br>
>>><br>
>>><br>
>>> OK.... I agree that you raised a valid concern, regarding that the<br>
>>> client needs to indicate whether paging information is sent as<br>
>>> headers, as query parameters, or as body data.<br>
>>><br>
>>><br>
>>> But I still am not so sure if the above args are all really needed, a<br>
>>> ton of cfg params make it a bit fishy.<br>
>>> How about, using the following as a default "parameter provider"<br>
>>> - offset (which sets the offset of the first element that should be<br>
>>> included in the returned collection)<br>
>>> - limit (the number of results that should be listed on a page)<br>
>>><br>
>>> OK.<br>
>>><br>
>>> Now if a user wants/needs to provide a different parameter schema<br>
>>> (imagine his/her lame server requires/supports "page", "perPage" and<br>
>>> "sorting"):<br>
>>> The developer could just create a custom impl (iOS: block, Java:<br>
>>> anonymus class impl of an interface, JS: callback function) and pass<br>
>>> it to the "paging request".<br>
>>><br>
>>> that way the dev. could even add a ton of more params (if the lame<br>
>>> backend requires that).<br>
>>><br>
>>> since the pipe (or the paging request) knows whether the paging<br>
>>> information is sent as headers, as query parameters, or as body data,<br>
>>> it would just "serialize" the give "param provider" into the actual<br>
>>> location.<br>
>><br>
>> This is the part I don't understand so sorry if I'm the only one being dense here. I believe that is basically what we decided to do yesterday, but, without that initial config, how do I make the initial request for the first page? Since the callback that the dev would provide isn't triggered until a successful read so that it can "build" the next/prev methods based on the response, how do I make that first request?<br>
>><br>
>>><br>
>>> Any thoughts?<br>
>>><br>
>>> -M<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>>><br>
>>>> Any news on this ?<br>
>>>><br>
>>>> -Matthias<br>
>>>><br>
>>>>><br>
>>>>> On Jan 17, 2013, at 12:23 PM, Summers Pittman <<a href="mailto:supittma@redhat.com">supittma@redhat.com</a>> wrote:<br>
>>>>><br>
>>>>>> On 01/17/2013 11:37 AM, Matthias Wessendorf wrote:<br>
>>>>>>> Hi,<br>
>>>>>>><br>
>>>>>>> based on today's IRC and mailing list discussions, I have polished the<br>
>>>>>>> client side paging spec:<br>
>>>>>>><br>
>>>>>>> <a href="https://github.com/aerogear/aerogear.org/blob/client_paging_spec/docs/specs/abstract_aerogear-client-paging.markdown" target="_blank">https://github.com/aerogear/aerogear.org/blob/client_paging_spec/docs/specs/abstract_aerogear-client-paging.markdown</a><br>
>>>>>>><br>
>>>>>>> Please review the document!<br>
>>>>>>><br>
>>>>>>> Cheers!<br>
>>>>>>> Matthias<br>
>>>>>>><br>
>>>>>> +1, let's see how it works in actual implementation!<br>
>>>>>> _______________________________________________<br>
>>>>>> aerogear-dev mailing list<br>
>>>>>> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>>>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> aerogear-dev mailing list<br>
>>>>> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Matthias Wessendorf<br>
>>>><br>
>>>> blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
>>>> sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
>>>> twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Matthias Wessendorf<br>
>>><br>
>>> blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
>>> sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
>>> twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
>>> _______________________________________________<br>
>>> aerogear-dev mailing list<br>
>>> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> aerogear-dev mailing list<br>
>> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
><br>
><br>
><br>
> --<br>
> Matthias Wessendorf<br>
><br>
> blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
> sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
> twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
<br>
<br>
<br>
--<br>
Matthias Wessendorf<br>
<br>
blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>