The Six degrees of Wikipedia implementation =========================================== Download source code: * [Solaris version](http://tools.wikimedia.de/~river/files/linksd.tar.gz) * [Portable version](http://tools.wikimedia.de/~river/files/linksdp.tar.gz) The server is made up of the following parts: * __linksd__, the backend server, * __linksc__, the command-line client, * __mkcache__, a program to build the cache linksd needs from the database, * __liblinksc_jni.so__, the JNI (Java Native Interface) shared library * __linksc.jar__, a Java interface to the links server * __sixdeg.war__, a JSP front-end * __python/six_degrees__, a Python front-end To compile it, do the following: * Extract __linksd.tar.gz__ (<tt>gzcat linksd.tar.gz | tar xvf -</tt>) * Ensure you have installed: * Sun Studio compiler software (<a href="http://www.sun.com/software/products/studio/index.xml">http://www.sun.com/software/products/studio/index.xml</a>) (Solaris only) * The GNU C++ compiler (Portable only) * A Java 5.0 development environment (<a href="http://java.sun.com/">http://java.sun.com</a>) * The "zip" utility * The MySQL client libraries (<a href="http://dev.mysql.com/">http://dev.mysql.com</a>) * Change directory to <tt>./linksd/</tt> * Edit __linksc.h__ to change the DOOR and CACHE files to a suitable location. * Type "__make__". The Solaris version will only build on Solaris. The portable version should build on any Unix-like operating system, but has only been tested on Debian Linux. * You may need to change some paths in the Makefile to build correctly. * Assuming there are no errors, you should end up with the files above. Run "mkcache <dbname>" to create the database cache, then start "linksd". To test it, run "linksc" from the command line, and type two article names on separate lines. You should get back a path between them. Note that "mkcache" requires the database user and password to be specified in the "[linksd]" section of <tt>~/.my.cnf</tt>. If you want one of the web front-ends: * For the Python frontend, copy __python/six_degrees__ to a cgi-bin directory on your web server. You will also certainly need to edit the script to change the hard-coded paths. * For the JSP frontend, edit the Makefile to edit the --user and other parameter in the "deploy" target, then run "__make deploy__". (Note: This will only work if you use Sun's Java Application Server. For other servlet containers, look at the documentation for details on how to deploy .war files.) You will need to ensure that liblinksc_jni.so is somewhere in the library path so the JVM can find it. Note that for both web front-ends, the web server or application server (i.e. whichever user the front-end runs as) needs write access to the DOOR file that linksd create.