Perl Success Story: Findus Helps Finding Books in German Public Libraries
by Todd Mezzulo
Richard Lippmann, a system administrator for the city of Zindorf in Germany, sent in this Perl Success Story about Findus, a search utility he created as a personal project to help cut down on his family's late fees at their public library. Now that "personal project" has evolved into a program serving more than 2 million books, CDs, DVDs, etc., and about 500,000 readerís accounts in approximately 90 libraries on the web.
Findus Helps Finding Books in German Public Libraries
It all began as a project to help me pay less to my own library. My whole family reads books like mad and we paid a lot of money for "late fees" at our public libraries. So I had the idea to program a search machine for our libraries that could ask for our readerís accounts. Three years ago there were only solutions available running a public webserver in the library. This is too expensive in Germany these days and too dangerous for me as system administrator for the city. So I decided to write my own better solution.
Two pieces working together: Feedfindus and Findus
The program called Findus consists of two parts:
1. Exporting the data from the libraries database. Compact, encrypt and send it to the webserver (called feedfindus). This runs as a "compiled" *.exe at the libraryís server so I don't have to install Perl at the server.
2. Put the whole data into the database and make it available for the readers (findus). The following questions should be answered from the reader's home: which books does the library own (search), can I get the book at once (availability) and what did I lend (reader's account)?
MySQL as Backbone
Since I am German I wrote the whole thing in German language and certainly Perl. The database is MySQL which is working great for this task. I love that I can connect to it lightning fast and when having set the right indexes everything works great. I work with one MySQL-database and every library has its own tablenames there beginning with the libraryís name. This was a good idea because it's very easy to separate each libraryís data by tablenames which is important when having nearly 1200 tables, about 13 for each customer.
CGI as the Running Horse
The whole thing is running as CGI-script and this tended to be a problem after some time. There are 12000 lines of code and about 400 KB of Perl-code to be compiled every time. I decided to divide the program into several modules that are loaded only when needed for the immediate task at hand. Since the program should run at "nearly every webserver" mod_perl was not an option. Although mod_perl-envrionment would be nice: it saves about 2 seconds of starting time for every userís call. But I saw that you have to develop the program in mod_perl when running it later there because the persistent environment brings a lot of surprises with global variables.
Eternal development as usual
I thought that development for Findus would last a year or so (after-work development in my spare-time). But I found some really good libraries with librarians who had many wishes and ideas, which helped Findus to get better and better. And now readers get warning-emails before exceeding the time-limit, a monthly newsletter with new bought books, email-reminders when a book is available and the program speaks russian (as I do not :-) and other languages.
What began as a personal project is now serving more than 2 million books, CDs, DVDs etc. and about 500,000 readerís accounts in about 90 libraries into the web. Automatically, daily, and with no work for my librarians. And they love this. :-)
Don't be afraid of a German Findus Internet-OPAC? Take a look at Findus.
Richard Lippmann from Bavaria, Germany
To learn how large and small companies are using Perl to meet their goals, check out Perl Success Stories.
If you have a Perl success story of your own that you'd like to share, please let me know. You can reach me at: firstname.lastname@example.org.