Thursday, March 31, 2005

Home DataOne is up :-)

The kind folks from BSNL turned up to install DataOne. Unfortunately, my phone line was dead. So they installed and configured (rather, I configured under their instruction) and left, promising that a line man will show up by 5pm. The line men showed up just after 5pm and found that the problem was with the line cord inside my house! I gave them the short cable connecting my phone to my cordless and they patched it up and said everything is fine (I have a vague suspicion that I was conned about the line cord being faulty, but may be it's unfair to the helpful guys, so I'll not go into that). DataOne seemed to be fine after that, but the diagnostics failed saying authentication failure. Turned that the user ID and password that they gave had a problem, that was soon fixed with a helpful call to the BSNL folks.

So here I am, grinning ear to ear with a 256kbps connection. If everything goes fine, I plan to upgrade to 384kpbs and eventually to 512kbps. By the way, the BSNL customer service is quite nice actually. You just need the right contacts ;-). The people who visited my home for the connection were uniformly courteous and helpful.

Wednesday, March 30, 2005

Home DSL is down again

BSNL DIAS is down. But this time I am happy ;-). I had applied for a BSNL DataOne ADSL connection because it offered higher bandwidths (256+ kbps) when compared to BSNL DIAS which was capped at 128 kbps. Yesterday the kind folks from BSNL dropped in (four of them in fact) to install DataOne but since my DIAS was not yet disconnected, they said they'll come back after DIAS gets disconnected. Today evening, I found the DIAS modem was not syncing, I also had a voice mail from BSNL which said my Data One connection has been enabled. So now you can understand my happiness ;-).

Monday, March 28, 2005

Berkeley DB Btree vs SQLite Btree (contd)

Preliminary data indicates that SQLite does slightly better for tmpfs databases for writes and much better for reads. On normal disks, sqlite seems to do a whole lot better for writes. I'll post the test program in a couple of days. I noticed that the SQLite Btree take up only one third the size of Berkeley DB Btree on disk. That may explain the performance difference because the test program is I/O bound. Please note that these results are very preliminary, I am still learning the APIs.

Speaking about APIs, Berkeley DB is obviously well documented. For SQLite I had to go by the (well) commented source and a test program. Berkeley DB's transaction based API is a pain to use. Despite the lack of documentation, I found the SQLite API much more cleaner and simpler to use. In my next blog I'll present some numbers and the test program.

Sunday, March 27, 2005

sqlite btree as alternative to BerkeleyDB

I am looking for an embedded, transactional B-Tree database alternative to BerkeleyDB. You ask me what's wrong with Berkeley DB. Well, there are no technical issues but the license is not free for commercial use. Unfortunately I couldn't find one :-(. db-1.85 doesn't fit the bill because it doesn't support transactions. Same problem with gdbm. db.* looked promising but that requires a schema definition.

I already knew about SQLite and remembered reading that it's B-Tree API could possibly be used independently. This was in the back of my mind for a long time, so I set to find out if that's the case. I found that the SQLite's B-Tree API provides a surprisingly clean and complete B-Tree interface with transaction support. There is a TCL based test suite (test3.c) that serves as a good example of how the API can be used.

I am writing a test program to excercise the API. I'll blog my progress.

Saturday, March 05, 2005

Didn't make it to the Championship Round

Today was the online round for Google India Code Jam. I didn't make it. I didn't really expect to make it, so I am not too disappointed. The competition is too good. In case you're curious, I came it at the 60th place; only the first 50 get through the next round. A majority of the participants were still in college. I wonder if I am none of the oldest participants around ;-).

Wednesday, March 02, 2005

E-mail posting troubles

If you're wondering about why my previous blog entry is repeated, blame it on the delay in processing my e-mail. I posted manually when my e-mail appeared to be silently discarded and two days later the post shows up. I hope this is only a temporary problem with blogger.

Tuesday, March 01, 2005

A long time since my last blog

I haven't blogged for a while now. I was practising for the Google India Code Jam and I had a bad shoulder pain (the doctor says muscle has gone into a spasm). Let's give a could shoulder to my shoulder (sorry, bad pun ;-). I had a fairly high opinion about my coding skills but the practise problems in the GICJ Arena and general Topcoder arena deflated my ego considerably :-(. May be I've rusted by 10+ years of coding in the industry, but it's more likely that I was never the coding guru that I was ;-).

Any way, I did participate in the evaluation round yesterday and managed to get a reasonably decent score. The server experienced lots of problems and the results are still not yet out. I think I'll make it to the next round, but I doubt I'll go much further. I was surprised at the amount of obvious cheating that went on in the contest.

Made it to the next round

The results were finally out this morning and happily I've made the cut :-). Actually since both my solutions passed the system test and I was placed sixth in the room, there was no doubt in qualifying. The next round is another story. I don't think I'll make it, but I'll give it a shot.