implement shared memory, TODO add tornadostuff.py as a unit test