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

RE: patch to back-perl

Sounds good to me. It would be nice if you also included a patch for the
SampleLDAP.pm to go along with this set of changes.

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

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Eric Stokes
> Sent: Wednesday, March 26, 2003 2:28 PM
> To: openldap-devel@OpenLDAP.org
> Subject: patch to back-perl
> Hi all, I have added some functionality to back-perl, and I
> thought its
> about time I sent you the patch. It does two things
> - Passes the numeric connection id along to all operational methods
> (bind, search, etc) of the perl backend. This makes back-perl
> much more
> useful because it can maintian connection state, and deal with
> authenticated connections. The connection id now comes as the first
> argument after the object reference in all the operational methods.
> - Changes the way searches are dealt with so they can be done
> asyncronisly.
> the current api for searches is
> search ($self, $connid, $base, $scope, $alias_pol, $s_limit,
> $t_limit,
> $filter, $attronly, @attrs)
> where this method returnes an array of entries found along with the
> return code
> the one I propose is
> search ($self, $connid, $base, $scope, $alias_pol, $s_limit,
> $t_limit,
> $filter, $attronly, @attrs)
> where this returnes nothing
> search_done($self)
> where this returnes 1 if there are no more entries and 0 if there are
> search_get_next($self)
> This returnes the next entry (only one)
> search_get_returncode($self)
> This is called only after search_done returns 1, it returns
> the return code.
> the basic calling structure is (note this is not the actual code, its
> JUST a model)
> while(! obj->search_done) {
>     send_search_entry(str2entry(obj->search_get_next)))
> }
> send_ldap_result(obj->search_get_returncode)
> Note: this obviously changes the API for searches in a big way (and
> everything else in a small way), that's one of the reasons I've been
> sitting on it for many months not saying anything :-)
> The performance gain from doing it this way is quite large for big
> searches. I implimented this because I'm using a perl back-end for an
> ldap proxying solution (which unfortunatly has to do more
> than back-meta
> can do), and we needed to be able to throw large searches at
> it. Anyway,
> if you like it, good, if you hate it, flame :-P
> Eric Stokes
> eric.stokes@csun.edu