< It's Time To Dim The Lights
XML-RPC APIs >

[Comments] (10) SQLite: At CodeCon I was mobbed with people who wanted to know why I made the Ultra Gleeper run against MySQL instead of the hip self-contained database, SQLite. Actually I think it was Danny O'Brien, who just plugged the Gleeper in this week's NTK and maybe one other person, but I'm no stranger to micro-mobs. Anyway the answer is that I barely heard of SQLite and I've been using MySQL installations more or less continuously at work and at play for years, so I just went with what I was used to.

I know everyone hates software that's hard to install and that the Gleeper is currently such a software, but I was surprised at how for many people the breaking point was having to set up a MySQL database. If most of that is balking at setting up MySQL, then SQLite will probably solve the balking problem. I haven't installed it but I don't see how it could be harder to install than MySQL. Plus the database files it keeps can live in the same directory as the app instead of in /var/, which I think is probably the big draw though it doesn't make much difference setup-wise.

Because people (including me) are all about self-containment, I'm planning to distribute a copy of SQLObject with future versions of the Gleeper. That should short-circuit the SQLObject version fiasco, and it's the only external library the Gleeper depends on. Including a copy of every single external library works well with NewsBruiser, and as a matter of fact it works with the Gleeper, which already includes about ten external modules in its lib/ directory. Why not SQLObject too?

I don't want to distribute SQLite in the package, because it's not a Python library. I'd have to either distribute platform-specific binaries or hook up with SQLite's build system. That said, I don't have a problem with changing over to SQLite if people think that's easier. I had all sorts of doubts about SQLite, but then I realized they're the same doubts people who use proprietary databases have about open source databases, so they're probably WRONG. SQLite looks really nice.

The other thing I could do is write a script that takes you through the installation process, instead of a document that tells you how to do it. A very powerful tool for making installation documents look less complicated is to hide the verbiage at the other end of hypertext links that might not be followed. I didn't do this because I didn't have time before CodeCon. I'm still not doing it because I'm working on a different project, with a deadline. Spooky! To me, anyway. Whoooo!

PS: This is also why there's no new Beautiful Soup, or whatever else it is I promised you I'd do.

Filed under: ,

Comments:

Posted by Ian Bicking at Fri Feb 18 2005 17:23

SQLite support should probably only take one change to the code, to use SQLiteConnection instead of MySQLConnection (or a sqlite: URI if you are using a newer version of SQLObject, so then it's just a configuration change). So it should be pretty darn easy to try, and an easy decision to push off on the user (even if you still give some reasonable default). SQLObject does pretty well at covering up what few differences between the databases that there might be.

The only important issue I've seen with SQLite is if there's lots of concurrent access, where it starts doing rather poorly.

Posted by Leonard at Fri Feb 18 2005 17:30

The Ultra Gleeper doesn't scale well with lots of users, so lots of concurrent access won't be a problem for a while.

Posted by Nick Moffitt at Fri Feb 18 2005 20:10

I don't hate software that's hard to install. What I hate is when people say "a software" as though you could count how many softwares you had.

But I don't hate you, Leonard, because you're going to fix the gleeper to use SQLite. SQLite is love.

Posted by unclepedro at Fri Feb 18 2005 22:45

I realize that MySQL is totally uncool these days, and more importantly is like using a 1970s era missle to drive a nail into a board for most jobs, but I just wanted to say that I found it very easy to install. And that's saying something.

Posted by Leonard at Sat Feb 19 2005 00:33

Sorry, Nick, I thought "a software" was high-larious.

Posted by Zack at Sat Feb 19 2005 15:36

SQLite may well be love, but AUGH, THE CODING STYLE, IT BURNS US, IT BURNS!

(Hungarian notation. Spaces between parentheses and what they surround. Two-space indentation with cuddled braces. Comments with big ropes of asterisks down the left side. AAAAAAAAA MAKE IT STOP.)

Posted by Leonard at Sat Feb 19 2005 16:28

Zack's a C programmer, so he cares.

Posted by Zack at Sat Feb 19 2005 20:41

It completely puts me off contributing improvements to the engine, is why I care. Like, for an application I care about ((Graydon Saunders/Nathaniel Smith)'s "monotone") I
suspect it would speed things up to be able to precompile
SQL statements at application build time. But am I going to code it? Not if it means I have to read code that looks like that, it doesn't.

(ps. Leonard - the "remember this information" checkbox isn't working for me.)

Posted by Zack at Sun Feb 20 2005 01:15

... or maybe now it is. Wack.


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.