Le 05/07/15 01:47, Zheng, Kai a écrit :
>>> I do think that the cursor implementation should be responsible for the 
>>> sorting of data, same thing for the paged search (or to implement it if the 
>>> backend does not).
> Again, the problem is, if no consistent behavior among the backends, how 
> client would benefit? For example, some backend sort the results, but others 
> don't, then how client know that, regarding the results sorted or not? 

The client should *always* get the result sorted. That means teh default
cursor implem should sort the result.
>
>>> Here is what I suggest : get the cursor used, no matter what ...
> I'm afraid it's not easy to have a good, well discussed cursor or iterator 
> interface design as you might think. Going this way would need much longer 
> time. 
No, not at all. The basic operation is just to fetch all the elements,
sort them, and wrap a cursor around it. There is plenty of existing
samples in ApacheDS you can copy. I evaluate the work to around half a
day, one day with tests.


> The most simple ==List<String> getIdentities()== would be good enough for the 
> initial version, since it's only for internal use and we won't be so lucky to 
> hit huge amounts of principals to store in the backend so soon ..., we can 
> release often after the initial one, right?

Right, but don't miss an oportunity to at least define teh API rigth
from day one, even if the underlaying implementation sucks.


Ok, at this point, I would say it's your call. I just expressed my
opinion, but I don't want to twist your arm, as the getIdentities()
method is implemented in many classes. There is not only one way to
catch a bird :-)

Thanks Kai !

Reply via email to