How to stop rsync overloading your wireless/LAN

Posted December 1st, 2008 by Chris

I am currently using rsync as a backup solution between two computers and an external backup drive, all operating across my wireless LAN. However, every so often - and always when syncing a lot of files - rsync has knocked out my wireless internet. Today, I decided to find out what was going on, and found the solution:


rsync --bwlimit=500 ...

It turns out that rsync was overloading my router with data, causing it to reset the connection. Setting a bandwidth limit (in kBPS) to one nearer that of the router prevents overloading, and allows the scripts to complete.

Tags: , , ,
Posted in Business, Dissertation, Personal, Programming | No Comments »

Running Aptana Jaxer on Ubuntu 8.04

Posted June 5th, 2008 by Chris

I’ve not had any time to try out Jaxer yet, but the idea of a single platform for both client and server-side processing sounds good.

On trying to get started, though, one problem I encountered was that the installation instructions on Aptana’s site didn’t quite get Jaxer running on my default Ubuntu 8.04 install. The reason seems to be the built-in Apache trying to load an external library from

/usr/lib

which doesn’t exist.

The library in question is libexpat.so.0; however, there is a libexpat.so.1.5.2 installed! You can check this by running:

$ ls -l /usr/bin | grep libexpat

Creating a link to this file in /usr/lib with:

$ ln -s libexpat.so.1.5.2 /usr/bin/libexpat.so.0

seems to have got Jaxer running and the server status looks good. If you’re having trouble getting a Jaxer server running on the latest Ubuntu, this might be worth giving a go.

Tags: , , , ,
Posted in Personal, Programming, Uncategorized | 2 Comments »

Singleton Pattern in Javascript

Posted May 10th, 2008 by Chris

At work, I have been developing a custom framework loosely based on my experience with the symfony and Propel. One of the requirements for the application under development is to store the application’s state both on the server and the client, so that information can be passed by means of AJAX requests.

To aid this process, each page controller PHP class has a corresponding Javascript class. In order to maintain state through the application, each class as a Singleton. With the help of Prototype, singleton classes are quick and easy to implement in Javascript:

First, declare the class itself using Prototype’s Class.create() method:


PageController = Class.create({
	/**
	 * @type {integer}
	 */
	userId: null,
 
	// ... more properties ...
 
	/**
	 * Constructor
	 */
	initialize: function()
	{
	// ...
	},
 
	/**
	 * A method to do something...
	 */
	doSomething: function()
	{
		console.log('doSomething()');
	},
 
	// ... more methods ...
});

Once the class is created, we can declare a static instance of the class and a static method, getInstance(), that will be used to return the single instance of the class:


/**
 * @type {PageController} Static instance of the page controller
 */
PageController.instance = null;
 
/**
 * Return the static (singleton) instance of
 * the page controller object
 */
PageController.getInstance = function()
{
	if(!PageController.instance)
		PageController.instance = new PageController()
 
	return PageController.instance;
}

With the class now declared, the singleton instance can be accessed in your application using the static getInstance() method:


PageController.getInstance().doSomething()

Tags: , , ,
Posted in Personal, Programming, Uncategorized | No Comments »

Plymouth Enterprise Week (Nov 13th - 18th)

Posted August 10th, 2006 by Chris

November 13th - 18th will see Plymouth hosting a number of events aimed at nurturing business enterprise in the City and South West region. There are several organisations involved in running the different events, including the University, local media and local business organisations.

It’s nice to see things happening in Plymouth to foster growth of local and regional businesses. As I seek to more firmly establish my own business (and secure a rather more formal business plan!), it’s good to know that the region is developing a vibrant and warm environment for new business types and organisations.

Business development and commercial work is, of course, all taking its toll on blogging frequency!

Posted in Uncategorized | No Comments »

Graduating BSc (Hons) MediaLab Arts

Posted July 19th, 2006 by Chris

Four years of studying finally came a close yesterday as I along with a few hundred graduated from the University of Plymouth. Thankfully, everything went well (no tripping on the steps!) and hour upon hour of sleep deprivation paid off with a First. With the official end of my time as an undergraduate, there is, however, no longer an excuse for slow and slacking work…

So, the beach is out of bounds (although a cheeky visit to Whitsands over the weekend was allowed). For now, though, it seems the first steps of my full-time business are going smoothly and things are beginning to roll. Although the business still lacks an official website, it is something sitting on my expanding list of things to-do-sometime-soon.

Meanwhile, alongside my commercial endevours, I hope to be working within and alongside the University in continuing research into contemporary mobile technologies, and their resultant social effects.

Posted in Business, Personal, Uncategorized | 2 Comments »