Dec 11

This is the bad thing about running a distro that releases up to date software. Eventually you will get 276 package updates. Continue reading »

written by Tim Groeneveld

Dec 11

When I faced with a decision of what web server I am going to roll out with, I usually end up picking between two web servers: Apache and Cherokee.

Apache is like your grandfather. He is 80 years old, and He has been around for a while. He is not always the guy you go to when you want something done quickly, but when you want it done reliably, you would not even think of going to anyone else.

Cherokee is like a kid out of Uni. Sure, he is still only a little baby, but he is packed full of the latest knowledge and has been taught how to do the job. Quick. He is also much better then his Granddaddy at doing the easier things, such as giving you the same document over and over and over again.

The way that Apache is written, it does use up a lot of memory, however, there is also the benefit with Apache that if you want to do it, you can. There is literally any type of module you would ever want for Apache. There are more then 400 modules to download, compile, install and try.

Cherokee on the other hand has a much smaller selection of modules you can choose to run with, but don’t let this scare you! If you run pretty much stock standard Apache setups (such as I do for timg.ws and sharesource.org), then Cherokee will be able to come to the table with everything you need and more.

The really cool benefit that you get from using Cherokee is the fact that, it does more out of the box with all its modules.

At the moment, I really like the development that is going into Cherokee.  They do look very hard at security, such as this the new spawning mechanism introduced into Cherokee earlier this year.

But really, there is a lot of hype over the whole “lightweight” httpds in some sense. Sure, lighttpd and Cherokee are really fast to deliver static files, but are they really faster then for anything else? In all honestly, not that much faster.

I hear about people doing a lot of really interesting things when it comes to web servers, like Apache+nginx+fastcgi, and then I wonder, couldn’t you just pick one product and stick with it? It’s not like the extra milliseconds are going to save you $200,000 a year.

I usually choose Cherokee now for new installations, simply because it does everything and I don’t need to actually do that much hunting around to make it ‘just work’. Not only that, but it has a nice web interface for administrating it that would even make my Dad happy (yes, literally).

written by Tim Groeneveld

Nov 20

I was just booting up my Mac to take some nice pretty screenshots of my cluster install process, and I realised that NoMachine’s client for OS X does not even properly support Intel CPU’s -.-”

Anyways, unlike Adobe porting Creative Suite to Linux, at least NoMachine are actually working on it.

written by Tim Groeneveld \\ tags: , , , ,

Nov 12

I would like to introduce you tonight to a x-part series (I don’t know how many parts there are at the moment, we will see as time progresses) entitled “How to build a www cluster in x days“.

In this series, we will be looking at a wide variety of different techniques that can be used to create a cluster for hosting your next large project on.
When I talk about clusters, I like to categorise them into two particular sections: dumb and intellegent clusters. A dumb cluster is a group of machines that essentially know very little of their surroundings. They do not take into account how many machines are currently running, where the machines are located or how the data is to be devlivered to it’s location. Put simply: you set it up, and it works. No complex heartbeat configurations (except when necessary) and nothing fancy.
Intelligent clusters on the other hand know alot of information about where other machines on the network are. They know where the vistor to the website is coming from, and what the fastest way is to deliver content to that user.
Put simply: a “dumb cluster” is a group of machines that are set up to deliver content. If one machine goes down, the load balancer will detect this and bring that node out of the server pool until it is reported back up again. an “intelegent cluster” knows where the user is visiting. It can take into consideration what the shortest internet route is to it’s desired location, or what route should be taken to get the best availible speeds.
In this series, we will be looking more at the dumb clustering side of things. Dumb clusters are easy to set up, and well, if you really want an intellegent cluster, hire me :] So lets look at what we are going to discuss in this series.
  1. Setting up our first webserver
  2. Setting up our shared filesystem
  3. Setting up our http/https load balancer
  4. Setting up our mail server
  5. Setting up our backup system
  6. Setting up our mysql cluster
  7. Setting up our shell server
  8. Setting up our TCP/IP load balancer
For the purpose of writing this series, I will be using Xen installed on my machine, using CentOS 5.4 as the base opperating system. At any one time, I will have up to five domains running on Xen. I will be testing loads and response times using my laptop.
Stay tuned, the first part of the series comes on Tuesday.

written by Tim Groeneveld \\ tags: , , , , ,

Jul 09

Well, I finally got all (but one…) of the parts of my new computer. My new case, the Cooler Master COSMOS “S” is in one word: absolutely awesome. I love the fact that all of the drives can be pushed in, and with one press of a button, the drive will lock in.

This comes with the terrible actuality that my hot swap device, the Chenbro five-in-three hot-swap device fails to just slide and lock in, because of the grooves in the case that allow the normal 5.25″ drives (like a CD drive) to just plug in with out any screws. So, it looks like I am going to need to get a file, and file away these damn things.

So yes, the one thing that is stopping me from putting this computer together, is (one again, mind you) the fact that I want so much storage. If I had only known that putting so much storage in a decent case would be so much hassle.

Other then that, everything else plugs in perfectly fine, which is pretty cool. I still really don’t know why there is a SATA connector on the top of the case, especially seeing as I have nothing that will plug into it, yet…

Can’t wait to file the things that are stopping me from putting the hot swap drive bay in.

written by Tim Groeneveld \\ tags: , , ,

Jun 11

At Digital Pacific, where I work, I do all my work on three computers. It’s a nice life looking at three monitors all the time, however, it is not the coolest thing in the world when you have three keyboards in front of you.

When I moved here, I already knew about Synergy, it’s great software.

My setup is comprised of a Windows XP (32-bit) machine, Kubuntu [7.04] Intrepid (32-bit) machine and a Kubuntu [9.04] Jaunty (64-bit) machine. The machine that runs all my applications that I write is the new Kubuntu 9.04 machine. To allow my keyboard and mouse to be used over all three of these machines, I have the Windows XP machine run the Synergy server, and all the Linux machines run the client. The reason I have Windows XP run the server is because it’s usually the machine that’s off. That might sound strange, but I do alot of work from home, and it seems useless to have a server running that is not needed to be on the machine.

One thing that really used to annoy me with this setup however was the Windows machine would detect all keyboard repeats, but the Linux machines would not detect up, down, page up and page down repeated key presses. You could imagine as a programmer that this could get quite annoying while writing code.

This morning I got frustrated at the Linux machines and I decided it was time to go and compile my own version, with a few patches I found around the net to fix this issue.

Being the package Nazi that I am, I don’t really like to install anything, unless it’s installed with some sort of package management. This is how to rebuild Synergy, and get a perfect .deb that you can install :)

# wget 'http://internode.dl.sourceforge.net/sourceforge/synergy2/synergy-1.3.1.tar.gz'
# tar -xvf synergy-1.3.1.tar.gz
# wget http://ftp.de.debian.org/debian/pool/main/s/synergy/synergy_1.3.1-5.diff.gz
# gunzip synergy_1.3.1-5.diff.gz
# wget http://coderazzi.net/linux/synergy.patch/synergy-coderazzi.patch
# patch -P0 <../synergy-coderazzi.patch
# sudo apt-get install patch build-essential
# cd synergy-1.3.1/
# patch -p0 <../synergy-coderazzi.patch
# chmod +x debian/rules debian/control

Edit debian/rules and after the line that says:
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"
Add the following line:
find . -type f -name Makefile | xargs perl -pi -e "s/-Werror//g"

# sudo dpkg-buildpackage
# cd ../
# dpkg -i synergy_1.3.1-5*.deb

After doing this, and restarting the Synery clients, you will have perfect key responses between all the machines.

Thanks to http://coderazzi.net/linux/synergy.patch/index.htm for providing the great patch for this post.

written by Tim Groeneveld \\ tags: , , ,

May 28

At Digital Pacific, where I work, I have been working on migrating from our current billing system to a new; more feature complete billing system that will provide many benefits to users. With our new billing system, Parallels Business Automation, users will be able to see all their invoices (past, present and future) and will be able to literally click one button and switch between all of their hosting control panels.

This move, however, has not been without quite a number of funny mishaps while moving from our current billing system (ModernBill) to Parallels Business Automation (”PBA”). The following text is going to go into quite a bit of technical information, so if you don’t know what XML is, well, you might just want to close this window go to Wikipedia’s article on XML and look it up!

Observe this image very closely:

 
 

 

So what I have done, is I have made a set of files with 100 customers each. Every separate file gets imported by running the command on the PBA server ‘hspc-import.pl’. Here, I am running the 59th file (the files start at 00). hspc-import.pl is complaining that the email for person “Becky A. Douglas” is not defined, however, when I go to edit the file, the email is infact correct, and it is definitely defined. Just like it is for the clients before her.

This issue has had me baffled for weeks trying to solve this issue. Sometimes it works, sometimes it does not. Sometimes changing the name in the XML file will just magically solve the issue, as if it was not there to begin with.

So what I do, is I get on Skype and call our Sales Engineer at Parallels, and tell him what the issue is. He points out a few issues with the XML file (which is fair enough, but why did all the clients before these “just” import without any issues?).

I take into account the issues that he pointed out, and go and create a new set of import documents to get our clients into our new billing system. I run all the commands again to start the process rolling, and now the issue is coming up again!

But now something very, very bad is going on! The import is actually failing faster then it was before the fixes that were suggested by our Sales Engineer. So I back track and change a few lines in the XML file. Instead of the top of the file saying this:

<?xml version="1.0" encoding="UTF-8"?>
<data>
<account>
<type>CUSTOMER</type>
<status>active</status>
<is_corporate>0</is_corporate>
<name>Bob Smith</name>

It now says this:

<?xml version="1.0" encoding="UTF-8"?>
<data>
 
 
 
 
 
 
<account>
<type>CUSTOMER</type>
<status>active</status>
<is_corporate>0</is_corporate>
<name>Bob Smith</name>

After adding exactly 15 new lines after the <data> child in the failing XML file in the import batch, you wouldn’t believe it. The import actually succeeded.

So now my new motto is, “Every bug in the world can be solved with just fifteen newlines!“.

written by Tim Groeneveld \\ tags: , , , , , , , ,

May 04

Ever since I have started using KDE with Linux/FreeBSD as my desktop replacing Windows, there has been just one thing that has really annoyed me about both of these desktops, and that is using Kodak cameras.

Yes – I know, such a simple device, but you will be amazed at how many headaches it used to cause. Photo transfers would litrally take 20 minutes with the “KDE way” using the kioslave camera:/.

Finally there is a better way!

With the help of this site, I have found out that there is an even faster way to get my files, and it literally has saved me 30-60 minutes copying all the photos of my camera.

Instead of using the provided kioslave with KDE (and the new Kubuntu 9.04, which by the way is great!) I, for the first time in the new version of Kubuntu needed to use the console.

gphoto2 --auto-detect

This command got me a list of all the camera's that I had plugged into my system.

Model                          Port
----------------------------------------------------------
USB PTP Class Camera           usb:

After I knew what the port was, I could literally mount the camera as part of my filesystem using this command:

gphotofs --port=usb: ~/camera

and bam! just copy the files from /home/tim/camera into the Documents folder and 300MB of photo’s were transfered in less then three minutes.

Fantastic! This is so much faster then the KDE way, I can not prove to you how happy I am that this speed bottleneck is now solved.

written by Tim Groeneveld \\ tags: , , , , , , ,

Nov 21

My development environment is CentOS 5. Running a library that is two and a half years old really sucks on a new Linux box, especially because I had to install three compat libraries.

The software is called “webpay”, and the actual library itself is distributed as a binary library; which would be alright apart from the fact that this is a library that is meant to financial transactions, and I want to be able to trust that this library is the actual library that I am meant to use. When you go to download the file from St. George, there is no way to validate the file, no signed GPG files – not even an sha1sum.

What was even worse, is that the webpay client refused to work in the Virtuozzo container.

rt_sigaction(SIGPROF, {0x81c0ce0, [PROF], SA_RESTORER|SA_RESTART, 0xf09dc8}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
open("test.blue", O_RDONLY)              = 3
fstat64(3, {st_mode=S_IFREG|0777, st_size=4891, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eb3000
read(3, "", 4096)                       = 0
brk(0x9ae9000)                          = 0x9ae9000

I would like it if it “just worked”, or even better – that libwebpayclient.so came with source, so we could actually compile the library ourselves, and debug the problem further. Even though the library is from a bank, I would have no problem sending back improved code to the bank, especially if it improved the way that my software worked.

Damn banks.

written by Tim Groeneveld \\ tags: , , ,

Oct 27

Today I was working on MyBanco when the thought came to me of what Linux needs to get a better market share (our ultimate goal, 100%). Then it occured to me! We need a promo, of course, not just any promo, a Li-Li-Li-Li-Linux 2.6.3 :) See 2:36 :)

written by Tim Groeneveld \\ tags: , , , , ,