<?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>JamieRF</title>
	<atom:link href="http://www.jamierf.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamierf.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 25 Sep 2011 21:37:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Securely storing passwords using PHP</title>
		<link>http://www.jamierf.co.uk/2011/05/09/securely-storing-passwords-using-php/</link>
		<comments>http://www.jamierf.co.uk/2011/05/09/securely-storing-passwords-using-php/#comments</comments>
		<pubDate>Mon, 09 May 2011 18:46:54 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fluxbb]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=2550</guid>
		<description><![CDATA[Password hashing is an interesting subject, which I have been working on enhancing in FluxBB v2. Here I&#8217;m going to provide an introduction to storing passwords securely, and share some thoughts as well as our solution. Note: I am talking about hashing opposed to encryption. Many people use the terms interchangeably, however they are very different [...]]]></description>
			<content:encoded><![CDATA[<p>Password hashing is an interesting subject, which I have been working on enhancing in FluxBB v2. Here I&#8217;m going to provide an introduction to storing passwords securely, and share some thoughts as well as our solution.</p>
<p><em><strong>Note:</strong> I am talking about hashing opposed to encryption. Many people use the terms interchangeably, however they are very different operations and should not be confused.</em></p>
<ul>
<li><em><a href="http://en.wikipedia.org/wiki/Hash_function">Hash functions</a> convert variable sized data into a fixed sized result. They are deterministic and one-way &#8211; the same input always hashes to the same output, which cannot be reversed. Hashes have many more useful properties, but for storing passwords the important point is they cannot be reversed.</em></li>
<li><em><a href="http://en.wikipedia.org/wiki/Encryption">Encryption</a> is the process of transforming information to make it unreadable to anyone without the decryption key. The important difference is the ability to recover the original data given the correct decryption key.</em></li>
</ul>
<p><em>In the situation where the database in compromised and users password hashes are exposed, it is a good bet that any decryption key we have stored could also be compromised. Since we have no need to know the users actual password (we can check for a valid login by hashing their input and comparing to the stored hash) we should <strong>never</strong> use encryption for storing passwords.</em></p>
<p><em><span id="more-2550"></span></em></p>
<h1>Hashing the password</h1>
<p>At first glance password hashing seems like an incredibly simple problem &#8211; just run the password through a well known hash function and job done. Most advice these days seems to suggest the use of <a href="http://en.wikipedia.org/wiki/SHA-1">SHA-1</a> or <a href="http://en.wikipedia.org/wiki/SHA-2">SHA-2</a>.</p>
<h2>Hashing</h2>
<p>SHA-1/2 are hash functions, designed by the NSA. Like all hash functions, they are one-way, so given a database of password hashes an attacker cannot reverse them. However passwords hashed using a simple hash function are still vulnerability to reversing using <a href="http://en.wikipedia.org/wiki/Rainbow_table">rainbow tables</a>. Rainbow tables are mappings of resulting hash -&gt; original password for dictionaries of common passwords, etc. To combat rainbow table attacks many people suggest the use of per-user salts.</p>
<h2>Hashing + salt</h2>
<p>A salt is a randomly generated string which is appended to a users password before hashing. This randomly generated string prevents the use of pre-generated rainbow tables as it increases the complexity and length of the final password, and hence the size of rainbow tables required are infeasibly large &#8211; the only solution is for an attacker to attempt a brute force attack using the correct salt.</p>
<p>Thanks to advances in parallel computing and graphics card technology, this is now a viable solution. Various tools such as <a href="http://golubev.com/hashgpu.htm">IGHASHGPU</a> and <a href="http://whitepixel.zorinaq.com">whitepixel</a> now exist &#8211; with whitepixel boasting as many as <a href="http://blog.zorinaq.com/?e=43">33.1 billion</a> MD5 hashed password attempts per second using just 4 AMD Radeon 5970s.</p>
<h2><a href="http://en.wikipedia.org/wiki/Key_stretching">Key stretching</a></h2>
<p>Key stretching refers to techniques used to increase the time it takes to test a password &#8211; and hence decreasing the number of brute force password attempts that can be made per second. Using plain hashing algorithms we are talking one millionth of a second to generate a single hash on a regular CPU, or in the order of one billionth of a second using the above mentioned GPU software. If we can increase the time taken to generate a single attempt to 10s of milliseconds then we have effectively cut the brute force attempts by 4 or 5 orders of magnitude. In the situation where a legitimate user is attempting a login, an extra 10ms is in most cases unnoticeable.</p>
<h3>BCrypt (<a href="http://en.wikipedia.org/wiki/Blowfish_(cipher)">Blowfish</a> encryption)</h3>
<p>I started this post by emphasising the difference between hashing and encryption, and stating that encryption should never be used for storing passwords &#8211; so you might be asking yourself why I am now talking about encryption?</p>
<p>BCrypt is an algorithm for irreversibly obscuring passwords using the blowfish encryption algorithm. It is important to understand that BCrypt does not simply encrypt passwords &#8211; the process is still a one-way process, just like hashing. BCrypt works by encryption a magic string, using a key derived from the provided password. The encrypted magic string is stored in the database, but the derived key is never stored.</p>
<p>The blowfish algorithm is important, as the amount of work done to encrypt a string, and hence time taken, is tuned using a cost parameter. By increasing this cost factor we can increase the time taken to test a password.</p>
<p>BCrypt is available as of PHP 5.3+, using the <a href="http://www.php.net/manual/en/function.crypt.php">crypt</a> function.</p>
<div id="layout_2">
<div id="content">
<div id="function.crypt">
<div>
<blockquote><p><strong>crypt()</strong> will return a hashed string using the standard Unix <abbr>DES</abbr>-based algorithm or alternative algorithms that may be available on the system.</p>
<p><strong><tt>CRYPT_BLOWFISH</tt></strong> &#8211; Blowfish hashing with a salt as follows: &#8220;$2a$&#8221;, a two digit cost parameter, &#8220;$&#8221;, and 22 base64 digits from the alphabet &#8220;./0-9A-Za-z&#8221;. Using characters outside of this range in the salt will cause crypt() to return a zero-length string. The two digit cost parameter is the base-2 logarithm of the iteration count for the underlying Blowfish-based hashing algorithmeter and must be in range 04-31, values outside this range will cause crypt() to fail.</p></blockquote>
</div>
</div>
</div>
</div>
<h3><a href="http://en.wikipedia.org/wiki/PBKDF2">PBKDF2</a></h3>
<p>PBKDF2 (Password-Based Key Derived Function) is a function to produce derived keys by repeatedly hashing the input many times. I&#8217;m not going to attempt to explain PBKDF2 in detail, however by tuning the number of times to repeatedly hash the input the cost can be increased, in the same way as for BCrypt. PBKF2 is used by some well known protocols/systems, such as WPA/WPA2, <a href="http://www.gnu.org/software/grub/">Grub 2</a>, and <a href="https://lastpass.com">LastPass</a>.</p>
<h1>Generating random data with PHP</h1>
<p>Generating random data doesn&#8217;t sound like it should be challenging, and indeed it is not &#8211; however generating cryptographically strong random data is a bit harder.</p>
<p>The default random number source used by PHP is not considered to be cryptographically strong &#8211; however not to worry, there are various sources of cryptographically strong random data on most systems.</p>
<h3>PHP 5.3+, OpenSSL extension</h3>
<p>The OpenSSL extension, included by default in PHP 5.3+, provides a source of cryptographically strong random data.</p>
<div id="layout_2">
<div id="content">
<div id="function.openssl-random-pseudo-bytes">
<div>
<blockquote><p><strong><a href="http://www.php.net/manual/en/function.openssl-random-pseudo-bytes.php">openssl_random_pseudo_bytes</a></strong> — Generate a pseudo-random string of bytes</p>
<p>Generates a <a href="http://www.php.net/manual/en/language.types.string.php">string</a> of pseudo-random bytes, with the number of bytes determined by the <em><tt>length</tt></em> parameter.</p>
<p>It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes, and does this via the optional <em><tt>crypto_strong</tt></em> parameter. It&#8217;s rare for this to be <strong><tt>FALSE</tt></strong>, but some systems may be broken or old.</p></blockquote>
</div>
</div>
</div>
</div>
<h3>/dev/urandom</h3>
<p>For Linux/UNIX systems, cryptographically strong random data is produced from the device unlocked random, /dev/urandom. This can be read using the regular file access functions in PHP.</p>
<h3>Microsoft CSP (Cryptographic Service Provider)</h3>
<p>The Microsoft Cryptographic Service Provider API provides a source of cryptographically strong random data on Microsoft Windows systems. It can be accessed using the <a href="http://www.php.net/manual/en/class.com.php">COM</a> interface.</p>
<h1>Solution used in FluxBB v2</h1>
<p>For FluxBB v2 I have produced a <a href="https://github.com/fluxbb/password">library</a> which makes use of BCrypt when available on the system (PHP 5.3+), and falls back to PBKDF2 otherwise. Cryptographically strong random data is obtained using the OpenSSL extension if available, will fall back to /dev/urandom, or in the worse case PHPs built in non-cryptographically-strong functions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2011/05/09/securely-storing-passwords-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Java-based MORPG &#8211; the beginning</title>
		<link>http://www.jamierf.co.uk/2011/05/08/a-java-based-morpg-the-beginning/</link>
		<comments>http://www.jamierf.co.uk/2011/05/08/a-java-based-morpg-the-beginning/#comments</comments>
		<pubDate>Sun, 08 May 2011 19:52:56 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[morpg]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=2543</guid>
		<description><![CDATA[For years I have been drawn by the idea of creating a MORPG. My first stab, back in 2007, involved development of an emulated server for an existing game, allowing me to concentrate on server development without any of the complications associated with client development or even storyline development. In 2008 I undertook a project [...]]]></description>
			<content:encoded><![CDATA[<p>For years I have been drawn by the idea of creating a <abbr title="Multiplayer Online Role-Playing Game">MORPG</abbr>. My first stab, back in 2007, involved development of an <a href="http://en.wikipedia.org/wiki/Server_emulator">emulated server</a> for an existing game, allowing me to concentrate on server development without any of the complications associated with client development or even storyline development.</p>
<p>In 2008 I undertook a project entitled &#8220;Creation of a MORPG framework using Apache MINA and jMonkeyEngine&#8221; as part of my final year at university. The aim of this project was to effectively take what I had learned and turn it into a legitimate project, and investigate the viability of the game engine <a href="http://jmonkeyengine.com">jMonkeyEngine</a> for our game client. While this project worked to an extent, and in fact won me the Best Student Project 2008/9, I decided that jMonkeyEngine was providing much more than I needed or wanted. The original plan had been to continue work on the project after university, however after my dissertation was completed the project was dropped.</p>
<p>This year I decided to revisit the project, and started work on a new game client &#8211; this time avoiding any existing game engines, and making direct use of OpenGL (though <a href="http://jogamp.org/jogl/www/">JOGL</a>). In the future I may try and write some blog posts with technical details or plans, however for now I just wanted to post a few screen-shots to prove it is at least vaguely working&#8230;</p>

<div class="ngg-galleryoverview" id="ngg-gallery-35-2543">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-3298" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_001.png" title=" " rel="lightbox[set_35]" >
								<img title="Login screen" alt="Login screen" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_001.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3299" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_002.png" title=" " rel="lightbox[set_35]" >
								<img title="Logged in" alt="Logged in" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_002.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3300" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_003.png" title=" " rel="lightbox[set_35]" >
								<img title="Inventory" alt="Inventory" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_003.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3301" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_004.png" title=" " rel="lightbox[set_35]" >
								<img title="Zoomed in" alt="Zoomed in" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_004.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3302" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_005.png" title=" " rel="lightbox[set_35]" >
								<img title="Zoomed out" alt="Zoomed out" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_005.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3303" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_006.png" title=" " rel="lightbox[set_35]" >
								<img title="Multiple players" alt="Multiple players" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_006.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3304" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_007.png" title=" " rel="lightbox[set_35]" >
								<img title="Sending a PM" alt="Sending a PM" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_007.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3305" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.jamierf.co.uk/wp-content/gallery/morpg/test-client_008.png" title=" " rel="lightbox[set_35]" >
								<img title="Receiving a PM" alt="Receiving a PM" src="http://www.jamierf.co.uk/wp-content/gallery/morpg/thumbs/thumbs_test-client_008.png" width="200" height="150" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2011/05/08/a-java-based-morpg-the-beginning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updating BIOS for Asus EEE 1201N</title>
		<link>http://www.jamierf.co.uk/2010/06/04/updating-bios-for-asus-eee-1201n/</link>
		<comments>http://www.jamierf.co.uk/2010/06/04/updating-bios-for-asus-eee-1201n/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 11:19:18 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eee]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=719</guid>
		<description><![CDATA[This is just a quick post for anyone looking to update the BIOS for their Asus EEE 1201N. As of writing, the latest is BIOS version 0326, though a full list can be found on Asus website, or directly from their FTP server (holy crap it&#8217;s slow&#8230;). Format a USB stick using FAT (or possibly [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post for anyone looking to update the BIOS for their Asus EEE 1201N. As of writing, the latest is BIOS version 0326, though a full list can be found on <a href="http://support.asus.com/download/download.aspx?model=Eee%20PC%201201N&amp;os=29">Asus website</a>, or directly from their <a href="ftp://ftp.asus.com.tw/pub/asus/EeePC/1201N/">FTP server</a> (holy crap it&#8217;s slow&#8230;).</p>
<p><span id="more-719"></span></p>
<ol>
<li>Format a USB stick using FAT (or possibly FAT32). It&#8217;s worth noting that the EZ Flash utility seems to dislike certain USB sticks, rejecting my 4GB iamaKey though accepting my 1GB so-old-that-the-brand-has-warn-off drive.</li>
<li>Unzip the new BIOS.</li>
<li>Rename the file to 1201N.ROM (case sensitive!).</li>
<li>Move it to the root of the USB stick.</li>
<li>Put the USB stick in the 1201N (if you prepared it elsewhere), and make sure all other USB devices are removed.</li>
<li>Reboot/Turn-on the 1201N.</li>
<li>Enter the BIOS (F2) and note any settings, then reset the BIOS to default settings. This is especially important if you have over-clocked or anything similar. Save and Exit (F10).</li>
<li>When the 1201N reboots, press and hold ALT+F2 to enter the EZ Flash utility.</li>
<li>The EZ Flash utility should automatically perform the update then reboot. Note: This took a long time for me (10mins+), it may be because I was using such an ancient and slow USB stick, or may just be an incredibly slow process.</li>
<li>Enter the BIOS again (F2) and put back any custom settings you had. Save and Exit (F10).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2010/06/04/updating-bios-for-asus-eee-1201n/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extensible PHP software: Hooks &amp; patches</title>
		<link>http://www.jamierf.co.uk/2010/02/08/extensible-php-software-hooks-patches/</link>
		<comments>http://www.jamierf.co.uk/2010/02/08/extensible-php-software-hooks-patches/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 18:32:41 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fluxbb]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=321</guid>
		<description><![CDATA[In thinking about FluxBB 2.0, one of the important goals is to come up with a well designed and easy to use extension system. The days of manually digging into the code are past, people now expect to be able to install an extension with one click. In PunBB 1.3 (which we forked into FluxBB [...]]]></description>
			<content:encoded><![CDATA[<p>In thinking about FluxBB 2.0, one of the important goals is to come up with a well designed and easy to use extension system. The days of manually digging into the code are past, people now expect to be able to install an extension with one click.</p>
<p>In PunBB 1.3 (which we forked into FluxBB 1.3 Legacy), Rickard introduced the use of hooks and eval, to allow extensions to insert code and extend the core software. Originally this system was designed to allow small changes, but by the time the software was finished it had mutated into a full blown extension system.</p>
<p>Along with the disadvantages inherent from a hook system (see below), FluxBB 1.3 Legacy used a rather horrible system of PHP code within XML code, which was parsed and inserted into the database on install. The aim was that then the install files could be deleted or overwritten and the extension wouldn&#8217;t be affected until it was uninstalled/updated. However due to the fact that most extensions referenced external files (be it included php files, or css and images) this theory did not work very well.</p>
<p>So, going back to the beginning, what are the different solutions available for writing extensible PHP software?</p>
<p><span id="more-321"></span></p>
<h3>Hooks</h3>
<p>Hooks are probably the most common way used to make PHP software extensible. The idea is fairly simple; throughout the code there are &#8220;hooks&#8221;, where extensions can insert code. Below is an example hook taken from FluxBB 1.3 Legacy:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;color: #FCFFBA;color: black;"><span style="color: #b1b100;color: #B83A24;">if</span> <span style="color: #009900;color: #000;">&#40;</span><span style="color: #990000;color: #B83A24;">isset</span><span style="color: #009900;color: #000;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;color: #000;">&#91;</span><span style="color: #0000ff;">'form_sent'</span><span style="color: #009900;color: #000;">&#93;</span><span style="color: #009900;color: #000;">&#41;</span><span style="color: #009900;color: #000;">&#41;</span>
<span style="color: #009900;color: #000;">&#123;</span>
	<span style="color: #009900;color: #000;">&#40;</span><span style="color: #000088;">$hook</span> <span style="color: #339933;color: #000;">=</span> get_hook<span style="color: #009900;color: #000;">&#40;</span><span style="color: #0000ff;">'po_form_submitted'</span><span style="color: #009900;color: #000;">&#41;</span><span style="color: #009900;color: #000;">&#41;</span> ? <span style="color: #990000;color: #B83A24;">eval</span><span style="color: #009900;color: #000;">&#40;</span><span style="color: #000088;">$hook</span><span style="color: #009900;color: #000;">&#41;</span> <span style="color: #339933;color: #000;">:</span> <span style="color: #009900; font-weight: bold;color: #343832;">null</span><span style="color: #339933;color: #000;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;color: green;">// Make sure form_user is correct</span></pre></div></div>

<p>In the above example the get_hook method will look for all the code which has been registered with the hook &#8220;po_form_submitted&#8221;, combine it and return it. The code will then be executed using the <a href="http://uk2.php.net/manual/en/function.eval.php">eval</a> function.</p>
<p>The disadvantages of the hook system should be fairly obvious&#8230;</p>
<ul>
<li><span style="background-color: #ffffff;">Blocks of code can be inserted, but only at pre defined locations within the software. This means extra thought has to be given during development as to where hooks may be required. If someone writing an extension needs a hook in a place where there isn&#8217;t one, then they are out of luck.</span></li>
<li><span style="background-color: #ffffff;">Insertion of code is all very well, but what if we want to change or remove some existing code? There is no way to do this using hooks. This leads to extensions with rather &#8220;interesting&#8221; algorithms to attempt to undo or block code in the core, which can be both messy and inefficient.</span></li>
</ul>
<p>Despite these rather major sounding disadvantages, I would argue hooks are good! At least much better than requiring users to change code by hand&#8230;</p>
<p>In the example code given above the eval function was used to execute the inserted code, but where is the code actually stored, and is this the best way to execute it? There are a few options:</p>
<ul>
<li>Store the code in a database or XML etc. then load and eval it when required. This probably isn&#8217;t the best solution as it involves storing code in the database or other storage that isn&#8217;t designed for code. Caching would probably also be required, loading and parsing a large XML file on every page load would not be efficient.</li>
<li>Keep the code for each hook in an individual PHP file and include it when required. This option seems reasonable, but could result in having a huge amount of tiny files being included, which could be hard to organize and may not be ideal if the server isn&#8217;t running any form of opcode cache.</li>
<li>Keep the code all in one PHP file and register specific functions with each hook, then call these when required. This seems like the best solution, but introducing functions introduces problems of variable scope. The underlying code would need to be written carefully in a way that appropriate variables can be passed to each hook.</li>
</ul>
<h3>Patches</h3>
<p>A totally different approach to extending PHP software is patching it. In a similar way to how a <a href="http://en.wikipedia.org/wiki/Patch_(Unix)">patch file</a> is used, the software could read instructions from an extension and physically modify the appropriate code.</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;color: #FCFFBA;color: black;"><span style="color: #440088;">@@ -58,7 +58,9 @@</span>
 // Did someone just hit &quot;Submit&quot; or &quot;Preview&quot;?
 if <span style="color: #000;">&#40;</span>isset<span style="color: #000;">&#40;</span>$_POST<span style="color: #000;">&#91;</span>'form_sent'<span style="color: #000;">&#93;</span><span style="color: #000;">&#41;</span><span style="color: #000;">&#41;</span>
 <span style="color: #000;">&#123;</span>
<span style="color: #991111;">-	// Make sure form_user is correct</span>
<span style="color: #00b000;">+	// This is some new code</span>
<span style="color: #00b000;">+	$username = isset<span style="color: #000;">&#40;</span>$_POST<span style="color: #000;">&#91;</span>'username'<span style="color: #000;">&#93;</span><span style="color: #000;">&#41;</span> ? $_POST<span style="color: #000;">&#91;</span>'username'<span style="color: #000;">&#93;</span> : null;</span>
<span style="color: #00b000;">+</span></pre></div></div>

<p>This means that once the extension has been installed, there is no extension code left to worry about; the physical files have been changed and the extension installation files can be removed.</p>
<p>At first this may seem like a much better solution than hooks; code can be inserted/changed/deleted anywhere in any files, there is no need to litter hooks all over the place. However it has three major disadvantages:</p>
<ul>
<li>Often in shared hosting environments PHP will be configured to run as a certain unix user (usually &#8220;www-data&#8221; or &#8220;nobody&#8221;). For the software to be able to patch itself, all files would require to be writeable by that user. This could prove to be a major security flaw as it would allow other users on the server to modify your files. A work around for this could be to modify the files over (S)FTP instead, but then the user would need to provide their hosting login details.</li>
<li>Updating the core software becomes harder. Since the files have been physically modified it is no longer a simple task to replace them with updated files. In theory core updates could be applied the same way extensions are installed (i.e. as patches), but with a modified board conflicts are fairly likely, and code that been removed by extensions is likely to just be replaced when the core is updated.</li>
<li>An extension with a bug, or even a malicious extension, could render the whole software unusable by deleting sections of code or inserting invalid code. Since the actual files would have physically been overwritten there would be no way to recover from this, other than the user manually uploading a backup (if they were organized enough to have one!).</li>
</ul>
<p>To me this seems like a rather show stopping problem, what&#8217;s the point in a one-click install system if uninstallation can require manually removing the changes. The idea of a buggy extension being able to totally destroy a working install is not acceptable!</p>
<h3>Conclusions</h3>
<p>What will be use in FluxBB 2.0? Only time will tell, but I&#8217;m currently leaning towards making use of hooks again, but attaching functions loaded from native PHP scripts, rather than chunks of code to be evaled.</p>
<p>Have any suggestions or better ideas? Please leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2010/02/08/extensible-php-software-hooks-patches/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Software RAID-5: using mdadm in Ubuntu 9.10</title>
		<link>http://www.jamierf.co.uk/2009/11/04/software-raid-5-using-mdadm-in-ubuntu-9-10/</link>
		<comments>http://www.jamierf.co.uk/2009/11/04/software-raid-5-using-mdadm-in-ubuntu-9-10/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:53:54 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=313</guid>
		<description><![CDATA[As a follow on to my post about choosing RAID, here is a quick guide to setting up RAID-5 using mdadm. In theory this should apply to any distro that has mdadm, but I was already running Ubuntu 9.10 (just upgraded yesterday actually!). Note: RAID-5 requires a minimum of 3 drives, and all should be [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow on to my post about <a href="http://www.jamierf.co.uk/2009/10/30/choosing-raid/">choosing RAID</a>, here is a quick guide to setting up RAID-5 using <a href="http://en.wikipedia.org/wiki/Mdadm">mdadm</a>. In theory this should apply to any distro that has mdadm, but I was already running Ubuntu 9.10 (just upgraded yesterday actually!).</p>
<p><strong>Note</strong>: RAID-5 requires a minimum of 3 drives, and all should be the same size. It provides the ability for one drive to fail without any data loss.</p>
<pre>Usable space = (no. of drives - 1) * size of smallest drive</pre>
<p>In my set up I started with 3x 1.5TB drives, giving 3.0TB usable space. I have now grown it to 4x 1.5TB drives, giving 4.5TB usable space.</p>
<p><span id="more-313"></span></p>
<h3>Required software</h3>
<p>To create, format and resize the array we need to use various filesystem manipulation tools, but they should all come with Ubuntu. The only software you should need to install is mdadm.</p>
<pre>sudo aptitude install mdadm</pre>
<h3>Initial setup</h3>
<h4>1. Preparing the drives</h4>
<p>Before we jump into creating the actual RAID array, we first need to prepare partitions for the array to use. This can be done using a GUI tool such as GParted (available in the Ubuntu repositories), but I prefer using the terminal.</p>
<p>To get a list of available drives/partitions:</p>
<pre>sudo fdisk -l</pre>
<p>This will output, for each drive you have, something along the lines of:</p>
<pre>Disk <span style="color: #ff0000;">/dev/sda</span>: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000f1f05</pre>
<p>There may well be slightly more information available too if you already have some partitions made. From here note the name of the drives you wish to use (for example, /dev/sda). For each drive, create a partition and mark it as a RAID partition.</p>
<pre>sudo fdisk <span style="color: #ff0000;">/dev/sda</span></pre>
<p>This will open up fdisk, the partition manager. If you already have any partitions on the drive you should first delete them (obviously this will erase any data on them!). To create one partition that is the size of the whole drive:</p>
<pre>Command (m for help): <strong>n</strong>
Command action
	e	extended
	p	primary partition (1-4)
<strong>p</strong>
Partition number (1-4): <strong>1</strong>
First cylinder (1-182401, default 1): <span style="color: #ff0000;"><strong>[blank]</strong></span>
Last cylinder or +size or +sizeM or +sizeK (1-182401, default 182401): <span style="color: #ff0000;"><strong>[blank]</strong></span></pre>
<p>When choosing the first and last cylinder simply hitting return will use the default values (which are probably the values you actually want).</p>
<p>Next we will mark the partition as being part of a RAID array, allowing mdadm to automatically detect it:</p>
<pre>Command (m for help): <strong>t</strong>
Partition number (1-4): <strong>1</strong>
Hex code (type L to list codes): <strong>fd</strong>
Changed system type of partition 1 to fd (Linux raid auto)</pre>
<p>So far our changes haven&#8217;t actually been written to disk, so finally,<span style="background-color: #ffffff;"> issue the command to write the changes to disk.</span></p>
<pre>Command (m for help): <strong>w</strong>
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.</pre>
<p>Remember to repeat this step for each drive you wish to use in the array.</p>
<h4>2. Creating the array</h4>
<p>To create the array, we use the mdadm create flag (who&#8217;d have guessed that!). We also need to specify what RAID level we want, as well as how many devices and what they are.</p>
<pre>sudo mdadm --create --verbose <span style="color: #ff0000;">/dev/md0</span> --level=5 --raid-devices=<span style="color: #ff0000;">3</span> <span style="color: #ff0000;">/dev/sda1</span> <span style="color: #ff0000;">/dev/sdb1</span> <span style="color: #ff0000;">/dev/sdc1</span></pre>
<p>The verbose flag tells it to output extra information. In the above command I am creating a RAID-5 array at /dev/md0, using 3 partitions. If you already have a RAID array set up then you may need to use /dev/md1 for example. The number of partitions you are using, and their names will probably be different, so do not just copy and paste all of the command above. Note that the partition name is something like /dev/sda1, whereas the drive name is something like /dev/sda; the 1 refers to the partition number.</p>
<p>While the array is being built you can view its status in the file /proc/mdstat. Here the <a href="http://en.wikipedia.org/wiki/Watch_(Unix)">watch</a> command comes in handy:</p>
<pre>sudo watch cat /proc/mdstat</pre>
<p>This will output the contents of the file to the screen, refreshing every 2 seconds (by default). While the array is being built it will show how much of the &#8220;recovery&#8221; has been done, and an estimated time remaining.</p>
<p>Now that we have set up the array, we need to edit the mdadm configuration so it knows how to reassemble it when the system boots.</p>
<pre>sudo nano /etc/mdadm/mdadm.conf</pre>
<p>There should already be some sample configuration here:</p>
<pre># by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
<span style="color: #ff0000;">ARRAY /dev/md0 level=raid5 num-devices=3 UUID=31283299:0c118170:8b4eb9a8:4e935bf2</span></pre>
<p>The ARRAY line probably doesn&#8217;t already exist. It is used to describe an array (such as the one we just created). While similar, your array will not be the same as mine above so do not just copy and paste it! Luckily, mdadm provides a utility to fetch this line exactly (by looking for partitions marked as belonging to a RAID array, as we did when preparing the drives):</p>
<pre>sudo mdadm --detail --scan</pre>
<p>If you add the &#8211;verbose flag here it will also output the devices which are part of the array. Because we marked the partitions as being part of a RAID array mdadm can find them automatically so this isn&#8217;t required in our case, but it may be if you have more than one RAID array in your machine.</p>
<p>Now, I decided to wait for the array to finish syncing before moving on, but you should be able to continue and format the array while it syncs if you wish. In my case, building the array with 3x 1.5TB drives took around 6 hours.</p>
<h4>3. Creating and mounting the filesystem</h4>
<p>Now that the array is built we need to format it. What filesystem you choose is up to you, but I would probably recommend ext3.  <strong>Note</strong>: For my array I chose to use ext4. So far I have not had any problems, but ext4 is still fairly new and there are still various bug reports going around mentioning data loss [<a href="http://bugzilla.kernel.org/show_bug.cgi?id=14354">bugzilla.kernel.org</a>] (which I conveniently didn&#8217;t notice until after!).</p>
<pre>sudo mkfs.ext3 <span style="color: #ff0000;">/dev/md0</span></pre>
<p>This will take a while, especially if your array is large.</p>
<p>If you chose to use ext2/3/4 you should also be aware of reserved space. By default ext2/3/4 will reserve 5% of the drives space, which only root is able to write to. This is done so a user cannot fill the drive and prevent critical daemons writing to it, but 5% of a large RAID array which isn&#8217;t going to be written to by critical daemons anyway, is a lot of wasted space.  I chose to set the reserved space to 0%, using tune2fs:</p>
<pre>sudo tune2fs -m 0 <span style="color: #ff0000;">/dev/md0</span></pre>
<p>Next we should add the array to the fstab, so that it will automatically be mounted when the system boots up. This can be done by editing the file /etc/fstab. For more detailed information, see the <a href="http://en.wikipedia.org/wiki/Fstab">fstab</a> Wikipedia article.</p>
<pre>sudo nano /etc/fstab</pre>
<p>Your fstab should already contain a few entries (if it doesn&#8217;t something is wrong!). At the bottom add a line similar to the following:</p>
<pre><span style="color: #ff0000;">/dev/md0</span>	<span style="color: #ff0000;">/mnt/raid</span>	<span style="color: #ff0000;">ext4</span>	defaults	0	0</pre>
<p>I chose to mount my array on /mnt/raid, but you may well wish to mount it somewhere else. If the folder you chose doesn&#8217;t exist you will need to create it. As I said earlier I chose to use ext4, but here you will need to enter whatever filesystem you chose earlier.</p>
<p>Now, mount the array.</p>
<pre>sudo mount -a</pre>
<p>This will mount anything mentioned in the fstab that isn&#8217;t currently mounted but should be (hopefully your array!).</p>
<p>You should now have a working RAID-5 array! Next I would strongly suggest you investigate how to look after and monitor it, being able to cope with one drive failure is no use if you don&#8217;t notice when it fails and let a second fail!</p>
<h3>Growing</h3>
<p>One of the advantages of software RAID is the flexibility it gives you, that would normally only be available from high end (expensive) RAID cards. This includes the ability to grow an existing array (only for certain RAID levels), which means if you run out of space you can easily plug in a new drive and keep going.</p>
<h4>1. Growing the array</h4>
<p>Growing a RAID-5 array with mdadm is a fairly simple (though slow) task. First you will need to prepare the new drive in the same we we prepared the initial drives (step 1, above). To start the actual growing of the array we then add the new drive to the array as a spare:</p>
<pre>sudo mdadm --add <span style="color: #ff0000;">/dev/md0</span> <span style="color: #ff0000;">/dev/sdd1</span></pre>
<p>Then we grow the array onto this device. Because I had 3 drives before, the new drive obviously makes 4. Make sure to change this to whatever number you now have!</p>
<pre>sudo mdadm --grow <span style="color: #ff0000;">/dev/md0</span> --raid-devices=<span style="color: #ff0000;">4</span></pre>
<p>As when creating the array, we can follow the progress by checking the file /proc/mdstat.</p>
<pre>sudo watch cat /proc/mdstat</pre>
<p>Again, I decided to wait for the operation to finish before attempting to grow the filesystem, but you should be able to do it while the array syncs.</p>
<h4>2. Growing the filesystem</h4>
<p>Before we can grow the filesystem we need to unmount it:</p>
<pre>sudo umount <span style="color: #ff0000;">/dev/md0</span></pre>
<p>Now that it is unmounted we can run a filesystem check to make sure everything is in order:</p>
<pre>sudo fsck.ext3 -f <span style="color: #ff0000;">/dev/md0</span></pre>
<p>If any issues arise, let it attempt to fix them for you.</p>
<p>Once the filesystem has been checked we can perform the resize. If you decided to use something other than ext2/3/4 this may be done differently, but for the ext2/3/4 filesystems we use the resize2fs tool.</p>
<pre>sudo resize2fs <span style="color: #ff0000;">/dev/md0</span></pre>
<p>This will automatically grow the filesystem to the new size of the device.</p>
<p>You can now remount the drive and start filling it up again!</p>
<h3>Sources</h3>
<ul>
<li><a href="http://bfish.xaedalus.net/2006/11/software-raid-5-in-ubuntu-with-mdadm/">Software RAID 5 in Ubuntu with mdadm</a></li>
<li><a href="http://scotgate.org/2006/07/03/growing-a-raid5-array-mdadm/">Growing a RAID5 array – MDADM</a></li>
<li><a href="http://linux-raid.osdl.org/index.php/Main_Page">Linux Raid Wiki</a></li>
<li><a href="http://www.andremiller.net/content/recovering-reserved-space-ext2-and-ext3-filesystems">Recovering reserved space in ext2 and ext3 filesystems</a></li>
</ul>
<p><em>If you spot any errors, or have any problems then please leave a comment and let me know!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2009/11/04/software-raid-5-using-mdadm-in-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Choosing RAID</title>
		<link>http://www.jamierf.co.uk/2009/10/30/choosing-raid/</link>
		<comments>http://www.jamierf.co.uk/2009/10/30/choosing-raid/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 10:21:15 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=285</guid>
		<description><![CDATA[Having been virtually out of hard drive space for the past couple of months I finally decided to do something about it, and purchased 3 new 1.5TB Seagate Barracuda hard drives. I chose these because I already had one and thought 4 the same would make sense, but if you are buying all new then [...]]]></description>
			<content:encoded><![CDATA[<p>Having been virtually out of hard drive space for the past couple of months I finally decided to do something about it, and purchased 3 new <a href="http://www.amazon.co.uk/dp/B001IKKCLI/?tag=ja0e-21">1.5TB Seagate Barracuda</a> hard drives. I chose these because I already had one and thought 4 the same would make sense, but if you are buying all new then the <a href="http://www.amazon.co.uk/dp/B001UE8LRO/?tag=ja0e-21">1.5TB Western Digital Caviar Green</a> is maybe a better option; it is 5400rpm rather than 7200rpm, the performance loss shouldn&#8217;t be an issue for a basic file server, but the power saving and quieter operation may be appreciated.</p>
<p>I decided to create a software RAID-5 array using the 4 drives, to give a total capacity of 4.5TB with the ability to handle 1 drive failure.</p>
<p><span id="more-285"></span></p>
<h3>What is RAID?</h3>
<p>RAID stands for Redundant Array of Inexpensive Disks, and is a way of organizing data over multiple drives to provide higher performance and/or reliability than available from a single drive.</p>
<h4>What is RAID not?</h4>
<p>Although RAID is redundant and can recover from drive failure, it alone is <span style="text-decoration: underline;">not a backup solution</span>! If you delete a file on a RAID array it is deleted from all drives in that array, similarly if your data is corrupted then the corrupted data will be mirrored across the whole array.</p>
<h3>Hardware RAID vs Fake RAID vs Software RAID</h3>
<p>Before getting started you should think about how best to implement your RAID array, because once it&#8217;s done it can be hard (if not impossible without enough spare disks to back up all your data) to change.</p>
<h4>Hardware RAID</h4>
<p>Hardware RAID is usually considered the &#8220;real&#8221; implementation of RAID. It requires a dedicated RAID card, which handles maintaining the array; this has the advantage that the CPU is not required so performance is usually better. The disadvantages however are that you are then restricted to the RAID card you have; the implementations of RAID isn&#8217;t always compatible between different models, and almost definitely isn&#8217;t between different vendors, and the cost; hardware RAID is not cheap!</p>
<h4>Fake RAID</h4>
<p>Most motherboards these days come with RAID support, which is known as Fake RAID. What&#8217;s fake about it? There is no dedicated chip to maintain the array as with &#8220;real&#8221; RAID. This means that the processing is handed off to the CPU, so the performance benefit is no longer there. On the upside, it is cheap!</p>
<h4>Software RAID</h4>
<p>The third option when implementing RAID is Software RAID, which, as the name suggests, is done totally in software. This means, like with Fake RAID, the CPU is required to do the processing. The advantages however are it&#8217;s portability, and cost (free!). Because the implementation is entirely software based, there is no restriction on hardware any more; you can move the drives between computers without any problems. There is however now a restriction on software; if you created the RAID array under Linux (using <a href="http://en.wikipedia.org/wiki/Mdadm">mdadm</a>), it will not be accessible under Windows (or any other OS that doesn&#8217;t have the same implementation of mdadm available). It is also worth mentioning that mdadm includes many features which can only be found on the high end (expensive) RAID cards, such as the ability to grow or shrink a live array.</p>
<h3>Levels of RAID</h3>
<p>Another thing you will need to decide on before starting is what level of RAID you require. For a detailed review of the different levels see the Wikipedia article about <a href="http://en.wikipedia.org/wiki/Standard_RAID_levels">Standard RAID levels</a>. I am using RAID-5 because it provides some redundancy but without sacrificing too much capacity (usable size = (num of drives &#8211; 1) * size of smallest drive), however there is <a href="http://blogs.zdnet.com/storage/?p=162">some speculation</a> that as disk sizes are increasing, RAID-5 is becoming less reliable. When I next get paid I may consider upgrading to RAID-6 (which, using software RAID, is easy!).</p>
<p>&nbsp;</p>
<p><em>Follow up: <a href="http://www.jamierf.co.uk/2009/11/04/software-raid-5-using-mdadm-in-ubuntu-9-10/">Software RAID-5: using mdadm in Ubuntu 9.10</a></em><em>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2009/10/30/choosing-raid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PhD: 3 months in</title>
		<link>http://www.jamierf.co.uk/2009/10/21/phd-3-months-in/</link>
		<comments>http://www.jamierf.co.uk/2009/10/21/phd-3-months-in/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 13:03:22 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[p2p]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=226</guid>
		<description><![CDATA[Since I started my PhD in August I am now rapidly nearing the 3 months mark. Having spent the past couple of months doing mainly just reading to try and get up to speed on the background, I am now starting to work on writing a review paper, reviewing methods for wildcard search over structured [...]]]></description>
			<content:encoded><![CDATA[<p>Since I started my PhD in August I am now rapidly nearing the 3 months mark. Having spent the past couple of months doing mainly just reading to try and get up to speed on the background, I am now starting to work on writing a review paper, reviewing methods for wildcard search over structured peer-to-peer overlays.<br />
<a href="http://www.phdcomics.com/comics/archive.php?comicid=1012"><img class="aligncenter size-full wp-image-240" title="Life Ambition" src="http://www.jamierf.co.uk/wp-content/uploads/2009/10/phd.png" alt="Life Ambition" width="600" height="260" /></a><br />
Although not related to searching, I came across a rather <a href="http://www.ieee-infocom.org/2004/Papers/03_2.PDF">interesting paper</a> about using peer-to-peer technology in MMORPGs the other day which some day I&#8217;d love to follow up on, given the time&#8230;</p>
<blockquote><p><strong><em>Abstract</em></strong> &#8211; We present an approach to support massively multi-player games on peer-to-peer overlays. Our approach exploits the fact that players in MMGs display locality of interest, and therefore can form self-organizing groups based on their locations in the virtual world. To this end, we have designed scalable mechanisms to distribute the game state to the participating players and to maintain consistency in the face of node failures. The resulting system dynamically scales with the number of online players. It is more flexible and has a lower deployment cost than centralized games servers. We have implemented a simple game we call SimMud, and experimented with up to 4000 players to demonstrate the applicability of this approach.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2009/10/21/phd-3-months-in/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FluxBB: Changes, updates and on-going progress&#8230;</title>
		<link>http://www.jamierf.co.uk/2009/10/21/fluxbb-changes-updates-and-on-going-progress/</link>
		<comments>http://www.jamierf.co.uk/2009/10/21/fluxbb-changes-updates-and-on-going-progress/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 13:01:32 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fluxbb]]></category>

		<guid isPermaLink="false">http://www.jamierf.co.uk/?p=252</guid>
		<description><![CDATA[After various ups and downs for FluxBB I feel things are finally starting to look up. I am proud to have recently taken over leadership of the project, and am looking forward to a more organized and structured future. We have also recently announced our plans to unveil a brand new website, on a new [...]]]></description>
			<content:encoded><![CDATA[<p>After various ups and downs for FluxBB I feel things are finally starting to look up. I am proud to have recently taken over leadership of the project, and am looking forward to a more organized and structured future.</p>
<p>We have also recently announced our plans to unveil a brand new website, on a new server which I have ordered from <a href="http://www.gandi.net">Gandi</a> (where I also happen to rent the VPS for this website from). On the new server I have decided to give <a href="http://www.lighttpd.net">lighttpd</a> a try as an alternative to <a href="http://httpd.apache.org">Apache2</a>, I guess time will tell if this was a good idea or not.</p>
<p>The new website, along with looking much cleaner and professional, has much more information and many more useful features than the old (and slightly out-of-date) one.</p>
<p><span id="more-252"></span></p>
<ul>
<li>Some important information that was missing from the old site, such as a a full feature list and information about; FluxBB&#8217;s history, future development and the development team.</li>
<li>Localization support &#8211; Every page of the new site can now be easily translated into various different languages. Once the text has been finalized we hope some members of the international communities will provide us with some translations.</li>
<li>Information about upgrading between releases, and converting from other software; including a list of other software which conversion from is supported.</li>
<li>A page of recommended web hosts to get people started.</li>
<li>A modification repository to host modifications, plugins, styles and language packs. This will allow mod developers to host their modifications in a central location where they can easily be found. It also gives us some control over which modifications are published, allowing us to reject any with obvious security vulnerabilities for example, which will hopefully improve the quality of the modifications.</li>
<li>An updated IRC web chat, using the webchat.freenode.net script.</li>
<li>A brand new user oriented wiki, providing guides on installing, setting up, using, moderating and administering FluxBB.</li>
</ul>
<p>For anyone interested, a sneak preview of the new site:<br />
<img class="aligncenter size-full wp-image-254" style="border: 1px solid black;" title="FluxBB site preview" src="http://www.jamierf.co.uk/wp-content/uploads/2009/10/fluxbb_site_preview.png" alt="FluxBB site preview" width="890" height="376" /><br />
For more information, <a href="http://fluxbb.org/forums/topic/3343/changes-updates-and-ongoing-progress/">Changes, updates and on-going progress&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2009/10/21/fluxbb-changes-updates-and-on-going-progress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://www.jamierf.co.uk/2009/07/01/hello-world/</link>
		<comments>http://www.jamierf.co.uk/2009/07/01/hello-world/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 19:38:10 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.jamierf.co.uk/?p=11</guid>
		<description><![CDATA[Hello World! This is just a test post to test out wordpress&#8230; If you find any problems with the skin or anything please let me know&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hello World! This is just a test post to test out wordpress&#8230;</p>
<p><img class="alignnone size-full wp-image-15" title="Beaver" src="http://www.jamierf.co.uk/wp-content/uploads/2009/06/Beaver.png" alt="Beaver" width="80" height="80" /></p>
<p>If you find any problems with the skin or anything please let me know&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamierf.co.uk/2009/07/01/hello-world/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

