📄 ldapext-ldapv3-vlv-04.txt
字号:
INTERNET-DRAFT David Boreham, Netscape Jim Sermersheim, Novell Anoop Anantha, Microsoft Michael Armijo, Microsoftldapext Working Group 6 April, 2000 LDAP Extensions for Scrolling View Browsing of Search Results draft-ietf-ldapext-ldapv3-vlv-04.txt This document expires on 5 October 20001. Status of this MemoThis document is an Internet-Draft and is in full conformance with allprovisions of Section 10 of RFC2026. Internet-Drafts are working docu-ments of the Internet Engineering Task Force (IETF), its areas, and itsworking groups. Note that other groups may also distribute workingdocuments as Internet-Drafts.Internet-Drafts are draft documents valid for a maximum of six monthsand may be updated, replaced, or obsoleted by other documents at anytime. It is inappropriate to use Internet- Drafts as reference materialor to cite them other than as "work in progress."The list of current Internet-Drafts can be accessed athttp://www.ietf.org/ietf/1id-abstracts.txtThe list of Internet-Draft Shadow Directories can be accessed athttp://www.ietf.org/shadow.html.2. AbstractThis document describes a Virtual List View control extension for theLDAP Search operation. This control is designed to allow the "virtuallist box" feature, common in existing commercial e-mail address bookapplications, to be supported efficiently by LDAP servers. LDAP servers'inability to support this client feature is a significant impediment toLDAP replacing proprietary protocols in commercial e-mail systems.The control allows a client to specify that the server return, for agiven LDAP search with associated sort keys, a contiguous subset of thesearch result set. This subset is specified in terms of offsets into theordered list, or in terms of a greater than or equal comparison value.3. BackgroundA Virtual List is a graphical user interface technique employed whereBoreham et al [Page 1]RFC DRAFT April 2000ordered lists containing a large number of entries need to be displayed.A window containing a small number of visible list entries is drawn. Thevisible portion of the list may be relocated to different points withinthe list by means of user input. This input can be to a scroll barslider; from cursor keys; from page up/down keys; from alphanumeric keysfor "typedown". The user is given the impression that they may browsethe complete list at will, even though it may contain millions ofentries. It is the fact that the complete list contents are neverrequired at any one time that characterizes Virtual List View. Ratherthan fetch the complete list from wherever it is stored (typically fromdisk or a remote server), only that information which is required todisplay the part of the list currently in view is fetched. The subjectof this document is the interaction between client and server requiredto implement this functionality in the context of the results from asorted LDAP search request.For example, suppose an e-mail address book application displays a listview onto the list containing the names of all the holders of e-mailaccounts at a large university. The list is sorted alphabetically.While there may be tens of thousands of entries in this list, theaddress book list view displays only 20 such accounts at any one time.The list has an accompanying scroll bar and text input window for type-down. When first displayed, the list view shows the first 20 entries inthe list, and the scroll bar slider is positioned at the top of itsrange. Should the user drag the slider to the bottom of its range, thedisplayed contents of the list view should be updated to show the last20 entries in the list. Similarly, if the slider is positioned somewherein the middle of its travel, the displayed contents of the list viewshould be updated to contain the 20 entries located at that relativeposition within the complete list. Starting from any display point, ifthe user uses the cursor keys or clicks on the scroll bar to requestthat the list be scrolled up or down by one entry, the displayed con-tents should be updated to reflect this. Similarly the list should bedisplayed correctly when the user requests a page scroll up or down.Finally, when the user types characters in the type-down window, thedisplayed contents of the list should "jump" or "seek" to the appropri-ate point within the list. For example, if the user types "B", thedisplayed list could center around the first user with a name beginningwith the letter "B". When this happens, the scroll bar slider shouldalso be updated to reflect the new relative location within the list.This document defines a request control which extends the LDAP searchoperation. Always used in conjunction with the server side sortingcontrol[SSS], this allows a client to retrieve selected portions oflarge search result set in a fashion suitable for the implementation ofa virtual list view.The key words "MUST", "SHOULD", and "MAY" used in this document are toBoreham et al [Page 2]RFC DRAFT April 2000be interpreted as described in [Bradner97].4. Client-Server InteractionThe Virtual List View control extends a regular LDAP Search operationwhich must also include a server-side sorting control[SSS]. Rather thanreturning the complete set of appropriate SearchResultEntry messages,the server is instructed to return a contiguous subset of those entries,taken from the sorted result set, centered around a particular targetentry. Henceforth, in the interests of brevity, the sorted search resultset will be referred to as "the list".The sort control MAY contain any sort specification valid for theserver. The attributeType field in the first SortKeyList sequence ele-ment has special significance for "typedown".The desired target entry, and the number of entries to be returned bothbefore, and after, that target entry in the list, are determined by theclient's VirtualListViewRequest control.When the server returns the set of entries to the client, it attaches aVirtualListViewResponse control to the SearchResultDone message. Theserver returns in this control: its current estimate for the list con-tent count, the location within the list corresponding to the targetentry, and any error codes.The target entry is specified in the VirtualListViewRequest control byone of two methods. The first method is for the client to indicate thetarget entry's offset within the list. The second way is for the clientto supply an attribute assertion value. The value is compared againstthe values of the attribute specified as the primary sort key in thesort control attached to the search operation. The first sort key inthe SortKeyList is the primary sort key. The target entry is the firstentry in the list with value greater than or equal to (in the primarysort order), the presented value. The order is determined by rulesdefined in [SSS]. Selection of the target entry by this means isdesigned to implement "typedown". Note that it is possible that noentry satisfies these conditions, in which case there is no targetentry. This condition is indicated by the server returning the specialvalue contentCount + 1 in the target position field.Because the server may not have an accurate estimate of the number ofentries in the list, and to take account of cases where the list size ischanging during the time the user browses the list, and because theclient needs a way to indicate specific list targets "beginning" and"end", offsets within the list are transmitted between client and serveras ratios---offset to content count. The server sends its latest esti-mate as to the number of entries in the list (content count) to theBoreham et al [Page 3]RFC DRAFT April 2000client in every response control. The client sends its assumed valuefor the content count in every request control. The server examines thecontent count and offsets presented by the client and computes thecorresponding offsets within the list, based on its own idea of the con-tent count. Si = Sc * (Ci / Cc) Where: Si is the actual list offset used by the server Sc is the server's estimate for content count Ci is the client's submitted offset Cc is the client's submitted content count The result is rounded to the nearest integer.If the content count is stable, and the client returns to the server thecontent count most recently received, Cc = Sc and the offsets transmit-ted become the actual server list offsets.The following special cases are allowed: a client sending a contentcount of zero (Cc = 0) means "client has no idea what the content countis, server MUST use its own content count estimate in place of theclient's". An offset value of one (Ci = 1) always means that the targetis the first entry in the list. Client specifying an offset which equalsthe content count specified in the same request control (Ci = Cc) meansthat the target is the last entry in the list. Ci may only equal zerowhen Cc is also zero. This signifies the last entry in the list.Because the server always returns contentCount and targetPosition, theclient can always determine which of the returned entries is the targetentry. Where the number of entries returned is the same as the numberrequested, the client is able to identify the target by simple arith-metic. Where the number of entries returned is not the same as thenumber requested (because the requested range crosses the beginning orend of the list, or both), the client must use the target position andcontent count values returned by the server to identify the targetentry. For example, suppose that 10 entries before and 10 after the tar-get were requested, but the server returns 13 entries, a content countof 100 and a target position of 3. The client can determine that thefirst entry must be entry number 1 in the list, therefore the 13 entriesreturned are the first 13 entries in the list, and the target is thethird one.A server-generated context identifier MAY be returned to clients. Aclient receiving a context identifier SHOULD return it unchanged in asubsequent request which relates to the same list. The purpose of thisinteraction is to enhance the performance and effectiveness of serverswhich employ approximate positioning.Boreham et al [Page 4]RFC DRAFT April 20005. The ControlsSupport for the virtual list view control extension is indicated by thepresence of the OID "2.16.840.1.113730.3.4.9" in the supportedControlattribute of a server's root DSE.5.1. Request ControlThis control is included in the SearchRequest message as part of thecontrols field of the LDAPMessage, as defined in Section 4.1.12 of[LDAPv3]. The controlType is set to "2.16.840.1.113730.3.4.9". The cri-ticality SHOULD be set to TRUE. If this control is included in a Sear-chRequest message, a Server Side Sorting request control [SSS] MUST alsobe present in the message. The controlValue is an OCTET STRING whosevalue is the BER-encoding of the following SEQUENCE: VirtualListViewRequest ::= SEQUENCE { beforeCount INTEGER (0..maxInt), afterCount INTEGER (0..maxInt), CHOICE { byoffset [0] SEQUENCE { offset INTEGER (0 .. maxInt), contentCount INTEGER (0 .. maxInt) }, greaterThanOrEqual [1] AssertionValue }, contextID OCTET STRING OPTIONAL }beforeCount indicates how many entries before the target entry theclient wants the server to send. afterCount indicates the number ofentries after the target entry the client wants the server to send.offset and contentCount identify the target entry as detailed in section4. greaterThanOrEqual is an attribute assertion value defined in[LDAPv3]. If present, the value supplied in greaterThanOrEqual is usedto determine the target entry by comparison with the values of theattribute specified as the primary sort key. The first list entry who'svalue is no less than (less than or equal to when the sort order isreversed) the supplied value is the target entry. If present, the con-textID field contains the value of the most recently received contextIDfield from a VirtualListViewResponse control. The type AssertionValueand value maxInt are defined in [LDAPv3]. contextID values have novalidity outwith the connection on which they were received. That is, aclient should not submit a contextID which it received from another con-nection, a connection now closed, or a different server.5.2. Response ControlThis control is included in the SearchResultDone message as part of thecontrols field of the LDAPMessage, as defined in Section 4.1.12 ofBoreham et al [Page 5]RFC DRAFT April 2000[LDAPv3].The controlType is set to "2.16.840.1.113730.3.4.10". The criticality isFALSE (MAY be absent). The controlValue is an OCTET STRING, whose valueis the BER encoding of a value of the following SEQUENCE: VirtualListViewResponse ::= SEQUENCE { targetPosition INTEGER (0 .. maxInt), contentCount INTEGER (0 .. maxInt), virtualListViewResult ENUMERATED { success (0), operationsError (1), unwillingToPerform (53), insufficientAccessRights (50), busy (51), timeLimitExceeded (3), adminLimitExceeded (11), sortControlMissing (60), offsetRangeError (61), other (80) }, contextID OCTET STRING OPTIONAL }targetPosition gives the list offset for the target entry. contentCountgives the server's estimate of the current number of entries in thelist. Together these give sufficient information for the client toupdate a list box slider position to match the newly retrieved entriesand identify the target entry. The contentCount value returned SHOULD be
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -