What technology would you use to build X?

Posted by Chris Gillis on Jun 18, 2015 8:03:35 AM

building-blocksLast time I wrote about a good way to answer an interview question as well as a less good way. I also mentioned that I would answer that question in this post that you're reading. In other words, we're at now, now.

To recap, the question was "What technology would you use to build a system that does ___________?"

First, we need fill in the blank. The core of the system we are building is a place for people to ask questions that need cited answers. The system will also allow for other users to find questions that need to be answered and submit their answers along with evidence that supports their answers.

I must confess that I haven't made every decision that I will need to make. I'm a big proponent of solving problems at the last responsible moment, and I haven't reached that moment for some major decisions. I am not stuck in indecision though, I have selected a few technologies. I am going to list the relevant questions and give my choices and rationale for each:

Programming Language / Platform

This is one of the first decisions I needed to make. I thought for quite a while before I finally landed on Node.js. Node is great for I/O heavy applications. The platform was built with callbacks and event listeners built in to the api so that the CPU is never waiting for an I/O operation like making a call to a database or writing to the file system. Thanks to the advancements in the V8 JavaScript engine, it's pretty snappy as well. I'm not going to quote benchmarks, but it is sufficient to know that some platforms are faster, and some are slower. I am also more familiar with Node than I am with any other platform, and I think JavaScript is a lovely language.

For now we don't have any needs that Node doesn't address well. I can look to the future and see some things we want to build that are computationally intense, and Node may not be the best option. At that point I'll reevaluate our options and possibly make a new selection. 

Web Framework

Inside node there are many options for web frameworks. The popular ones that I'm aware of are Express, Hapi, and Koa. There are also a handful of frameworks which build on top of Express. Again my decision was partially made based on that which I am most familiar, and that choice is Express. Express is simple to use and easy to understand, and it's also very popular. It may even be the most popular web framework*, though I don't have the facts to back that up. Because it is so popular, there are many, many plugins that do most things you can think to do. One of our tenets at Verytas is that we would rather spend time inventing solutions to new problems then reimplement solutions that already exist.

Front End Framework / Libraries

For our mostly static pages we use server rendering with EJS templates. I chose EJS over Jade (another popular format) because I prefer the look and feel of mostly HTML. For our more dynamic pages I decided to use React. I am precompiling the templates server side with Browserify with Reactify. As a side note I am a huge fan of Browserify. If you are writing JavaScript and aren't using it, you should check it out.

Something is missing...

There are a few big holes in what I've listed so far. It may surprise you that I have not decided what I'm going to use to persist data. Mongo? Postgres? MySQL? SQL Server? Well, no, not SQL Server. EventStoreRethinkDBCockroachDB? There are so many choices that not only can I not make a reasonable choice, I don't think it is prudent to choose yet. In fact, I think the data store is probably one of the last decisions I will make, though I have been, and will continue to, think about the decision as I work.

I also haven't talked about the architecture we are going to be using. Architecture is technique more than technology, but it ranks just as high as, and perhaps even higher than, the technology choices. A basic overview of my plan is to use an event sourced data model with separted read and write models. I'm not going to go into what I mean by that right now, that'll come in a later post as it deserves more attention. If you are itching to learn about it you can start at Martin Fowler's blog post on CQRS or Greg Young's description of CQRS

* Verytasing needed

Get Research at the Speed of News Click Here for a Free Demo of Verytas for Research

Topics: Startups, Technology

Verytas is a tool that lets everyday people easily fact-check the content they see on social and news media sites like a pro.

Verytas pulls from commonly used professional sources as well as human-generated citations or refutations and automagically overlays the information in real-time on your normal browsing experience.

Subscribe to Verytas

Recent Posts