Rebuilding The Codedependant Blog
t has been about 3 years since I launched my blog. At the time the tech was pretty interesting. It was a Django project on mongrel2 app server backed by ZeroMQ and xapian as the search engine. I built out a modular Web UI with a WYSIWYG editor using mootools. But it was rather clunky in how it actually generated HTML and usually required some manual tweaking.
Out With The Old
The WYSIWYG Editor was probably the biggest problem. It took serious liberties in cleaning the HTML and usually resulted in me editing the code by hand in the end. Interesting code blocks with highlighting was a 3 step process and was almost always formatted wrong.
Managing Images was a real pain as well. Dealing images though Django is actually a bit of a cumbersome event in it self. More over, I needed separate servers to serve static files, as well as run Mongrel, including something called procer and m2sh before I could run the actual Django app. 5 process to run a simple blog site. As a colleague of mine once said
Its such a framework-y ass framework
There a lot of moving part when all I really want to to save some text and images.
Writting new entries for my blog was rather painful, which is the exact opposite of what a blogging experience should be. It was time to say good-bye to Django, and find something else.
In With The New
The thing that attracted me to ghost was mainly that it had data driven template, a markdown based text engine under the hood, and, could be used a regular NPM module so I could build my own apps and just use ghost for writing / serving content.
Another big attraction to the Node.js based servers was the lack of servers. In contrast to the traditional WSGI based servers of the python ( and Django ), all I/O in node is non-blocking and asynchronous. Meaning I can use a single Node server to do the work of 4 or 5 Django process. For comparison, The old Django / Mongrel 2 setup had 4 workers and 2 nginx workers for serving static files - That set up could handle about 30 req/s w/ 30 concurrent connections. The new Node / Ghost set up can handle ~ 60 req/s w/ 30 concurrent connections. Nearly double the workload with a fraction of the server processes working.
Of course, Ghost is not with out its share of problems, which I'll go into more later. But overall, I'm excited for this new start and am planning to put up a lot more content now that it isn't as much of a chore.