The official blog from the team at Runnable.

Think Before You Mongo

I believe choosing the right database for your application is an even more important decision than choosing your programing language. Picking the wrong database can really hurt you down the road.

MongoDB is the go-to database for many NodeJS applications. It has its uses, but despite the hype, it’s probably not the best choice for your application’s main database. Many people choose Mongo for the same reason we did: its schema-less design makes it simple to set up. This enabled us to focus on quickly building out our MVP. But if you take this path, beware that you may be charging a large sum to your tech-debt card.

Keep reading
Using a Slack Bot to Improve Customer Support

We rely heavily on Slack for communication throughout our company, so it was only a matter of time before we started utilizing Slack bots to improve our customer support workflows. With some light reading and a little programming, we’ve begun automating many mundane tasks which help us improve how we troubleshoot customer issues.

Keep reading
Handling Errors with ES6

Over the last couple of months, we’ve transitioned away from callback-style error handling. Instead, we’re handling our errors with ES6 features (mainly promises and classes). In this post, I’ll talk about why we’ve made this transition.

Keep reading
Cost-efficient container scheduling with Docker Swarm

We run hundreds of thousands of containers across hundreds of servers a day. One of the biggest challenges we face is how to efficiently schedule containers. In this sense, scheduling is managing the allocation of containers to a set of servers in order to keep things running smoothly. Because the containers we schedule are components of our customers’ applications, we have to schedule them with no prior knowledge of their performance characteristics.

Keep reading
Libraries We Use When Building Microservices

Like any other generic solution, the microservices architecture has its tradeoffs; some things become easier and some become harder. When switching to microservices, one of the most common challenges is the question of where to put shared code.

Keep reading
Typing JavaScript Using Flow

One of the things that I found difficult when writing and refactoring in Ponos was maintaining the borders between the few classes and their functions. Some of the class methods returned values, some could throw errors, and others returned Promises. Relying on the inline documentation was insufficient because methods were changing faster than I was updating the documentation. Beyond these issues, I found myself moving or copying large chunks of testing code around for relatively small refactors, further fueling my motivation to find a better way.

Keep reading
Grepping History

In my estimation, the most useful Unix command will always and forever be grep, but history is also high on my list. Combined, the two form a dynamic duo that can be used to answer the question, “what did I come up with to solve x, y or z hacky problem from the command line?”

Keep reading