Mucho Tools - famish99/MuchoCorazon GitHub Wiki

This page will document the external tools necessary to run the MuchoCorazon webapp.

PyPy

The server is running on PyPy which is an optimized Python interpreter written in Python with JIT abilities. We're using pypy-1.9, which is compatible with the Python 2.7.2 spec.

http://pypy.org/

Installing PyPy

This is the preferred route to installation. On most modern machines, the dependencies should just be met. Grab the latest PyPy release here.

All binary versions are packaged in a tar.bz2 or zip file. When uncompressed, they run in-place. For now you can uncompress them either somewhere in your home directory or, say, in /opt, and if you want, put a symlink from somewhere like /usr/local/bin/pypy to /path/to/pypy-1.9/bin/pypy. Do not move or copy the executable pypy outside the tree – put a symlink to it, otherwise it will not find its libraries.

Building PyPy

If you're having issue getting PyPy to work, here are some things you may need to install. The libraries outlined below are commonly missing/out of date on older machines. If you're feeling really adventurous, you can build PyPy from scratch, the instructions are here.

libexpat

This can be compiled normally.

openssl 0.9.8

openssl 0.9.8 which if must be built manually done like so, otherwise the shared libraries will not be created. (This library may not be necessary if using PyPy 1.9).

./configure shared --prefix=/path/to/
make
make install

libbz2

libbz2 is odd in the fact it has no configure script. It must be made, then the .so must be manually copied over.

make -f Makefile-libbz2-so
make
make install PREFIX=/path/to/
cp libbz2.so* /path/to/lib

Memcached

From the memcached site:

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

We're using memcached version 1.4.13. We're running a memcached instance on tmtrac to store rendered pages to speedup report access. It can be used to store generated database queries as well, and in future versions of TantoCuore, we plan to support some form of query caching.

http://memcached.org/

Python/PyPy Packages

We're using these packages within PyPy to operate. Most of these can be installed by downloading the files then running sudo pypy setup.py install.

The following are needed for development/testing purposes:

These packages will only be necessary once it's rolled to production web service.

  • PyMySQL (pure python implementation of the MySQLdb connector, used to get around PyPy's performance hit when using C extensions) GitHub
  • django-mysql-pymysql (provides django bindings to the PyMySQL connector) GitHub
  • flup v1.0.2 (for fcgi on the server) PyPI