Stephen Hill's Bloggie Writing about my interests; Programming and Formula One.

Redesigning my Blog using CouchDB, Memcached and ASP.NET

9 months ago

First of all. I'm glad that I'm finally writing here again. The last time I posted what I would call a "Proper Post", was 9 months ago - Not Good! So I've set myself a little project which is to redesign my blog using a couple of cool new technologies.

So I've decided to write the application code which runs this blog with ASP.NET, CouchDB for the data storage and Memcached as a caching layer. Currently the blog uses ASP.NET, Internal Memory Cache and SQL Server Express 2005.

Some of you may be thinking, "Why don't you just install WordPress?", and you would be right, I should use WordPress, however. I wouldn't really learn anything new from using WordPress (which I have used before in other projects). I want to learn new technologies, think about new ways of doing things. Plus I'm a programmer and I like writing my own programs!

So, lets jump straight in and define the goals for my redesign project.

Goals

CouchDB

CouchDB looks like a very interesting non-relational key/value database where the "value" is a JSON object. There's a lot I could say about CouchDB but I think this introduction covers just about everything. The area I'm most interested in is using the JavaScript MapReduce functions to create structured views of the data.

In order the communicate with CouchDB, I am going to write my own C# class surprisingly called CouchDB .Net which will open a HTTP request to the CouchDB server and return a JSON object which can then be parsed by a JSON class for .Net. There isn't very much code at the moment but over the next couple of weeks I hope to have functional code which supports most of the features of CouchDB.

Memcached

Memcached is a very fast in-memory key/value pair data store. I will be using the .Net memcached client library to access the Memcached instance. This will cache database queries until the item is removed from the cache by code or expires. I will be implementing Memcached after the redesigned blog has gone live just so I can watch the performance of CouchDB.

Multi-function Frontend

Currently the blog is administered from a separate backend control panel which to some degree, makes writing the frontend code a lot easier. However, I like the idea of having everything in one place and in most web applications today, this is the case. I suppose it will work in a similar fashion to MediaWiki.

MarkDown

I don't want to use a WYSIWYG editor because as far as I'm concerned from past usage, they all suck! I also don't like writing pure HTML into a textarea because it's very hard to read. Instead I'm going to go down the Stack Overflow route and use MarkDown syntax which I can also added HTML to if required. This will also make writing and editing of blog posts on my iPhone much easier.

iPhone Compatibility

A couple of weeks ago I got my first iPhone with Orange and I now know the pain of accessing most websites through a phone. So I want people to be able to have the best possible experience when browsing my site through a mobile device, by which I only mean, the iPhone. Although I still hate Apple for their crappy and probably illegal No Refund Policy when buying content through iTunes.

CSS3 and HTML5

It's time to forget about Internet Explorer. CSS3 and HTML5 are the way forward and it's time to get using them. If you can't be bothered to use a decent browser, you only have yourself to blame.


So that's the plan. There will be a beta version available at beta.gatekiller.co.uk which will actually be the trunk version, so it should be buggy. Hopefully if all goes well, I may release the source code under the Bloggie Project which never really got anywhere.

Cheers
Stephen.

Previous Comments

  1. Name Sam Wednesday 02 December 2009 2:45 PM

    I like this project, as well as CouchDB. I find the trouble with CouchDB is a lack of supporting web hosts, which will hopefully change shortly as it's picking up steam rather quickly. Do you host this site on your own servers or on a VPS?

  2. Name Stephen Hill Friday 04 December 2009 9:51 AM

    Hi Sam,

    Your right, there are a lack of web hosts at the moment that support CouchDb. The only people I know about at the moment are http://hosting.couch.io/

    I host all my own websites on my own internet connection and servers. For the redesign I will be buying a small and cheap pc/server to host CouchDb, Memcached and I'm going to look into running ASP.NET on Mono.

    Thanks for the comment.

    Cheers
    Stephen

  3. Name Tim Wednesday 14 July 2010 7:26 PM

    Did you ever end up getting anywhere on this project? Sounds like something fun to do, not to mention read through source code on how your accessing CouchDB from .NET something I've been thinking about as of late.

  4. Name malhar Vora Wednesday 01 September 2010 4:41 AM

    Great idea Stephen. I want to know from where you will download CouchDB .Net?. I tried to find it but it is not available to download.

Leave a Comment