Sunday, September 24, 2006

Small is Beautiful

I've been always interested in small computers, so when I looked at this, I'm like: Way cool!

The GumStix is a way small, 20x80 mm, and can run Linux 2.6! comes with 64MB SDRAM too! What can you do with this small computer? Custom audio player? "Wifi-devicelet"?

Imagine ...

Sunday, September 17, 2006

Laptop Hunt

I'm looking for serious laptop/notebook to use as my primary computing device for the next 5 years or so. I just found this page that seems very very informative. But I'd like your comments too.

Here's what I have in mind:
  1. A dual-core 64-bit processor (preferably, the AMD X2 series). I'd definitely want one with the hardware virtualization features.
  2. About a GB of RAM
  3. 80--100 GB of HDD, though I must say, 60GB seems okay too.
  4. 15" screen, preferably SXGA+
  5. Wireless + Fixed-line networking
  6. Works with Linux.
I'm not that concerned about power now, though I'd be interested to know how much time you get on your laptops.

NFS Locking

It doesn't work. Atleast not for me. Maybe it does in a properly configured environment. But this certainly isn't one.

Software that lock files can suffer badly when the files they lock are on NFS. And with most home directories being NFS mounted, this means that sooner or later you're going to encounter such software.

My first practical experience with NFS locking issues was during a ill-fated talk on Arch/TLA to a (thankfully) small group of friends. Arch/TLA doesn't work on NFS. All our demo machines had NFS-mounted directories. End of talk. Well, not exactly, since we did manage to salvage some part of it.

Then, of course, came the SQLite database problem. Or was it the PHP PECL compilation problem? Whatever. And lately, I discovered that Skype,stores its configuration files and uses locks to manage it's databases. On NFS, it just refuses to start, or takes ages to begin. I've experimented with moving the files to /tmp and creating a soft-link, which does work --- Skype starts up. But an unrelated(?) problem causes it to crash when I try to connect. Using Google to find out more leads to pages which complain of ABI differences between Skype's binary and the system glibc, and given that Skype is closed-source, can't do much about it. As an aside, I'm not using Skype, was just trying to debug the problem. For VoIP, I recommend GTalk or its free implementation at http://tapioca-voip.sourceforge.net. Note that I do not use VoIP.

So how do you assure conflict-free access to your files across all local disks as well as NFS? There should be a general solution, but my guess is, it varies from application to application. For a good example of how a lock-free mail spool was implemented, see the Maildir format invented by DJB.

Wednesday, September 13, 2006

New Software: Webfiler

After deciding not to use static HTML pages for my website, in order to make my website appear more "active", I looked around for some content management system for a single user. Mostly the list boils down to blogging software. Now I don't want to use MySQL or Postgresql (preferring SQLite), so the list shrinks even more. Unfortunately as this post showed, SQLite sputtered too. So now I was reduced to using flat-files. So scratch all software.

Now I'm not a programmer for anything! With strong NIH syndrome to boot. So I decided to write my own. I've been mulling over it for some days, and the idea was that the system would basically handle documents which have tagged. No folders, etc. Just tags.

I had just finished writing the tag database management library, when I realized IkiWiki probably did everything I wanted it to do (and better!). Not wanting to abandon whatever I had already done (after all I'd sacrificed lunch :) ), I continued, and Webfiler 0.1 was born.

It's now working nicely enough to be running my website. I'll put up the sources sometime.

Monday, September 11, 2006

Free Advice

Learn a high-level, managed language. Any language that is not C. It could be Java, PHP, Python, or any of the .NET family. This is because C is not very suitable for prototypes, and you may end up fighting the language more than you end up writing your program. This is especially true if you're a neophyte at programming.

Sunday, September 10, 2006

SQLite databases on NFS mounts

I encountered this while installing Serendipity (a PHP based blogger) on PHP4 on a SuSE Linux system with apparently misconfigured NFS locking.

If your application accessing a SQLite database seems to hang forever, you might wish to check if said database is on NFS. SQlite uses locks, which don't seem to agree with some systems, causing it to think that the files are permanently locked. You can verify this by running sqlite dbname on the command line, you'll get the following output:


SQLite version 2.8.16
Enter ".help" for instructions
sqlite> .tables
Error: database is locked
sqlite>


It will work fine if the database is relocated to local storage. Or as the commentary on this ticket entry shows, by running and installing nfs-utils. I think that it is installed, and running (lockd processes showing up), but I can't find the rpc.statd mentioned in the ticket entry. So am slightly puzzled, what is going wrong? And where is rpc.statd?

Thursday, September 07, 2006

My First "Publication"

Was writing the publications section for my student website, and remembered this:

Article #1 (?)


Yes, yes, I know. Those were very different times. And a very different me.

And my publication section still contains "None". Sigh.