Yesterday I spent the majority of the day working on the Noteworthy API, and the blog post creation code was the primary focus. One of the goals I've been working towards is to have the entire blogging engine (both the API and the Web front end), run well on a cheap Linux-based web server using a first generation 166MHz Pentuim processor with 32MB RAM. At the moment the code will run on a 200MHz system with 64MB, but that's not good enough. It has to run on servers nobody in the first world would ever want to use. The reason is simple: I want this to be the blogging platform used in developing nations and people who don't want to spend more than $2 a month for server space. So, in order to reach this goal, Noteworthy needs to be able to run without a MySQL, Postgress, or any other database back-end.
The WordPress Problem
I've been an active member of the WordPress community for the better part of five years and have used the platform to power hundreds of sites, from obscure blogs (like mine) to heavy-traffic sites with tens of thousands of people visiting every day. The number one issue that I've seen time and time again is how much server power we need to have available just to run the site. Yes, there are a number of tweaks and tips people can do to run WordPress on older hardware, but why should the average person need to know how to do these things? It's 2012. We should be more intelligent about this.
As a result, I've had to make a lot of compromises in order to ensure Noteworthy wouldn't be as big and bulky as WordPress, yet work (at least) as reliably. One of these compromises is the "No Database Required" element. The first release of the software is going to be as barebones as you can imagine, but it's going to work. How will you know? This site will be running the most slimmed-down version of Noteworthy at all times.
I will admit that if Noteworthy did employ a database, be it MySQL or some other system, then the code would be much easier to write. I could move a number of the content-creation rules to the database. I could simplify the index creation code. Heck, I could probably slice out over 400 lines of code from the Evernote-related classes and slim things down quite a bit! But that would be the lazy way of solving the problem. The database would only be used when updating the static content, and only because the developer (being me) didn't want to sit down and do the hard work of thinking about the best ways of indexing, sorting, and storing information.
What fun is writing a minimalistic blogging platform without sitting down and asking the hard questions about the best ways of indexing, sorting, and storing information?
Go Small or Go Home
One of the recent trends we see with software is that tools that do a relatively simple task require more and more resources with every update. This is for any number of reasons but, as someone who cut his programming teeth on systems that measured memory in kilobytes and hard disks that maxed out at a massive 10 megabytes, it's something I want to reverse. The computers we have today are far more powerful than what we had ten years ago, yet the things most of us actually do with them are not much more complicated than what we did in 2002.
Spreadsheets are more complex, yes, but not for most of us. Word Processors are more complex, yes, but most of us rarely use more than a handful of functions. Web sites are more complex, yes, but mainly for the browser. A lot of the power we've been spoiled with recently have been going to waste. As a software developer who's put a lot of time and effort into building software for people and corporations, I'll certainly take my share of the blame for this processor and memory-heavy trend. That said, it's time to pull things back and make them better for people who either can't afford the best hardware, or can't be bothered to optimize their systems.