Xtomp handbook

Install

Installation guide.

Build

xtomp it based on nginx 99% of the build work is done by nginx so you can use resources related to nginx for xtomp too.

Dev Environment

I've not been using fancy IDEs: vi, kate, sublimetext, gdb, valgrind, firefox.

This build works in Linux, xtomp-ngin should build on other platforms, xtomp-sink, xtomp-tap and xtomp-drain require libaio.

You'll need a standard gcc based tool chain for compiling C.

The nginx build asks for OpenSSL but xtomp does not need that.

Tap, sink, and drain need libaio-dev (or redhat equivalient) and I don't know how to tell the auto scripts about it.

sudo aptitude install libaio libaio-dev libssl-dev

Utils and tests require nodejs version > 4

To build xtomp core runtime.

Build steps are based on auto tools names but do not use auto tools, the ./ is not a typo!

cd xtomp-ngin
./configure
./make

This also runs the unit tests.

Install

Add a user called xtomp to run the deamon.

add user xtomp

sudo ./kill  # if its already running
sudo ./install

By default debug is on, sptting lots of stuff to /var/log/xtomp/error.log. The main log is called error.log not sure why, that's how nginx does it.

Nodejs tools

Nodejs tools run from source, no compilation is needed.

With the server started there are various integration tests.

Make sure you a have default config, so the expected destinations are available.

Basic STOMP features.

cd xtomp-runner
./modules.sh
./run-tests.sh

Basic Fuzzing

./run-soak.sh
./run-stress.sh

You should install and run valgrind and thehn ./install valgrind will print memory management problems in memcheck.log.

WebSockets features

cd xtomp-ws-runner
./run-tests.sh

Contributions

Stick to the implicit nginx coding style with -Wall and jshint JavaScript. Unit test everything, this is hard, I know, but its worth it. If you see xtomp mallocs > 0 when idle you've leaked some memory.

yours

teknopaul



by teknopaul