<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.timc3.com &#187; Computing</title>
	<atom:link href="http://blog.timc3.com/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.timc3.com</link>
	<description>providing news and views since 2003</description>
	<lastBuildDate>Tue, 24 Aug 2010 08:12:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<link rel="http://api.friendfeed.com/2008/03#sup" xmlns="http://www.w3.org/2005/Atom" type="application/json" href="http://friendfeed.com/api/public-sup.json#9e509d204d"/>		<item>
		<title>Compiling RabbitMQ on Ubuntu 10.04</title>
		<link>http://blog.timc3.com/2010/08/23/compiling-rabbitmq-on-ubuntu-10-04/</link>
		<comments>http://blog.timc3.com/2010/08/23/compiling-rabbitmq-on-ubuntu-10-04/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:05:33 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RabbitMQ STOMP Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=816</guid>
		<description><![CDATA[As part of my on going effort for realtime web updates on one of our applications I needed to install RabbitMQ HEAD (That is the development head) with the RabbitMQ STOMP adaptor. Talking on IRC channel it was recommended to me to install from source, but unfortunately the documentation is out of date. So the [...]]]></description>
			<content:encoded><![CDATA[<p>As part of my on going effort for realtime web updates on one of our applications I needed to install RabbitMQ HEAD (That is the development head) with the RabbitMQ STOMP adaptor. Talking on IRC channel it was recommended to <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> to install from source, but unfortunately the documentation is out of date. So the following will do it cleanly:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> erlang-crypto erlang-snmp erlang-syntax-tools libsctp1 lksctp-tools erlang-runtime-tools erlang-mnesia erlang-public-key erlang-os-mon erlang-ssl erlang-base erlang-parsetools mercurial git-core build-essential erlang-dev <span style="color: #c20cb9; font-weight: bold;">zip</span> erlang-tools erlang-src python-simplejson &nbsp;erlang-edoc<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<br />
hg clone http:<span style="color: #000000; font-weight: bold;">//</span>hg.rabbitmq.com<span style="color: #000000; font-weight: bold;">/</span>rabbitmq-public-umbrella<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> rabbitmq-public-umbrella<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">co</span><br />
<span style="color: #c20cb9; font-weight: bold;">make</span></div></div>
<p><strong>Updated:</strong> The following will create a <a target="_blank" href="http://www.debian.org">Debian</a> style package and install (replace ** with the version numbering that you wish to use:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> cdbs debhelper xmlto<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> rabbitmq-server<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">VERSION</span>=<span style="color: #000000;">1.8</span>.<span style="color: #000000; font-weight: bold;">**</span> srcdist<br />
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> packaging<span style="color: #000000; font-weight: bold;">/</span>debs<span style="color: #000000; font-weight: bold;">/</span>Debian <span style="color: #007800;">UNOFFICIAL_RELEASE</span>=<span style="color: #c20cb9; font-weight: bold;">true</span> package<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> packaging<span style="color: #000000; font-weight: bold;">/</span>debs<span style="color: #000000; font-weight: bold;">/</span>Debian<span style="color: #000000; font-weight: bold;">/</span>rabbitmq-server_1.8.<span style="color: #000000; font-weight: bold;">**</span>-<span style="color: #000000;">1</span>_all.deb</div></div>
<p>Activating the STOMP plugin:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> rabbitmq-public-umbrella<span style="color: #000000; font-weight: bold;">/</span>rabbitmq-stomp<span style="color: #000000; font-weight: bold;">/</span>dist<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> amqp_client.ez <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq_server-1.8.1<span style="color: #000000; font-weight: bold;">/</span>plugins<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> rabbit_stomp.ez <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq_server-1.8.1<span style="color: #000000; font-weight: bold;">/</span>plugins</div></div>
<p>Configuration file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">RABBITMQ_PLUGINS_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>rabbitmq_server-1.8.1<span style="color: #000000; font-weight: bold;">/</span>plugins<br />
<span style="color: #007800;">SERVER_START_ARGS</span>=<span style="color: #ff0000;">'-rabbit_stomp listeners [{&quot;0.0.0.0&quot;,61613}]'</span></div></div>
<p>Restart to activate (the activation script for plugins is depreciated):</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>rabbitmq-server restart</div></div>
<p>And you should have a working RabbitMQ on Ubuntu with a STOMP adaptor.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/08/23/compiling-rabbitmq-on-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Orbited + Django dev daemon</title>
		<link>http://blog.timc3.com/2010/08/21/orbited-django/</link>
		<comments>http://blog.timc3.com/2010/08/21/orbited-django/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 14:11:36 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=813</guid>
		<description><![CDATA[Today I got my Django project working with Orbited.
By creating a twisted proxy for Orbited and Django I am able to serve a development environment for both Django and Orbited plus the builtin MorbidQ message queue.
I am going to be using this to give live notifications of events that are happening on the system in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got my Django project working with Orbited.</p>
<p>By creating a twisted proxy for Orbited and Django I am able to serve a development environment for both Django and Orbited plus the builtin MorbidQ message queue.</p>
<p>I am going to be using this to give live notifications of events that are happening on the system in realtime, and so it should be able to handle quite a large load. To do this I will use another queue in production, but I have found it needed to sort out the development environment first of course.</p>
<p>This daemon I have put up at <a href="http://github.com/timc3/django-dev-orbited">GitHub</a> .</p>
<p>It even serves the static files. Much thanks goes to the HotDot project for seeing how alot of this was done, but I have taken out the authentication and other bits to make it cleaner for general use.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/08/21/orbited-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>psycopg2 OS X &#8211; _PQbackendPID</title>
		<link>http://blog.timc3.com/2010/08/20/psycopg2-os-x-_pqbackendpid/</link>
		<comments>http://blog.timc3.com/2010/08/20/psycopg2-os-x-_pqbackendpid/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 13:21:26 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[psycopg2 osx PQbackendPID]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=809</guid>
		<description><![CDATA[If you are having problems with _PQbackendPID, psycopg2 and OS X and have tried the forcing to 32 bit mentioned in other posts about the web then it might be time to try a more forceful approach]]></description>
			<content:encoded><![CDATA[<p>If you are having problems with _PQbackendPID, psycopg2 and OS X and have tried the forcing to 32 bit mentioned in other posts about the web then it might be time to try a more forceful approach. This is an example of the error that you might face:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dlopen<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Python<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>site-packages<span style="color: #000000; font-weight: bold;">/</span>psycopg2<span style="color: #000000; font-weight: bold;">/</span>_psycopg.so, <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>: Symbol not found: _PQbackendPID<br />
&nbsp; Referenced from: <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Python<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>site-packages<span style="color: #000000; font-weight: bold;">/</span>psycopg2<span style="color: #000000; font-weight: bold;">/</span>_psycopg.so<br />
&nbsp; Expected <span style="color: #000000; font-weight: bold;">in</span>: flat namespace<br />
&nbsp;<span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Python<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>site-packages<span style="color: #000000; font-weight: bold;">/</span>psycopg2<span style="color: #000000; font-weight: bold;">/</span>_psycopg.so</div></div>
<p>The first thing to do is get rid of your old Psycopg2 (just in case), so locate the site-packages directory:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;</span></div></div>
<p>Then in that directory:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> psycopg<span style="color: #000000; font-weight: bold;">*</span></div></div>
<p>Then remove the old version of PostGreSQL as much as possible. Not sure what version you might have installed, but if you have pg_config on your sys path it will tell you where it is. These instructions may or may not work for you:</p>
<ol>
<li>Stop the server. sudo launchctl unload /Library/LaunchDaemons/com.edb.launchd.postgresql-8.4.plist</li>
<li>Remove the plist file<br />
sudo rm -f /Library/LaunchDaemons/com.edb.launchd.postgresql-8.4.plist</li>
<li>Remove the Applications Menu.<br />
sudo rm -f &#8220;/Applications/PostgreSQL 8.4&#8243;</li>
<li>Remove the installation directory<br />
sudo rm -rf /Library/PostgreSQL/8.4<br />
(Note: You can backup your data directory in case you need it.)</li>
<li>Remove the &#8216;postgres&#8217; user<br />
sudo dscl . delete /Users/postgres<br />
(Note: This step is optional)</li>
<li>Remove the ini file<br />
sudo rm -f /etc/postgres-reg.ini</li>
</ol>
<p>I found a reboot worked to make sure that we are back to normal and nothing is installed.</p>
<p>Download <a href="http://initd.org/pub/software/psycopg/PSYCOPG-2-2/psycopg2-2.2.1.tar.gz">psycopg2-2.2.1.tar.gz</a><br />
Download PostGreSQL from http://www.enterprisedb.com/products/download.do  &#8211; the version that isn&#8217;t the &#8220;Standard Server&#8221; but just &#8220;PostgreSQL 8.4 &#8221; &#8211; you do have to register for that.</p>
<p>Install Postgresql &#8211; making sure that it completes, if not it means that you probably had some old files or users in there. If it went ok it should have installed and started running on port 5432. Try removing it /Library/PostgreSQL/8.4/uninstall-postgresql.app &#8211; and then removing the user or files that it complained about.</p>
<p>Download and install http://www.python.org/download/releases/2.6.5/ Mac Installer disk image. Restart (not sure that this restart is totally needed, but I did it anyway).</p>
<p>Now when you are on a new terminal window and type &#8220;python&#8221; it should say version 2.6.5. You will have to reinstall any python bits and pieces that you have installed previously &#8211; but make sure that you reinstall PIP and easy_install &#8211; they will use the old version of Python if you are not careful.</p>
<p>Now go into the directory of psycopg2-2.2.1 that you downloaded earlier.</p>
<p>Change setup.cfg so it looks like the following:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:500px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span>build_ext<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #007800;">define</span>=PSYCOPG_EXTENSIONS,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3<br />
<br />
<span style="color: #666666; font-style: italic;"># PSYCOPG_EXTENSIONS enables extensions to PEP-249 (you really want this)</span><br />
<span style="color: #666666; font-style: italic;"># PSYCOPG_DISPLAY_SIZE enable display size calculation (a little slower)</span><br />
<span style="color: #666666; font-style: italic;"># HAVE_PQFREEMEM should be defined on PostgreSQL &gt;= 7.4</span><br />
<span style="color: #666666; font-style: italic;"># HAVE_PQPROTOCOL3 should be defined on PostgreSQL &gt;= 7.4</span><br />
<span style="color: #666666; font-style: italic;"># PSYCOPG_DEBUG can be added to enable verbose debug information</span><br />
<span style="color: #666666; font-style: italic;"># PSYCOPG_OWN_QUOTING can be added, but it is deprecated (will go away in 2.1)</span><br />
<span style="color: #666666; font-style: italic;"># PSYCOPG_NEW_BOOLEAN to format booleans as true/false vs 't'/'f'</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set to 1 to use Python datatime objects for default date/time representation.</span><br />
<span style="color: #007800;">use_pydatetime</span>=<span style="color: #000000;">1</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If the build system does not find the mx.DateTime headers, try </span><br />
<span style="color: #666666; font-style: italic;"># uncommenting the following line and setting its value to the right path.</span><br />
<span style="color: #666666; font-style: italic;">#mx_include_dir=</span><br />
<br />
<span style="color: #666666; font-style: italic;"># For Windows only:</span><br />
<span style="color: #666666; font-style: italic;"># Set to 1 if the PostgreSQL library was built with OpenSSL.</span><br />
<span style="color: #666666; font-style: italic;"># Required to link in OpenSSL libraries and dependencies.</span><br />
<span style="color: #007800;">have_ssl</span>=<span style="color: #000000;">0</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Statically link against the postgresql client library.</span><br />
<span style="color: #007800;">static_libpq</span>=<span style="color: #000000;">0</span><br />
<br />
<span style="color: #666666; font-style: italic;"># &quot;pg_config&quot; is the preferred method to locate PostgreSQL headers and</span><br />
<span style="color: #666666; font-style: italic;"># libraries needed to build psycopg2. If pg_config is not in the path or</span><br />
<span style="color: #666666; font-style: italic;"># is installed under a different name uncomment the following option and</span><br />
<span style="color: #666666; font-style: italic;"># set it to the pg_config full path.</span><br />
<span style="color: #007800;">pg_config</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>PostgreSQL<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.4</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pg_config<br />
<br />
<span style="color: #666666; font-style: italic;"># If &quot;pg_config&quot; is not available, &quot;include_dirs&quot; can be used to locate </span><br />
<span style="color: #666666; font-style: italic;"># postgresql headers and libraries. Some extra checks on sys.platform will</span><br />
<span style="color: #666666; font-style: italic;"># still be done in setup.py.</span><br />
<span style="color: #666666; font-style: italic;"># The next line is the default as used on psycopg author Debian laptop:</span><br />
<span style="color: #666666; font-style: italic;">#include_dirs=/usr/local/lib</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Uncomment next line on Mandrake 10.x (and comment previous ones):</span><br />
<span style="color: #666666; font-style: italic;">#include_dirs=/usr/include/pgsql/8.0:/usr/include/pgsql/8.0/server </span><br />
<br />
<span style="color: #666666; font-style: italic;"># Uncomment next line on SUSE 9.3 (and comment previous ones):</span><br />
<span style="color: #666666; font-style: italic;">#include_dirs=/usr/include/pgsql:/usr/include/pgsql/server</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If postgresql is installed somewhere weird (i.e., not in your runtime library</span><br />
<span style="color: #666666; font-style: italic;"># path like /usr/lib), just add the right path in &quot;library_dirs&quot; and any extra</span><br />
<span style="color: #666666; font-style: italic;"># libraries required to link in &quot;libraries&quot;.</span><br />
<span style="color: #007800;">library_dirs</span>=<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>PostgreSQL<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.4</span><span style="color: #000000; font-weight: bold;">/</span>lib<br />
<span style="color: #007800;">libraries</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib</div></div>
<p>Now run the installation using the new python:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>This should install. You should be able to do &#8220;import psycopg2&#8243; from the python prompt. Now install all the libraries and python modules that you need, and create the Postgresql database that you want (pgadmin3 is the best tool for this).</p>
<p>Please note this was done on a OS X Snow Leopard 10.6.4 with XCode and the 10.4 libraries installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/08/20/psycopg2-os-x-_pqbackendpid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realtime web &#8211; Orbited vs Tornado</title>
		<link>http://blog.timc3.com/2010/08/16/realtime-web-orbited-vs-tornado/</link>
		<comments>http://blog.timc3.com/2010/08/16/realtime-web-orbited-vs-tornado/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:18:31 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=807</guid>
		<description><![CDATA[My latest task and one that I have been researching and playing with for some time is to integrate real time feedback in to our web application. The main goal is to be able to provide real time feedback of jobs and updates to users without Ajax style polling.
This is a simple requirement to write, [...]]]></description>
			<content:encoded><![CDATA[<p>My latest task and one that I have been researching and playing with for some time is to integrate real time feedback in to our web application. The main goal is to be able to provide real time feedback of jobs and updates to users without Ajax style polling.</p>
<p>This is a simple requirement to write, but one that had many deeper issues. Firstly it needs to be able to handle many users concurrently and secondly it should do so without blocking execution of code. Our application framework was not designed for this and this is no problem, it has been designed to do certain thing well and other I am really not going to force upon it.</p>
<p>The main application framework will handle the standard page requests, user authentication and the rest of the standard stack, so I have been looking at technologies to complement its capabilities. This has led <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> to look at Comet applications and very fast non-block frameworks.</p>
<p>Of these I would prefer to keep the language in Python, there seem to be good alternatives in Java and .Net but I would rather keep an upgrade path by having a language that can be migrated across to these (thanks Jython and IronPython) and keep data in a backend store that is language agnostic.</p>
<p>Orbited and Tornado are really good candidates. I am going to stay away from more raw implementations of non-blocking event based frameworks such as Twisted because efforts are often better at this stage in building to serve a business purpose where possible. Orbited does actually use twisted, and I am hoping that I will have little need to dig that deep except for understanding its implementation.</p>
<p>Tornado I initially didn&#8217;t think of, but came around after reading &#8220;Building the Realtime User Experience&#8221; in which the author, Ted Roden, seems rather partial to it. In fact it can work quite well in fronting our application, but I am starting to reconsider based upon two factors. Firstly, even though it itself was built for a largish scale operation (FriendFeed &#8211; now owned by FaceBook), it has little other commercial users behind it and I haven&#8217;t found many examples of usage with integrating with Django, Pylons, Turbogears or Zope in a production environment. Secondly what really turns <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> off is the immaturity of its tests. Looking on GitHub even the README shows that little effort has been put into its testing environment, let alone their sporadic coverage.</p>
<p>Twisted on the other hand is extremely mature in both terms of numbers of deployments and its test environment, and this makes Orbited a much better candidate.</p>
<p>I have yet to look at certain other alternatives, such as Diesel, but I have a feeling that I will again come around to start using Orbited.</p>
<p>The other huge plus for <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> in using Orbited is that it can use the STOMP protocol, and use RabbitMQ or ActiveMQ. Other parts of our technology stack are starting to use STOMP and I wish to move more operations on to an event queue, which will open up much in terms of flexibility in the future.</p>
<p>Its a pity that &#8220;Building the Realtime User Experience&#8221; was so limited in terms of covering alternatives to Tornado.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/08/16/realtime-web-orbited-vs-tornado/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wake On Lan with Ubuntu</title>
		<link>http://blog.timc3.com/2010/08/06/wake-on-lan-with-ubuntu/</link>
		<comments>http://blog.timc3.com/2010/08/06/wake-on-lan-with-ubuntu/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:08:22 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=805</guid>
		<description><![CDATA[Wake-on-lan is incredibly useful for those scenarios  where you have more than one machine on a network, but you don&#8217;t always want to have them running but they are needed sometimes.
To setup, make sure that the Motherboard and NIC support is there from your manufacturer. Sometimes it has to be enabled, such as making [...]]]></description>
			<content:encoded><![CDATA[<p>Wake-on-lan is incredibly useful for those scenarios  where you have more than one machine on a network, but you don&#8217;t always want to have them running but they are needed sometimes.</p>
<p>To setup, make sure that the Motherboard and NIC support is there from your manufacturer. Sometimes it has to be enabled, such as making sure that it uses S3 for shutdown, and that PCI wake is supported.</p>
<p>Next you need to check support from the operating system, I am using Ubuntu 10.04, but this should work for other operating systems. Install ethtool, and then check against the ethernet adapter (eth0 in my example).</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ethtool<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> ethtool eth0</div></div>
<p>If support is enabled, but it is turned off you will see:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Supports Wake-on: g<br />
Wake-on: d</div></div>
<p>So we turn it on:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> ethtool <span style="color: #660033;">-s</span> eth0 wol g</div></div>
<p>Now we need to make sure that its always enabled everytime we restart:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> wakeonlan</div></div>
<p>And in that file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
ethtool <span style="color: #660033;">-s</span> eth0 wol g<br />
<span style="color: #7a0874; font-weight: bold;">exit</span></div></div>
<p>Now make sure that its put into the correct runlevels:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> &nbsp;<span style="color: #c20cb9; font-weight: bold;">chmod</span> a+x wakeonlan<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-rc.d <span style="color: #660033;">-f</span> wakeonlan defaults</div></div>
<p>And that is it. It should be supported that you can wake the machine from another computer/server using your favourite wakeup utility ( such as wakeonlan ).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/08/06/wake-on-lan-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching from YUI to JQuery</title>
		<link>http://blog.timc3.com/2010/05/17/switching-from-yui-to-jquery/</link>
		<comments>http://blog.timc3.com/2010/05/17/switching-from-yui-to-jquery/#comments</comments>
		<pubDate>Mon, 17 May 2010 12:41:06 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=803</guid>
		<description><![CDATA[I have been using the Yahoo YUI Javascript library for more than a couple of years now (perhaps about 4) and although I really like it, I have never felt particularly productive using it.
Over those years I have also dabbled in other frameworks, including:

ExtJS (mainly from my old work looking at theming it &#8211; and [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using the Yahoo YUI Javascript library for more than a couple of years now (perhaps about 4) and although I really like it, I have never felt particularly productive using it.</p>
<p>Over those years I have also dabbled in other frameworks, including:</p>
<ul>
<li>ExtJS (mainly from my old work looking at theming it &#8211; and its heavily based upon YUI.) &#8211; I dislike the licensing on ExtJS so it really isn&#8217;t an option for <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> any more</li>
<li>Looked strongly at Cappucino, but there was no real productivity gains to be had, and I wasn&#8217;t writing my current application as a solely Javascript app</li>
<li>MooTools &#8211; Seems nice but never really gelled with it and I haven&#8217;t liked the documentation</li>
<li>SproutCore &#8211; Love it so far, but again I am not writing a pure Javascript App.</li>
<li>JQuery &#8211; have implemented some solutions over the last 6 months, and loved the productivity</li>
</ul>
<p>Anyway, what I am currently developing really needed some strong enhancements, such as AJAX calls, better table views, nice widgets for date and time picking &#8211; the usual enhancements and I just felt that YUI was taking too long. My wishlist was:</p>
<ol>
<li>A Very productive library</li>
<li>Good support from a community of active users</li>
<li>Good documentation.</li>
<li>Doesn&#8217;t impose made CSS changes</li>
<li>Speed of implementation and download</li>
</ol>
<p>YUI 3 was a consideration, after all the Javascript team at Yahoo are among the best in the world, but it was too new and so didn&#8217;t have the community I was looking for.</p>
<p>I ended up with JQuery. After spending a day or so getting to grips and training myself properly with it, sure enough my productivity using it has reached heights to which I never got near with YUI (2.7 was the latest version I was using).</p>
<p>Another thing that I noticed was that I am actually writing a lot more productive code, rather than implementing bits of script that I change from all over the web. All the functions I need seem to be in the core library.</p>
<p>So right now, I am making many progressive enhancements to our App and it feels all the better for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/05/17/switching-from-yui-to-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django 1.2 release</title>
		<link>http://blog.timc3.com/2010/05/15/django-1-2-release/</link>
		<comments>http://blog.timc3.com/2010/05/15/django-1-2-release/#comments</comments>
		<pubDate>Sat, 15 May 2010 08:07:46 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=801</guid>
		<description><![CDATA[It was just announced that Django 1.2 will be released on May 17th, which is in 3 days time.
Been waiting a while for this one to go to production release so I am really glad. The new messages framework looks much better, and I also love the date i18n features &#8211; something that really helps [...]]]></description>
			<content:encoded><![CDATA[<p>It was just announced that Django 1.2 will be released on May 17th, which is in 3 days time.</p>
<p>Been waiting a while for this one to go to production release so I am really glad. The new messages framework looks much better, and I also love the date i18n features &#8211; something that really helps on a project at Cantemo where we have to deal with ISO formatted datetimes.</p>
<p>Now the users will be able to choose how their dates are displayed on individual systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/05/15/django-1-2-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMWare Ubuntu IP address change</title>
		<link>http://blog.timc3.com/2010/05/04/vmware-ubuntu-ip-address-change/</link>
		<comments>http://blog.timc3.com/2010/05/04/vmware-ubuntu-ip-address-change/#comments</comments>
		<pubDate>Tue, 04 May 2010 16:00:11 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=798</guid>
		<description><![CDATA[I always have this problem when moving VMWare images of Ubuntu, the most recent of a 10.04 LTS Server. Whenever you move or copy a VMWare image it assigns a new Mac address and Ubuntu starts without properly bringing up the interface.
Really annoying when you are using VMWare server without a console.
To make it grab [...]]]></description>
			<content:encoded><![CDATA[<p>I always have this problem when moving VMWare images of Ubuntu, the most recent of a 10.04 LTS Server. Whenever you move or copy a VMWare image it assigns a new Mac address and Ubuntu starts without properly bringing up the interface.</p>
<p>Really annoying when you are using VMWare server without a console.</p>
<p>To make it grab the IP Address again, simply remove the rule:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>udev<span style="color: #000000; font-weight: bold;">/</span>rules.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">70</span>-persistent-net.rules</div></div>
<p>Then restart.</p>
<p>Of course before you move the image you could remove the rule and not have them problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/05/04/vmware-ubuntu-ip-address-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python plugin systems</title>
		<link>http://blog.timc3.com/2010/04/22/python-plugin-systems/</link>
		<comments>http://blog.timc3.com/2010/04/22/python-plugin-systems/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 11:01:17 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=788</guid>
		<description><![CDATA[There is a lot of interesting information about creating plugin architectures using Python all over the web, but its in fairly disparate places. This is an overview of the documentation that I found as of April 2010.
Firstly Dr André Roberge has some very interesting posts, as well as a talk at PyCon 2009 on Blip.tv [...]]]></description>
			<content:encoded><![CDATA[<p>There is a lot of interesting information about creating plugin architectures using Python all over the web, but its in fairly disparate places. This is an overview of the documentation that I found as of April 2010.</p>
<p>Firstly <strong>Dr André Roberge</strong> has some very interesting posts, as well as a talk at PyCon 2009 on Blip.tv entitled <a href="http://blip.tv/file/1949302/">Plugins and monkeypatching: increasing flexibility, dealing with inflexibility</a>. He is also the author of Crunchy which uses a <a href="http://pytute.blogspot.com/2007/04/python-plugin-system.html">plugin system</a>. He goes on to write about his experiences in creating a plugin architecture on his blog, over 6 parts starting <a href="http://aroberge.blogspot.com/2008/12/plugins-part-1-application.html"> here  on part 1</a>.</p>
<p><strong>Marty Alchin</strong>, the author of Pro Django has an interesting couple of pages in that same book about creating a simple plugin system, and the snippet of code is on<a href="http://www.djangosnippets.org/snippets/542/"> djangosnippets.com</a>. He also has an excellent blog post about <a href="http://martyalchin.com/2008/jan/10/simple-plugin-framework/">implementing a plugin architecture</a>, it also talks about Django but is fairly non-specific.</p>
<p><strong>William E. Hart</strong> over 2009-2010 has also been researching Python Plugin Frameworks, <a href="http://wehart.blogspot.com/2009/01/python-plugin-frameworks.html">his overview is on his blog</a> and he is also the author of the <a href="http://pypi.python.org/pypi/pyutilib.component.doc/1.0.1"><strong>PyUtilib Component Architecture</strong></a>. This was very recently released and so hasn&#8217;t gathered much momentum as of this post but looks very promising indeed.</p>
<p><strong>Zope</strong>. The big one is the<a href="http://wiki.zope.org/zope3/ComponentArchitectureOverview"> Zope Component Architecture</a>. I must admit, that looking into it I think its overkill, I don&#8217;t like the configuration utility or the overhead it introduces &#8211; just to use it requires a lot of extra Zope modules. However google for it if you are interested in learning further.</p>
<p><strong>Yapsy.</strong> <a href="http://yapsy.sourceforge.net/">Yapsy</a> is interesting, looks extremely lightweight, has been around for a few years, is currently on version 1.7 and serves as a good starting point. It has no external dependancies.</p>
<p><strong>SprinklesPy</strong>. <a href="http://termie.pbworks.com/SprinklesPy">SprinklesPy</a> is also very lightweight but I am not sure that development is active on it (2006 was the last mention of it being used that I found), or that it has anyone in the community using it (a benefit I believe if you are implementing a system that you are not creating yourself.)</p>
<p><strong>Trac</strong> is the one component architecture that frequently gets mentioned, and it has a very decent user base. However, ripping the plugin system out might be more work than is reasonable. </p>
<p>Examples of Plugin use in the wild:</p>
<ul>
<li><a href="http://code.google.com/p/oohembed">http://code.google.com/p/oohembed</a></li>
</ul>
<p>Other interesting links:</p>
<ul>
<li><a href="http://www.charlesleifer.com/blog/looking-registration-patterns-django/">http://www.charlesleifer.com/blog/looking-registration-patterns-django/</a></li>
<li><a href="http://stackoverflow.com/questions/932069/building-a-minimal-plugin-architecture-in-python">Stackoverflow thread on minimal plugin architectures</a></li>
<li><a href="http://live.gnome.org/Gedit/PythonPluginHowTo">http://live.gnome.org/Gedit/PythonPluginHowTo</a></li>
</ul>
<p>It is clear to <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> that there is no correct way of implementing plugins and you have to pick based upon the needs of your project, but this should serve as a good starting point. I will add and update this post as my knowledge grows.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/04/22/python-plugin-systems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VMWare player IP address</title>
		<link>http://blog.timc3.com/2010/04/09/vmware-player-ip-address/</link>
		<comments>http://blog.timc3.com/2010/04/09/vmware-player-ip-address/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 12:21:05 +0000</pubDate>
		<dc:creator>timc3</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[vmnetcfg]]></category>
		<category><![CDATA[vmware player]]></category>

		<guid isPermaLink="false">http://blog.timc3.com/?p=784</guid>
		<description><![CDATA[This was something that really annoyed me when trying to configure VMWare Player 3, there seemed to be no easy way of changing the IP address range or the DHCP addresses when using Windows as the host OS.
Actually there is but in a stroke of genius by VMWare it isn&#8217;t installed properly. The program that [...]]]></description>
			<content:encoded><![CDATA[<p>This was something that really annoyed <a target="_self" href="mailto:tim@nospamplease.timc3.com">me</a> when trying to configure VMWare Player 3, there seemed to be no easy way of changing the IP address range or the DHCP addresses when using Windows as the host OS.</p>
<p>Actually there is but in a stroke of genius by VMWare it isn&#8217;t installed properly. The program that you require is called vmnetcfg.exe and is included in the installer but isn&#8217;t installed. Its really difficult to find anything about it on VMWare&#8217;s site so to get to it:</p>
<p>1. Run the installer with /e option. For example:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">VMware-player-3.0.0-<span style="color: #000000;">197124</span>.exe <span style="color: #000000; font-weight: bold;">/</span>e vm</div></div>
<p>All contents will be extracted to &#8220;vm&#8221; folder.</p>
<p>2. Open &#8220;network.cab&#8221; and copy vmnetcfg.exe to your installation folder,<br />
typically &#8220;C:\Program Files\VMware\VMware Player\&#8221;. </p>
<p><a href="http://blog.timc3.com/wp-content/uploads/2010/04/vmware.jpg"><img src="http://blog.timc3.com/wp-content/uploads/2010/04/vmware-300x225.jpg" alt="" title="vmware" width="300" height="225" class="alignright size-medium wp-image-785" /></a></p>
<p>Now you can use vmnetcfg.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc3.com/2010/04/09/vmware-player-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
