{"body": {"type": "/type/text", "value": "[\u2190 Back to \"About the technology\"](tech)\r\n\r\n**Web server:** [lighttpd][] http server runs [infogami][] through FastCGI interface using [Flup][]. (There can be multiple concurrent infogami instances that the lighttpd server distributes requests between, although we currently just run one.) Infogami is written\r\nin [Python][] (we currently require 2.5 or greater) and uses [web.py][] and _ThingDB_. ThingDB uses [PostgreSQL][] as its data store. [Psycopg2][] is the Python driver for PostgreSQL. We use [supervise][] (see also [daemontools][]) to make sure everything keeps running.\r\n\r\n [lighttpd]: http://lighttpd.net/\r\n [infogami]: http://infogami.org/\r\n [Python]: http://python.org/\r\n [web.py]: http://webpy.org/\r\n [PostgreSQL]: http://postgresql.org/\r\n [Flup]: http://trac.saddi.com/flup\r\n [Psycopg2]: http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo\r\n [supervise]: http://cr.yp.to/daemontools/supervise.html\r\n [daemontools]: http://cr.yp.to/daemontools.html\r\n\r\n**Templates:** The infogami application relies on various _Web templates_ (these are code+html snippets). The initial templates are static files but they get edited through the wiki interface, and new ones get added through the wiki, so the real versions live entirely in the database. \r\n\r\n**Search:** Infogami also accepts plug-ins and we use one for the [Solr][] search engine. Solr is a JSP currently sitting in a [Jetty][] http server, so it communicates with Infogami through a local http socket. Solr itself wraps the [Lucene][] search library. These run under [Java][] (we're currently using Java 1.5, I think). Solr is built under [Apache Ant][] and has a few config and schema files, plus a startup script (solr.sh) that has to be manually edited to set the port number. I think we currently use Lucene as a downloaded .jar file so we don't build it.\r\n\r\n [Solr]: http://lucene.apache.org/solr/\r\n [Jetty]: http://www.mortbay.org/\r\n [Lucene]: http://lucene.apache.org/\r\n [Java]: http://java.sun.com/\r\n [Apache Ant]: http://ant.apache.org/\r\n\r\n**Search plugin:** The solr-infogami plugin also calls out to _an archive.org PHP script_ that expands basic search queries to advanced queries. It may also start using _the openlibrary.org flipbook_ (with some possible customizations) to display OCA scans for pages containing fulltext search results.\r\n\r\n**Data:** We have a bunch of catalog data and fulltext acquired from various sources, either sitting in the Archive or to be uploaded to there. I think the acquisition processes (including web crawling scripts for some of the data) is outside the scope of an Open Library software install. There are a bunch of additional scripts to make the stuff usable in openlibrary and these need to be documented. These include _TDB Conversion Scripts_ written by dbg, and (for OCA fulltext) _Archive Spidering_ and _Solr Importing_ scripts written by phr.\r\n\r\n**Project management:** We are using [Mercurial][] for source control and [Launchpad][] for issue tracking.\r\n\r\n [Mercurial]: http://www.selenic.com/mercurial/\r\n [Launchpad]: http://launchpad.net/"}, "title": "Open Library Architecture", "last_modified": {"type": "/type/datetime", "value": "2008-04-09 03:47:56.07619"}, "key": "/about/architecture", "type": {"key": "/type/page"}, "id": 9888063, "revision": 1}