From: <CZa...@wi...> - 2002-06-19 20:52:16
|
Do have an example of this? The application that I have is in Perl/CGI. It searches the LDAP server for employee info and then displays the returned data in a table format in HTML. The could be instances where the main server is unavailable and the end users will not be happy to see connection error messages in their web browsers. Thanks rgb@dirtest3.i tg.ti.com To: CZa...@wi... (Rusty Biggs) cc: per...@li... Subject: Re: LDAP server connection question 06/19/2002 03:44 PM Please respond to Russell Biggs Some of the gurus (Graham, Chris, etc.) may have a slicker way of doing this, than what I do, but my method works well for me in doing web pages where I desire fast responses (if possible). What I do is: use an array of hosts to do the 'init' against, keeping my returned objects in a hash. Hosts that can't answer the init get skipped... i.e. they don't get put into the hash. the bind operation works on the hash, and unsuccessful binds, get removed from the hash and the old ldap object get removed. queries are then put against 1 or more of the ldap objects in the hash, depending on what I want to do. When checking for DSA busy, I usually have a piece of 'delay/retry' code that gets around this, as DSA busy is not considered fatal until you continue to fail consistently. (well I don't consider it fatal :) I've found that doing it this way, gives me greater options and flexibility. example, I could use it to make modifications of the same object on two different LDAP servers. Although this is not my current use for it. My methodology also includes some fore thought on the servers in my array... I use the closest(physically) server and work my way back to the 'master'. Again, this may not work for you, but it's worked well enough for me that I wrote a module to handle the work and include it into all my web code. -- Russell Biggs (Rusty) Internet: r-...@ti... 6500 Chase Oaks Blvd, M/S 8412 Texas Instruments Plano Tx 75023 Phone: (972) 575-0826 Fax: (972) 575-4853 Home Page: http://dirtest3.itg.ti.com/~rgb Calendar: http://dirtest3.itg.ti.com/cgi-bin/synchronize.cgi?name=Russell+Biggs "I sense much NT in you... NT leads to bluescreen... Bluescreen leads to downtime... Downtime leads to suffering... NT is the path to the darkside..." ...Unknown UNIX Jedi |