Fixing stability and character set issues
So we had some issues with the ping node stability and the character set.
Initially I hoped that we could just code the whole thing up in Django and be done with it. Turns out Django is great for views, but not so great for the thing which keeps accepting the mood pings and writing them to the database. (What’s a mood ping anyway??? I guess we’ll publish the architecture piece one day soon and then more info about this…) I’m not sure if it’s a function of Django or the hosting provider of a crappy FastCGI server or god knows what, but the fact of the matter is, when we kept pinging the server with moods with our Pinger client, the server kept coredumping. Which is the same as crashing. Now coredump is not a very nice thing to happen to you so we had to find a workaround.
The workaround was to rewrite the ping server in pure PHP. It still keeps writing to the Django database so Django displays stuff with its views, but no more Django pings means the whole thing is now more stable than a Chuck Norris roundhouse kick. And you can send your mood pings our way.
The second thing was with character sets. In my test machine I used MySQL 4.1 where everything was fine. In the hosting, there’s MySQL 5.0, which is kinda cooler since it’s the new version? But what’s not so cool about it was that I had to mess around with the character sets and collations for quite a while until finding a working combination. Turns out the fix was quite simple — just had to enter “alter database databasename charset utf8” to make UTF-8 the default database charset, and then everything fixed itself. Before that, had weird double-encoding issues, and issues with ?-s being entered in the database in place of Chinese and Japanese high-bit characters.
Right. So we hope to publish the Pinger any time soon now, plus any more fun views, and then start promoting this thing a bit more.

Leave a comment