[Net-z3950] User-Information-Field in SimpleServer?

Ben Soares ben.soares at ed.ac.uk
Fri Mar 11 13:49:24 CET 2005


Seb, Mike, list,

On Fri, 11 March, 2005 12:11, Mike Taylor wrote:
> > Date: Thu, 10 Mar 2005 17:21:32 +0000
> > From: Ben Soares <ben.soares at ed.ac.uk>
> >
> > Just wondering if there's an easy way to add anything to the
> > User-Information-Field in an INIT response in
> > Net::Z3950::SimpleServer, or will I have to wait for
> > Net::Z3950::SlightlyMoreComplexServer? ;)
>
> There is reason in principle why SimpleServer shouldn't do this.

I'm guessing you missed a word out there..?!

> > My aim is to provide an MOTD and a dblist available to an
> > authenticated user (the list will vary quite a lot depending on who
> > logs in) and I was thinking of using the OCLC-UserInformation
> > construct.  Any other methods would be considered too.  I've already
> > done a rudimentary IR-Explain---1 db which only provides records for
> > the dbs available to the logged on user.
>
> Seb is right that ZeeRex is a better solution to the problem you're
> trying to solve here.

This is welcome advice -- I've already done most of the work for a ZeeRex db 
on the server so I'll probably stick with that.  Is there a way of adding 
an MOTD through ZeeRex though?

One thing I like about adding something to the UserInformationField is that 
it pops up (well, stdouts) in yaz-client as soon as you connect, rather 
than having to search the IR-Explain---1 db first (yup, I'm a lazy 
developer).

> But if, for some reason, you really want to 
> return an OCLC-UserInformation packet in your Init response, then the
> main missing piece that you'll need is code in SimpleServer to
> generate the necessary C data-structures for BER encoding from broadly
> equivalent Perl structures.

Okay, I was thinking I could create the BER encoded OCLC-UserInformation 
thing using either the Convert::ASN1 or Convert::BER CPAN modules and add 
them to something in the $hash used in the Init handler.

> If you go ahead and write that code, we would appreciate it being
> contributed back into the master source; if you want it but can't see
> how to write it, get in touch with us offline and we'll give you a
> quote.

If I get some time to have a look at this and do anything useful I will 
certainly let you know.

Thanks!

Ben
-- 
Ben Soares                              	   tel:	+44 (0)131-651 1238
EDINA, Edinburgh University Data Library	   fax:	+44 (0)131-650 3308
Main Library Building, George Square    	 email:	ben.soares at ed.ac.uk
Edinburgh EH8 9LJ, Scotland, UK         	   www:	http://edina.ac.uk/

"Hmmm, that makes no sense to me...
 But then you are very small, perhaps you're right." -- Treebeard






More information about the Net-z3950 mailing list