Systemless Content Management


I'm on a blogging roll. I think it's lack of sleep.

Fear the Content Management System. Big content munching machine. Feed it some content and it will burble happily to itself as it indexes and cross-references it for you. Feel secure in the knowledge that the system will be able to instantly answer your queries.

Well, so long as those queries were anticipated. By the Zope development team, in the year 1990.

Maybe tommorrow you'll want to do a RegEx query. They didn't think of that.

Worse, maybe tommorrow you'll want a different schema. Uh oh. You'll need to migrate the tables to the new schema. Hope you get it right first time!

Maybe tommorrow, you'll want to install a new version of the software. Better not schedule anything else for that day. Pain.

Premature optimization is the root of all evil. Indexing and automatic metadata extraction is premature optimization.

Zero install: new software doesn't change a single byte of the data. If the software doesn't like the data, change the software.

Screw databases. Put everything in a big heap. Grep it as necessary. Or whatever. Want to do something different tommorrow? Just run a different program. Schema changed? Write some conversion code, stick it in a library. Convert on demand as necessary. Not sure quite how to convert it today? Do the best you can, come back tommorrow and tweak it.

Don't index, cache query results. If the code or data changes, throw out cached results automatically.

Be a little tiny bit smart with the caching. Keep not only whether a record matched a search or not, but how close it got to matching. Searching for "floobleball" and a record only contains "floobleflinx"? Well, if you remember that the first 6 characters matched in your first query, tommorrow when you search for "floobleflinx" you can use that to speed up your second query lots.

With that kind of cached query, you don't need indexes.

Oh, and don't give me no database servers. Database engines. Kinda slow to get going, but once they're up things of awe and dread. Goliaths of glorious supersonic spinning steel magnamoniously granting the petitions of their humble clients (once they jump through all the necessary hoops).

If I want a server, I will spawn a server. It will start up swiftly and politely, and not mess about telling me how great and gloriously powerful it is. Once I'm done with it, and if no one else is using it, it will shut down again. Swiftly, politely.

The spawning code goes in the database access library. The server is subservient to that library, which in turn is subservient to the programs that invoke it. The programs don't even need to know the server ever exists. It just works.