-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Andrew Piskorski wrote: | On Fri, Dec 24, 2004 at 07:32:07PM -0500, John Richard Moser wrote: | | |>I thought sqlite databases weren't supposed to be opened with two sqlite |>processes at once. There are unimplemented locking commands due to this |>right? |> |>I'm bouncing back and forth in my head trying to decide if I should use |>mysql or sqlite to write a package manager. I'd like to use SQLite | | | This seems like a rather strange design question to be "bouncing back | and forth" on. Do you want to use a client server or an embedded | database for your application?
That's the thing. I'm not sure if this is something I want; but "if I want it later," I can't just gearshift to MySQL. On the other hand, I want a lightweight environment. Part of flexing my muscles is squeezing my head through the bars without breaking it. My design goals are great for embedded systems because they will allow more to be installed than can actually be stored (even accounting for compression).
I'm thinking of practical applications for my ideas, still haven't found a job (so that I can work on this stuff without slacking) or time to sit and play with it. But wouldn't it be interesting to have a system smart enough to maintain itself?
Imagine you have an iPaq. 128M of ram, 64M of flash. In the back you have a 1G storage card for music and documents. For our purposes, let's say that we can discard the consideration that flash has a limited number of writes, because i'm definitely going to destroy it by the end of the day.
So set up Linux on it. It uses the 64M of flash to store the base system and a handfull of applications. Uses about 17M.
Now you install things. Under my scheme (adapted from 0installer's at 0install.net), they'd be installed to the flash drive. They'd be monitored. A database would be kept in /var about them. And of course, space is used.
Now you've installed firefox and everything. You're out of space and still installing. My PM will look for packages not marked "critical" (system will break without) or "hold" (user wants them) and compresses the least used ones. Then it starts scping the compressed files into a server you set up and pointed it to, cryptographically signed with your key of course.
You now have 135M of stuff installed on a 64M flash media. You go out to the store, get some coffee, sit down. Pull the ipaq out, run firefox. It's there. You browse the web, and then run abiword. Via dazuko, the PM is informed, and finds that. . . ABIWORD WAS SHIPPED OFF! ~ OK, time to mess with things. XMMS gets shipped out and erased. AbiWord and needed libs get shipped down. 15 seconds later AbiWord starts.
2 hours later you try to run AbiWord again. It runs immediately, since it's already here. Of course XMMS will have to be reloaded from your server at your house over the Internet, but eh.
I'd originally considered that I may want to do remote administration. I despise the concept of giving a few "Next-generation" features and leaving off other useful ones. That being said, I can probably write my own client-server backing to the PM if it becomes a useful and wanted concept.
| If you want client server, then you | get to choose from MySQL, PostgreSQL, Oracle, etc. etc. If you want | an embedded database, then you'd be looking at things like SQLite, | Metakit, etc. | | The particular or peculiar attributes of each such piece of software | might even lead you to re-consider whether you want client server or | embedded, but simply jumping ahead to "MySQL vs. SQLite" seems decidly | innappropriate. Perhaps you have other unmentioned constraints, but I | personally can't think of ANY case where I would conclude, "Oh, I | can't use SQLite for that, so I have to use MySQL." - nor vice versa, | either. |
Like I said, remote administration. Thinking more, I can't come up with a single case where I couldn't do it another way. Modifying the DB remotely may pose to be annoying anyway; htf is my PM going to say "oh look he set things in the DB i better install them"?
I guess it'd be possible to do it remotely so that on access, they could be "Reacquired" (downloaded and installed) rather than reloaded (copied from localnet server or uncompressed from localhost cache). Still, eh. ~ Is it really easier to have a remote administration panel that does it all automatically on thousands of machines than it is to just write a script to ssh to each machine and run commands to do it? . . . right. . . I'll make sure there's a client/server for the package manager itself, but not to the DB.
Oh well, I can't do it anyway. I don't have a cool name. I need something original, strange, alien sounding to call it. All kinds of spectacular graphics come to mind, but no words with that kind of impact.
| |>because it's a single library reliant on pthreads and libc, and thus |>lightweight and potentially ok for embedded systems; worst case, I write |>a RDBMS shell around SQLite especially for the package manager. | | I had thought about being an ass and writing an RDBMS that 'could' compete with MySQL, just supplying the basic necessary functionality, around SQLite. Just to be funny, you know. Wouldn't be hard to do authentication. Symetrically encrypt copies of the DB encryption key with each user's password. Access to the private key is write (which needs read); access to the public key is read. Direct access gets you a DB full of garbage. Tables, yes, the names and column headings of which are hideously twisted along with the data.
But nah. what's the point. - -- All content of all messages exchanged herein are left in the Public Domain, unless otherwise explicitly stated.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB3a+DhDd4aOud5P8RAi9wAJ9kcPHTekJuVa1zhn5E/J58ULeMSwCfZ94V cM99HajOcc2UtiSTOQXQDNU= =JSTV -----END PGP SIGNATURE-----