Jun 19 2007

Geek with a car, watch out!

Category: Geek Stuff,IT,Personal,WebsitesJonathan @ 1:43 pm

I’ve been pretty busy lately, for anyone that didn’t know I passed my driving test at the end of April (4′th time lucky!) so I’ve been spending a lot more time out and about, exploring the world so to speak in my brand spanking new (well, almost) Vauxhall Astra. I have also been planning my trip to LugRadioLive07 and I think have everything prepared for that now, staying in the same hotel as last year which is a stone’s throw away from the venue.

Work on the ClassicKidsTV site has slowed slightly, although the other staff on the site are keeping things on the Wiki running along smoothly. I have been looking into upgrading the forum to PHPBB3 to try and curb some of the spam. To give you an idea of how vulnerable PHPBB2 is right now, I have had to date around 2300 registrations and around 1500 of these being spammers accounts. I performed a test conversion to v3 last week, and I have to admit I’m not a massive fan of version 3 so far, I find it has a much more confusing layout on the public side making it more difficult to use and the administration system is simply too big, also the themes currently available aren’t very good at all, so I will probably wait until the application matures a little before I decide to do the final conversion, either that or build a theme myself.

As for this blogging site, it’s still a work in progress I suppose. I have added a few plugins on. The main ones are ‘Addictions‘, a plugin which is set to show what you are currently interested in, books and music wise anyway. Although this plugin did require me to do some manual coding to tweak some functionality as for some reason the original author would only allow images that were saved locally in the specific theme directory, which to me seemed like a silly way of doing things. I recoded it to allow for remote images (so you can now just copy and paste the URL from Amazon) and it seems to be working much better. I have also added a plugin which links up to my new twitter account, which will show you what I am currently up to, and can be updated by me via twitter itself, this website and via SMS.

I have also re-written my CV, and the results of which can be seen here.


Mar 06 2007

WordPress Move

Category: Geek Stuff,WebsitesJonathan @ 5:41 pm

I have finally moved the site and blog over to the WordPress blogging/CMS package, the aim being to allow me much greater flexibility, and make it a lot easier for me to post on the move. The old blog served my needs well for many years, and I would like to thank it’s creator for all the hard work he put in, but since development ceased it’s been more and more prone to attacks and I was having to manually edit code to remove the security holes as I found them, leaving less and less functionality there, until it was almost featureless!

The decision to move came about partly because of problems with my old site and blog, along with the fact that I was getting bored of looking at the same old design after 3(ish) years! Also, I was increasingly finding that the blog was the only section that ever got updated, whilst the rest of the site stayed static, and it didn’t make sense that the only page I kept updated was hidden away! For this reason I chose WordPress as it is primarily a blogging system, so the site now centres around the blog, but it also allows me to create static pages and links as I had on the old site, along with other bits and bobs, so I’m hoping to eventually replicate all the old content onto this new site in the new style.

The WordPress move went very well and thanks to the RSS importer all my old posts were imported and working within seconds, although I only chose to import the last 12 months posts as most of the older ones were a little boring! So far I’m very impressed with the package and have customized it with a fancy theme, and added myself a simple contact form plugin. I will be investigating all of it’s features in the coming weeks. Any comments on the new look and feel are most welcome!
Jonathan


Nov 05 2006

Radio, and other events!

Category: Achievements,WebsitesJonathan @ 9:26 pm

Just a quick update on the goings-on!

I had a great pleasure of being invited to appear on BBC Radio at the weekend to chat about the ClassicKidsTV.co.uk site and Kids TV in general with their saturday afternoon presenter Pete Cooper. I had been asked to do interviews in the past for BBC Radio but it had never actually happened due to bad planning. This time around though it did, and despite being promised the questions beforehand none had arrived, and I was quite surprised and shocked when I got the phone call (whilst still in bed at about midday!). A further (more nerve-wracking) surprise awaited me when after being placed on hold by someone at the station the ‘holding music’ faded out to me being introduced live on air as the Classic Kids TV expert, giving me a grand total of 30 seconds to prepare to be interviewed live on BBC Radio! I’m particularly glad now that it was radio as I must have looked a bit like Guy Goma at the time!

Despite the problems and not being prepared at all I think I managed to do a pretty good job, we had a nice chat, the presenter seemed very plesant, and we discussed Muffin the Mule (a subject I really had to wing my way through, it having been shown 40 years before my birth!). We also talked about what shows should be brought back, whether this was always a good thing, our own personal favourites, and also discussed some recent and future comebacks such as Fireman Sam, The Dark Crystal and Fraggle Rock. The URL of the site was mentioned twice on air, which is certainly very good publicity!

I’ll be looking forward now to my next (hopefully more prepared) media appearance! A big thank you to the BBC for inviting me on!

Jonathan


Oct 10 2006

More KidsTv blabbering!

Category: Free Software,GNU/Linux,Geek Stuff,IT,WebsitesJonathan @ 8:44 pm

Thought I would update everyone on the ClassicKidsTv site. The launch I posted about was short lived, after around 24 hours the site couldn’t cope with the sheer amount of simultaneous hits it was getting and started crashing continually. Thankfully Bytemark’s SMS alerts kept me up to date and my new Qwerty SPV phone allowed me to SSH on from anywhere to give the box or Apache a reboot. After two days I got extremely frustrated with the crashes and realised we had some major problems, I took the wiki down, leaving only the forum up along with a note on the homepage redirecting visitors.

As a temporary solution I uploaded the old site onto the new box and temporarily reconfigured Apache to point visitors to the old design, this solved the immediate problem and we were back online at least, although I really needed a fix to get the Mediawiki site back up and running. At this time I had 3 options. Firstly, I could reinstate the old site permanently and forget about the wiki, although this would mean losing the weeks of work that Orbling, Em and I put in to get the site built, not to mention all the work I put in getting the box setup and learning Mediawiki, Mysql and Apache to a fairly expert level, so really not an option! Secondly, I could convert the wiki pages into a static Html design, this would require coming up with a new design, and losing the community editing functionality. The last (and preferred) solution was to figure out what was wrong with Mediawiki and fix it!

I did some research, including observing a crash as it happened and rooting through the system logs and it turned out there were a number of reasons for the crashes. Firstly the machine was having to do a lot of processing because of MediaWiki, for the first time the site was running from a purely dynamic system whereby a user requests a document and Apache/Mysql/Mediawiki all work together to build the page on the fly and send it to the user. This kind of setup is employed on many sites and CMS systems such as Drupal, Moodle, Joomla and WordPress and it does have it’s advantages, pages can be updated by anyone, dynamic pages can adjust very fast to changes, and best of all, many users can collaborate on the same project, but there are some major disadvantages, mainly speed. The page builds are very slow on this kind of system due to all the co-operation needed between the applications. On Mediawiki websites each time a page is requested, Apache requests the file on behalf of a user on the Wiki, Apache then connects to the Mysql database and drags the information through for the page, and Apache builds and sends the completed page out, this is in contrast to the old system where static pages were requested and sent quickly by Apache with no other involvement needed.

Secondly, the Apache server can only support a limited number of simultaneous connections, and where pages are taking a long time to load, a connection slot is being used. As time goes on more and more slots are used up and if the load gets too high then eventually Apache will fill up Ram and connections and crash the box. The extent of this was revealed when I adjusted the maxservers parameter in apache.conf. The default configuration allowed for a maximum of 20 clients on Apache, this is quite a lot when you consider most requests on a web server will be fulfilled in a few seconds. Normally you shouldn’t make this number too high as each Apache service uses a lot of Ram, but I knew it was worth a test anyway. I adjusted the maxservers setting to 40, then 80, both of which filled up almost as fast as 20 slots did, so I knew that Apache alone could not handle the load the visitors were demanding. I was also limited by the small amount of Ram I have on the rented box, which can be upgraded, although at a cost I cannot really afford.

A clever solution was found, and advised to me by my good friend Karl in the form of a guide to using Mediawiki with Squid proxy. Wikipedia itself uses multiple Squid servers, so it is certainly a tried and tested method. The solution involves using a reverse proxy server to request the dynamic pages and cache them so they are already built when the next visitor requests them. A normal proxy server works by caching web pages viewed by users on a network, so that when any other user on the network requests the same page it will be served from the on site proxy cache, that way the page does not need to be re-fetched from the web, and this also saves time and money. Proxy server’s can also be used in a similar way by ISP‘s, and some networks use them to filter out objectionable content in the same way a Firewall filters out dangerous network traffic.

Using the open source and free Squid proxy as a reverse-proxy allows a previously dynamic page to be cached on the web server itself in a static form. It works a little something like this. The server is setup so that Apache can no longer be seen directly by the outside world, Apache still runs on port 80, although only locally on the machine, Squid is installed and setup to run on the external port 80 (the one internet users connect to) and configuration is done so that certain pages are not cached, mainly forum posts and wiki edit pages, neither of which are needed. So now the page is requested by a user for the first time, Squid sends this request to the web server. Apache and Mysql build the page and it is sent through to Squid which sends it out on port 80 to the visitor. The next time the same page is requested Squid checks it’s cache to see if the page has already been cached (it also checks to see if the page has changed and if so it grabs a new copy to send out). If it finds the page in it’s cache it retrieves it and sends it through to the visitor, completely cutting out any involvement by Apache or the database.

After doing some testing on a clone of the machine and then moving the configurations over to the live box, this setup has worked excellently for us, we have more Ram to play around with, a much faster page loading time and we have had no downtime in 2 weeks, it is an ingenious solution so I really thought it should be shared here for everyone to appreciate how well it works! If anyone has any comments or questions please let me know!

Jonathan


Sep 27 2006

ClassicKidsTV.co.uk

Category: WebsitesJonathan @ 8:27 pm

Well it’s finished! The new ClassicKidsTv website has finally gone live, and it’s looking pretty damn amazing (If I do say so myself!). The site is now running on MediaWiki, and can now be updated by volunteers and visitors of the site.

It’s taken weeks of effort from myself and with assistance from two of my forum regulars to get the site pages built and I can’t thank them enough for all their help! The three of us have now formed a ClassicKidsTv team to work on the site, to which I hope we can add many more members!

As for the server side of things, I have learnt a huge amount about how professional web servers operate and after building up the server from scratch myself using only SSH, I feel very confident about my skills in this area now. I have learnt many areas of linux/oss from this project, mostly web server related. I have finally learnt VI properly, I have done full o/s upgrades remotely, I have learnt how to configure apache properly (and hopefully securely!) and how to use the mod_rewrite functionality in apache (with Karl’s assistance) to setup shorter and more efficient URL’s, and to keep search engines out of certain directories by mod_rewriting them to somewhere else and blocking them with a robots.txt! I have also learnt how cron works and have created a nightly backup script to keep all my files and databases save from harm!

Overall it has been an amazing thing to learn, and having only SSH access to the box really forces you to learn the command line very well.

Anyhoo, the new ClassicKidsTv site is available to view here:
http://www.classickidstv.co.uk

I’d really appreciate any comments anyone has!

Jonathan


Next Page »