koha-zebra
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-zebra] Perl Zoom Persistent Connections


From: Sebastian Hammer
Subject: Re: [Koha-zebra] Perl Zoom Persistent Connections
Date: Fri, 19 Aug 2005 16:23:09 -0400

Although as Mike points out, Z39.50 is a stateful protocol, it is often used in a non-stateful way in a web environment.

The PHP/YAZ 'persistent' connections means something a little different. Basically, it allows the webserver, when PHP is installed as a module, to keep connections open to the server between HTTP requests. This is a naive type of persistency, as the same connection may be shared among different users. However, it does potentially reduce the overheads associated with opening connections and initializing associations.. it is intended for use in applications with large numbers of transactions where it's useful to limit network traffic.. obviously, it does NOT work well if user-specific authentication is used against the server.

PHP/YAZ, in combination with the YAZ proxy, can be used to implement a more clever kind of persistency. It can actually keep user-specific sessions alive against a target, and associate each new incoming request with the right session based on a cookie. To this end, it uses an ID-specific extension to Z39.50, which is also supported by the YAZ/ZOOM (and YAZ/PHP) API.

--Sebastian

At 07:44 PM 8/19/2005 +0200, Thomas D wrote:
PHP/YAZ was not written to use Zoom.  PHP/YAZ has persistent connections.

Persistent connections are kept alive continuously and should not require
reinitialisation of a new connection for each query, nor should they time
out arbitrarily when the server determines your connection is inactive or
becomes 'tired' of serving more results.

yaz_connect() parameter options include persistent.

This seems ussefull except for the problem of closing a persistent connection.

"persistent"

"    A boolean. If TRUE the connection is persistent; If FALSE the
connection is not persistent. By default connections are persistent."

"        Note: If you open a persistent connection, you won't be able to
close it later with yaz_close()."

Yaz_connect. PHP manual. The PHP Group. 2005.
http://www.php.net/manual/en/function.yaz-connect.php .


Thomas D


Quoting Mike Taylor <address@hidden> :
> ---------------- Beginning of the original message ------------------
>
> > Date: Fri, 19 Aug 2005 17:31:07 +0200
> > From: Thomas D <address@hidden>
> >
> > Will the forthcoming Perl bindings for Zoom support
> persistent
> > Z39.50 connections?
>
> Of course -- that is the only kind of Z39.50 connection.
> Z39.50 is
> not stateless like HTTP: all communication is of the form
>
>       open a connection
>       while you're still interested {
>               send a request
>               wait for the response
>               do something with it
>       }
>
> > If there will be support for persistent connections, will
> that
> > support include a means to close those connections on
> command;
> > without killing the process from the shell, removing power
> to the
> > system or some other drastic measure [...]
>
> Yes, the $zoom->close() method will do this.
>
> > [...] as may be required for some existing Zoom bindings
> with no
> > means to close a persistent connection?
>
> There are none to my knowledge.  The ZOOM Abstract API
> mandates a
> Close method for Connection object -- see:
>       http://zoom.z3950.org/api/zoom-1.4.html#3.2.6
> and it is implemented (under the name
> ZOOM_connection_destroy()) but
> the ZOOM-C binding -- see:
>       http://indexdata.com/yaz/doc/zoom.tkl#zoom.connections
> and also by the current Perl implementation, the Net::Z3950
> module --
> see:
>       http://perl.z3950.org/docs/Z3950/Connection.html#close()
>
> I am not quite sure what your question means ...
>
>  _/|_
> ___________________________________________________________________
> /o ) \/  Mike Taylor  <address@hidden>
> http://www.miketaylor.org.uk
> )_v__/\  "No one in charge of Christianity seems to be that
> convinced
>       about the product" -- Tim Rice.
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference &
> EXPO
> September 19-22, 2005 * San Francisco, CA * Development
> Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *
> Testing & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Koha-zebra mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/koha-zebra
>
> ------------------- End of the original message ---------------------




---------------------------------------------
Protect your mails from viruses thanks to Alinto Premium services http://www.alinto.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Koha-zebra mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/koha-zebra

--
Sebastian Hammer, Index Data, www.indexdata.com
Direct phone: (603) 209-6853 Fax: (603) 357-1813





reply via email to

[Prev in Thread] Current Thread [Next in Thread]