Friday, December 19, 2008

Happy Holidays!

Happy Holidays to any (and all) readers of this blog.

I'll be back after Christmas with some interesting posts. I hope to blog more about our streaming video (GerbilCam), text messaging (my article on Text messaging will be in the January, 2009 Computers in Libraries), and mobile workstations.

Thursday, December 11, 2008

Libraries on NBC Nighty News

NBC had a nice segment about public libraries on their nightly newscast last night:

http://www.msnbc.msn.com/id/3032619/#28165432

In brief, use is up -- way up. This includes circulation, computer use, etc.

We've certainly seen an increase in use, in particular our Technology centers. Lots of job seekers, and people who perhaps are cutting back and can't afford internet at home anymore.

Tuesday, December 9, 2008

Fun with Wordle




The above graphic is a world cloud representation of a day's worth of searches at Carmel Clay Public Library. The image was generated using wordle (http://www.wordle.net/). Using wordle, you can paste in a series of terms, and generate the cloud, showing which terms are more commonly used. There are many options for arrangement, color, etc.

Obtaining the search terms was relatively easy on our SirsiDynix GL3.1 ILS. First, I edited our system.env file and added the following line:

USAGE_LOGGING|1|
1 turns logging on, zero turns it off.
This turns on usage logging. The log files can be found in /s/Sirsi/Unicorn/Webcat/Logs and are n the format of 20081209.weblog for the 12/09/2008 logfile. Unfortunately, the log file is mostly garbage:

2008/12/9 03:47:34 UFSQuery: "GENERAL halo" Session: 296070012 Server: 1home Records: 49
2008/12/9 03:47:35 UFSQuery: "GENERAL archaeology as human ecology" Session: 210950013 Server: 1home Records: 02008/12/9



What can we do to make this more useable? I decided to write a simple Cold Fusion script to process this data, removing all the extraneous information so that we'd end up with a list of words. The following code is a brute force method of doing this -- by simply looping over the list, it removes un-needed data:





The code can be modified for a different file path, or increase the loopcount from 5000 to however many lines exist in your logfile. Once this has run, you will be left with a file of words. Simply open that file, past it into wordle, and you've got your graphic!

Wednesday, December 3, 2008

A Year of Program Reminders

Last year around this time, I was looking at the local PBS affiliate's website, trying to find a listing for a program we had seen the night before (something to do with ants, I think). I noticed that they had built a nice function into their program schedule, which allowed you to send yourself e-mail reminders about upcoming programs.

I was somewhat aware that other libraries may be doing this, but we weren't, so I quickly wrote some code and integrated it into our online calendar (http://www.carmel.lib.in.us/calendar/calendar.cfm).

It wasn't the easiest thing in the world to write, mostly because dealing with ODBC date/time stuff is never much fun for me. It ended up being a simple database table, with a few Cold Fusion pages processing the input and sending the reminders. A simple Java popup window was created, so that when the patron clicked "E-mail Reminder", they could enter their e-mail address to be notified about that program. The e-mail reminder arrives the day before the program, with a quick note and a link back to the library calendar.

The service was launched without any fanfare or publicity, and patrons quickly found it and began using it. It's been a year now, and we sent 1,348 e-mail program reminders over that time, about 3.5 per day. Of course, there are plenty of days when we have no programs, with zero reminders sent. On the other hand, we sent 33 reminders one day in June -- the day our summer reading programs were to begin.

I've always been a big fan of creating services to make our patron's lives easier. I think this one falls nicely into that category, and I'm very pleased with the way it has worked. If I had to improve this software, I'd allow patrons the ability to select multiple events, and only enter their e-mail address once. As it stands now, they have to click on each event. Checking logs tells me that certain patrons check the calendar, then set a reminder for every event they are interested in (often, 10 or more). I can see how having to type your address that many times (or hopefully, paste it in), can be cumbersome.

An improvement to this service was the addition of text message reminders, which we've had up and running since April, 2008. I'll be talking more about that, and other text messaging features, in the future.

Monday, November 24, 2008

Creating a Reverse Proxy Cache using Open Source Software - Part 2

In my previous post, we installed the Squid proxy server on a computer running Fedora. Once the proxy is up and running, we can configure our ILS to point to it for our content.

For the purposes of this example, I am referring to a SirsiDynix GL3.1 ILS, running the iBistro opac. Obviously, these settings are ILS dependent.

In the /s/sirsi/Unicorn/Webcat/Config directory, you should have the file system.env. This file contains changes made to the default (ibistro.env) iBistro settings.

First, find the link enrichment URL statements in the ibistro.env file. You can edit the file with vi and use the "/" command to find them (such as /LINK_ENRICHMENT). Copy these lines down.

Next, using vi or another editor, edit the system.env file and paste those lines in it, but edit them to note your proxy address. On my system, these lines look like:

# reverse proxy cache added

LINK_ENRICHMENT_URL_PT1(pipe)http://yourcachenamehere/index.aspx?isbn=(pipe)

LINK_ENRICHMENT_URL_PT2(pipe)&client=sirsi&type=rw12(pipe)

For some reason, blogger doesn't like me using the PIPE symbol -- so replace the (pipe)'s above with pipe symbols.

Obviously, your proxy name must be placed in the "yourcachenamehere" space. Your system may also have differing paramaters in the PT2 line. Make sure you duplicate those parameters from the original lines in ibistro.env into your system.env file.

Save the file, and exit. These changes take place immediately on the next search that is started.

If you do not have a SirsiDynix ILS, check your config files for mentions of Syndetics. Replace any notation of Syndetics with your proxy address, and you should be good to go.

Friday, November 21, 2008

Creating a Reverse Proxy Cache using Open Source Software - Part 1

As library OPACs have evolved, more and more content has been added to enhance the patron experience. Common content includes cover art, reviews, and even chapters of books. Libraries cannot provide this content on their own, so they use providers like Syndetics. Many libraries are now seeing their bandwidth maxed out as patrons move toward higher bandwidth applications like streaming video. As the content comes across the internet, this can cause slowness during catalog searches as the OPAC struggles to download the content and insert it into the results pages.

What can we do to speed this up?

One easy solution is to add more bandwidth -- if only we had unlimited budgets and a never ending supply of bandwidth! Unfortunately, this may not be possible.

A second solution is to cache the content locally, so that delivery is speeded up, particulary to those patrons who are inside your library. Instead of having to go out to the Internet for every piece of content, the content is pulled locally from a cache server in house, and delivered at internal network speeds -- far greater than internet speed. This is called a reverse proxy cache.


Creating a reverse proxy cache can be done at low or no cost to your library. The software can be obtained for free, and potentially run on an older server or existing machine in combination with other services you currently offer. In this example, we are going to use the Fedora operating system and the Squid proxy server. However, any open-source Linux that has Squid should suffice.

Fedora is a free, Linux-based operating system. The software can be downloaded from the Fedora Project, http://fedoraproject.org/oject.org/. There are about 6 CD-ROM images, or one DVD image to download. Be patient, it may take a few hours. Once Fedora has been downloaded, copy the ISO images to CD-ROM or DVD, and you are ready to install.

When installing Fedora, make sure you are installing Squid. Squid should be in the Internet Servers group of programs, and should install by default if you tell the install that the machine is going to be serving web pages.

Once the install is complete, we need to do some quick configuration of Squid. Squid will install a default configuration file, usually in /etc/squid. We're going to create a new squid.conf file, so you can backup and delete the default configuration file. Using vi or another editor, create a new squid.conf file with the following lines:

http_port 80 defaultsite=syndetics.com
cache_peer 165.254.62.247 parent 80 0 no-query originserver
acl syndetics dstdomain syndetics.com
http_acess allow syndetics

This configuration file works with Squid 3.0, which is the current version as of this writing. Please note that it references Syndetics -- if you do not use Syndetics, you will obviously need to change both the domain reference, and the IP address reference.

Once Squid is installed, you must create the swap directories. Issue this command:

# squid -z

Then, you are ready to start Squid:

# squid start

You can examine the various Squid commands by typing:

# squid -?

If Squid doesn't start, or you need more help, there is a wealth of information on configuring and troubleshooting Squid available at the Squid site: http://www.squid-cache.org/

Next time, I'll talk post how we connected our new Squid reverse proxy cache to our ILS.

Welcome

My name is Peter Konshak, and I'm the Computer Technology Services Manager for the Carmel Clay Public Library, in Carmel, Indiana. I've been working with library technology since 1996, when I took my job here at Carmel. I have a BS from the University of Wisconsin Madison, and a MLIS from the University of Texas at Austin.

I hope to share some of the fun and exciting things I'm doing with technology at Carmel Clay Public Library. Much of my work is in web-related services for library patrons, as well as providing unique and new content. I hope you'll find this blog interesting.