Erlang and CouchDb
My work on Fabric is now done, in that I'm now doing just-in-time feature development. That's not to say Fabric is feature complete, but its close enough to be usable, all the core language features and syntax is implemented and it has a good start on a test suite. From this point on, all features will be added as needed.
So now I've started re-writing CouchDb in the concurrent functional language Erlang. Originally I was planning on wrapping my C++ code with an Erlang server, but I've decided to rewrite as much as possible of the old code in Erlang. Now this may seem like I'm abandoning many months of work, but the truth is it was helpful for me to work out the design of the disk storage structures CouchDb in a language I was very familiar with, then re-implement in Erlang. Most of the actual work wasn't coding but design and research, and that time isn't wasted. Also, it would have been overwhelming to design the architecture at the same time trying to get my head around Erlang, I'm not sure that would have been a productive way to about it.
Now after about a week of serious work with Erlang, I'm convinced I made the right decision. Erlang has been much easier to learn than I thought it would be (way easier than Antlr IMO), and already I'm more productive with it than I've been in C++, plus networking, concurrency and fault-tolerance are built in to the language core, its not just some add-on library. This has much to do with Erlang being specifically designed for use in telecomm server applications, and I think makes it particularly well suited for a database engine and server. My plan has always been to make CouchDb massively scalable with node partitioning, Erlang will make that easy.
So, in case you can't tell, I'm very excited about Erlang at this point. It provides me with a much better level of abstraction for this work, much of the drudgery I was experiencing in C++ is now gone. If my high productivity in Erlang keeps up, in a few more weeks I should have matched all my existing C++ functionality, but now with a robust, concurrent server architecture. Yowza!
Posted February 9, 2006 2:09 PM