Latest Publications

Rock-paper-scissors-lizard-Spock T-Shirt

I just took this image to a local shop to print on a T-Shirt. Man, do I love it :) I could have bought it online, but I figured this would be quicker.

RPSLS

If you don’t know what the joke is about, you’re clearly not watching the Big Bang Theory.

It turns out the game was invented by Sam Kass some years ago. Kudos to you, sir.

Awesome show. True story.

What? You’ve never heard of  Barney Stinson either?

UPDATE: A reader just sent a variant that is even more absurd. Don’t hold your breath: Rock, fire, scissors, snake, human, tree, wolf, sponge, paper, air, water, dragon, devil, lightning, gun.

Something BIG is about to happen

Lately I’ve been wanting to buy a netbook. I’m not an impulsive guy when it comes to buying new gadgets, so I have been postponing the moment. But having an unexpensive, semi-disposable system laying around can come in quite handy.

I mention this because the time to buy is getting closer and closer, and yet I’m astonished that so little people out there are making a big fuss over the next big thing: ARM netbooks and Linux. Sure, we already have some of these out there from Skytone and Elonex -and probably others-, but those are fairly limited machines performance-wise.

I’m talking about cheap mini-laptops that can be used to surf the web, write reports and even play 720p video, all with an extremely low power consumption, 10+ hour battery life and very little heat generation. These machines are already on their way, will use newer and more powerful ARM processors and will hit the market in the following months.

I believe this is, in fact, a silent revolution that doesn’t even ripple the surface. This will change everything. And why is that? Well… for starters there is a huge market for something like this, like the sells of anything Netbook-related have been steadily showing lately. An it seems hardly possible that Microsoft will release an ARM enabled Windows XP. This means Linux will get yet another boost in market share when these machines become mainstream, although I’m pretty sure Microsoft will still claim a 90%+ share in the netbook segment. Despite this alleged 90%, the rules of the game have changed, and netbooks are not playing by Microsoft’s rules any more.

Things are changing. And with this, cheap, ubiquitous, multimedia network-enabled machines will become a reality. And those will be powered by free software, at last. Debian has been supporting ARM chips for a long time, Ubuntu does since release 9.04 and other mobile and embedded devices have a long history with Linux. And lets not forget about Android! Oh man, I can hardly wait to get my hands on one of these jewels!

It’s a revolution.  It’s quiet, but it’s happening.

Dear Nigerian scammer

Yes, it is true. I’ve been scammed. Sort of.
The other day I listed for online sale some computer equipment I had laying around, and this was bound to attract scammers. I don’t know why, but it happens, and it turns out almost always these guys are from Nigeria. It could be that laws there are not very strict with these matters, or that it is a traditional way to make ends meet in a tough situation. But it’s no wonder most eBay auctions specifically forbid Nigerian bids.

Free Money

As I was saying, I received several fishy offers. Note that I’m posting the scammer’s private information on purpose :)

For example:

[...]
Received: from [196.3.183.73] by web59915.mail.ac4.yahoo.com via HTTP;
[...]
From: kerry jones <kerr_jone@yahoo.com>
[...]
Hello,
  am kerry by name am now in united kindom for a
purpose.....am sending this item to a friend in lagos nigeria....i will
like to let you know that am paying you through pay pal....i will want
you to send me the total cost include the shipping cost to
lagos-nigeria..you can also call me on this phone number now
+447024017578..please get back to me asap.

It’s astonishing how many guys fall for it. I guess the phone is a VoIP UK number, but hey, guess what?

This friendly guy that is “now in united kindom for a purpose” is writing from Lagos, Nigeria! GeoIP sure is a nice thing. Which by the way is supported in Cherokee, in case you’re wondering how to use that on a web server. Pretty handy. (more…)

Jaunty Server on Compact Flash: running Ubuntu 9.04 on a Thin Client

Previously on UnixWars …
I said in another post that I would be using a Thin Client as my home server. The machine is fanless, diskless and it makes no noise. The system boots from a low power Compact Flash. After setting things up, some friends decided to buy the exact same machine, so I’m going to write down the steps I followed to configure the server. Please note that Ubuntu Jaunty is still in Alpha 5 stage, so you might want to rethink which release you are going to install. I’ve had no problems whatsoever, so for a setup such as mine you should be safe. Alpha 6 is due to be released shortly and the first beta will be out on March 21st. Then, just one month will separate us from the official release day, so by now I’d say Jaunty has done most of it’s homework.

The easiest thing to do would be installing the system normally through PXE (look for the link at the end of this post if you’re interested), but there is a problem. Flash devices have a limited number of write-cycles, and wear levelling is not used on consumer grade cards. There are file systems optimized for flash devices -such as JFFS2- but the benefits are not obvious here. As I understand it, these are designed for industrial devices with direct access to the memory cells. Consumer devices have an abstraction layer that make them transparent and enable us to use them as any other normal storage. It should provide everything we need, such as wear levelling. But as I said before, it normally doesn’t for consumer-type devices.

Alternatives

Having discarded the optimal solution for both technological and budget limitations, we are left with three alternatives.

  1. Use the CF as an ordinary device, with total disregard for the premature death of the drive. This is the simplest, and provided you have a lifetime warranty for your media it might not be such a bad idea.
  2. Use the CF as if it were a LiveCD, maybe even adding persistence for our changes. This option should prove perfect if we want to use the Thin Client as a desktop system. Temporary changes are written to RAM, permanent changes will be stored on disk and even software updates will remain between reboots. It is a bit more complicated, so I’ll leave this in my TO DO list for now.
  3. Install everything by hand on a local copy, configure the system to be able to run with as little disk access as possible (ideally, from a read-only root file-system), and dump it to the CF. Since space is not a problem for me (I have both a 1GB and 8GB CF cards), I’ll prefer this approach. In case everything was set as read-only, we would only  have to remount the file systems as writable during the process. As for SquashFS, though it seems an ideal choice for an embedded system that needs no upgrades, I’ll discuss this in other posts. It is simpler to deal with a “standard” system, not having to recreate binary boot images every time you update the box.

My home server is used to share media and printers on my local network, manage downloads, and above all, provide a permanent access to my home network from wherever I might be. This is, by far, the handiest thing ever. At least it is for me. You never know when you are going to need to bypass Internet filters when you are roaming, for example. The wonders of SSH truly never cease to amaze me :)

I’ve opted for letting some writing be done to the CF, albeit the write-intensive tasks have been dealt with, because it is easier for the system to be updated, and because some of the services I’ll be using refuse to work on read-only mode. However, my next entry will be about using aufs/unionfs, and replicating this setup on totally read-only and compressed system that will run from the 256MB standard CF that comes with the computer.

(more…)

Fattening up a Thin Client: silent cheap home server

Futro S400Do you have a server at home running 24/7? Having permanent access to your home network can be very useful at times, as is sharing media and printers, or managing your downloads. My last server was actually a downgrade from my previous box in computing terms. It was no powerhouse, but being a fanless Epia with minimal power consumption and very low noise was a huge upgrade for me. I just connected the printer, some external USB drives, installed Debian and it has been sitting in a corner for ages, working flawlessly.

back 300x58 Fattening up a Thin Client: silent cheap home server

A while ago I was looking for a similar noiseless solution for my brother in law and a friend, and the itch started all over again. I decided it was a good moment to upgrade my system. The low power consumption and being fanless were a must, but I also wanted it to have integrated gigabit ethernet. So I though using a Thin Client would be a good solution. These are normally fanless and have very little power needs, and some even have decent processors and Gigabit Ethernet. After looking for a while, I settled for a Fujitsu-Siemens Futro S400 that I found dirt cheap in Ebay. (more…)

Cherokee v0.98: Jailbreak

It has been a while since my last post. Some rough month this has been, oh boy. Anyway, I wanted to let you know that we have released the new and improved Cherokee a couple of days ago.

Since the project has advanced so much over the last months, we have decided to boost the release closer to the 1.0 milestone. Many things have been improved, in stability, features  and performance. The Windows build has received some attention, and though it still has a lot of issues, Stefan de Konik has built a beta Windows package for people to try it out and help us sort out the rest of the problems. Great job as always, Stefan! The admin part is still not running under Windows, but you can always create the necessary config files on another environment and try out the Windows binaries.

In this release the caching mechanisms have been fixed, the web server can now be bound to multiple IPs and ports at the same time, a new balancing strategy has been added (so sticky sessions can now be implemented, for instance) …

To find out more about it, read the official release note for 0.98

Cherokee Webserver

Try it out. Cherokee is the fastest web server there is right now.

Her you have some links:

MySQL wrapper for DBSlayer

Cherokee Webserver
I have talked previously about Cherokee’s MySQL Database Bridge, so I won’t be repeating myself. Check the information about the Cherokee handler module and the recipe for MySQL balancing on our main site if you are interested.

Besides being the fastest implementation of its kind, it is really easy to use and offers a lot of scalability advantages.

For those of you using PHP we’ve finally pushed upstream a wrapper I wrote for this feature. It should facilitate the use of the MySQL Database Bridge: the PHP-MySQL API has been replicated and can be found under dbslayer/mysql_wrap.php in Cherokee’s source tree. It should provide an easy to use method of benefiting from the advantages offered by Cherokee without having to modify your applications. This will definitely be in our next release, so give it a try and tell us about it! ;)

override_function() in PHP

I’ve been writing a wrapper for Cherokee’s MySQL load balancer to transparently replace PHP’s MySQL functions and provide connection pooling and database balancing at absolutely no cost. And I encountered a problem wanting to override those built-in functions.

It looks like the override_function() has a bug that prevents from using it to override two or more functions, since it issues this error:

Fatal error: Cannot redeclare __overridden__()

Judging by the C code for PHP’s override_function() function, instead of hardcoding the overriden function name it was planed to generate random names, but for reasons unknown to me this never happened.

Anyway, I can’t believe the fix for this is so simple and yet the solution didn’t appear in PHP’s excellent online documentation. It had me lost for a while, but it’s as simple as renaming the overriden function!! This is from the wrapper I mentioned, that will be distributed with Cherokee shortly:

foreach ($substs as $func => $ren_func) {
    override_function($func, $args[$func], "return $substs[$func];");
    rename_function("__overridden__", $ren_func);
}

Some guys are simply brilliant

You know those times when you stumble upon a good idea and think it is plain genius?

Alvaro told me about it this morning and I just had to share it with everybody. This is what you will find if you visit http://apache-es.org, a community in Spanish built to talk about Apache and system administration.

apache es2 Some guys are simply brilliant

The “aviso” part is a warning:

Apache-es.org, the only Q&A site about Apache that is running Cherokee!

As I said: plain genius!

Cherokee on steroids: v0.11 now with reverse proxy

Yesterday we reached yet another milestone in Cherokee’s development towards World Domination. After almost a month of hard work, our newest creation hit the streets. The official anouncement hasn’t even been made yet, but Cherokee 0.11.1 is out in the wild.

Besides our regular bug fixes and performance enhancements, it is shipped with some new features. SSI support was being requested every now and then, the SSL infrastructure has been reworked and the new reverse proxy is working flawlessly. The Windows build is not a reality yet, but great advances have been made towards that end. Cherokee is currently working under Windows, but the admin is not. And it has to be cross compiled, for now. Anyway, we’re one step closer to releasing a binary Windows build ;)

Cherokee Webserver

We have a lot of fresh ideas, and as always feedback and feature requests are more than welcome at the mailing lists. Here are links to download and read the online documentation with tons of new information and recipes. Enjoy! ;)

UPDATE: Link to the official anouncement.