Getting real time updates in StatusNet

Ryan Weal

January 08, 2012

Tonight I installed Meteor on my server to allow my StatusNet site to update pages automatically as the updates come in. This is enabled via the Realtime plugin. To enable the realtime module you will need:

Installing Meteor Consider following

Meteor's installation guide

Debian Startup Script This is what I'm using in place of the file the meteor creators recommend for

/etc/init.d/meteor. This one will run in Debian. `

#!/bin/sh

description: Runs meteord

chkconfig: 2345 99 00

Source function library.

#. /etc/init.d/functions

case "$1" in 'start') echo -n "Starting Meteord: "

#echo 65535 > /proc/sys/fs/file-max ulimit -n 65535 cd /usr/local/meteor su meteor -c ./meteord >/var/log/meteord 2>&1 & echo ;; 'stop') echo -n "Stopping Meteord: " killall meteord && success || failure ;; 'reload') echo -n "Reloading Meteord configuration: " killall -s SIGHUP meteord && success || failure ;; *) echo "Usage: $0 { start | stop | reload }" ;; esac exit 0 `

Firewall settings

Update your config file The last step is to add the configuration to your StatusNet config.php file.

addPlugin('Meteor', array( 'webserver' => 'example.com', 'webport' => '81', 'controlserver' => '127.0.0.1', 'controlport' => '4671' )); addPlugin('Realtime'); This detail actually comes from the StatusNet site. That's it! If realtime is enabled correctly you will see a play/pause button at the top of your feed and a link to a pop-up window you can use to monitor the internets all day long. If your updates aren't working go back and check that the external world can access the port you have assigned for reading from meteor (in my example I had to ensure 81 was mapped to 4670 correctly). I had to try a couple times to get it right. Enjoy getting real time updates!