[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Plea for Server Side Sorting



Christopher Hicks wrote:

On Fri, 1 Apr 2005, Kurt D. Zeilenga wrote:

At 09:49 AM 4/1/2005, Armbrust, Daniel C. wrote:

Just making the point that sorting results isn't a limitation of LDAP design in general


Your are arguably incorrect in this point. LDAP is designed
as an access protocol to a distributed directory service, and
that limits the kinds of capabilities the service can reasonably
be expected to offer.


So the question boils down to: does it seem reasonable for a directory service to sort results. Its hard to imagine a corporate directory in the real world that /isn't/ sorted, so for the computer equivalent to be designed in a way that doesn't allow for sorting would seem to be poorly modeled.

In terms of considering LDAP as special-purpose database, there aren't many databases that don't provide some sort facility. SQL does. The UNIX command line does. Mainframes and Minis with the many wacky variations on ISAM do.

In terms of IS system design and putting functionality in the most logical place, we can have hundreds of different clients sort results or have the server sort results. It seems quite clear that having the server sort results puts the code in the fewest places, which naturally leads to fewer bugs, is better for programmer's mental health everywhere, and so on.

So in considering this from three different perspectives it seems not only reasonable, but self-evident that LDAP should allow for sorting.

It is self-evident that LDAP clients should allow for sorting. Sorting is a function of the user interface, not of the underlying data store. The Unix command shells sort filenames as a matter of convention, but they are not stored in sorted order by the underlying filesystem. In terms of IS system design using a distributed data store, the most logical place for a function is where it is needed, and that may not coincide with where the data is stored.


Adding such a feature into the server violates one of the key principles of distributed system design - it cannot scale well as the number of clients increases. If you have hundreds of different clients making requests for sorting the server will quickly become overwhelmed and then none of the clients will get any service. Your request is as reasonable as asking that an NFS server return sorted directory listings to all of its filesystem clients. It doesn't happen. You may think it's happening because your command shell gives you a nicely sorted display, but that viewpoint only arises from a lack of understanding of the actual system architecture.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support