Delivering Hapi-ness


There is something very happy about delivery the 1.0.0 of a product isn’t there? I am very excited for the node team in Walmart Labs, as they just got to push the button on v1.0 of our API server framework for node.

Extraction

This is a 1.0 that has been coming very deliberately. One of the attributes of a great framework seems to be extracting it from a real product. Hapi has come from a couple of different products, and has been powering various projects at Walmart Labs and beyond. Originally, it’s job was to be a world class API server, which is where its heart is.

Plugins

You will see features that make it very easy for teams to plugin different API endpoints in a composable manner. This is particularly great if you have different teams iterating on different endpoints, but is also nice to manage in general. Hapi also goes beyond APIs, as we have the need to serve web experiences as well as JSON.

The plugin API itself is a relatively recent addition to hapi, and I think it has turned out very nicely.

Out in the open

Hapi has been developed in the open from day one. There are no internal forks of the project, or issue trackers. What you see on GitHub is what you get. It is clear how to contribute and there is much rigor around the process. Hapi is an equal opportunity framework, so come join us 🙂

Engineering Rigor

Speaking of that rigor, endpoint services development needs to be solid as a rock. That means that the foundation itself has to tough as nails. The team take this really seriously, and you will quickly notice how solid the tests are. One prerequisite for incoming code changes are that they keep test coverage at 100%. Having watched this team do their thing over the last year I have been so impressed by Eran’s leadership and the entire teams performance.

If you are building APIs and want to do so in node, hapi could be for you. The performance has been fantastic, and rich features such as advanced caching are available via simple configuration.

For example, we run into the case where we have an orchestration server that sits in front of many downstream endpoints. Some of those endpoints are third parties that we don’t have control over. Thanks to catbox, we can tell the system something like:

“Try to get something refresh, but if a result doesn’t come back in 800ms and we have the data in cache (which is not stale… as in isn’t older than 1 hour say) then send back the copy, and then when the result does come in update the cache.”

The Hapi-ness Advantage

I have been reading a lot about happiness, via books such as The Happiness Advantage. It feels great to have a win-win-win by developing our core framework in the open. We have seen great input from the open source community that has resulted in a better project.

Congrats to the team on the 1.0 release. It feels good to be hapi.

Leave a comment

Your email address will not be published. Required fields are marked *