Skip to content →

Node.js and Yahoo

I kicked off NodeSummit today with a short talk about where Yahoo uses Node, why we continue to use Node, and the practices that help us use Node effectively.


First talk of the day.

I spoke a bit about a project I’ve spent the last year on: using Node to handle data pushed out of Jenkins. Folks appreciated the honesty about Jenkins’ user interface.

Jenkins is the solution that we trust, but nobody loves using it. At Yahoo, we use Node to help us make Jenkins a bit better to use:

  • scripting job creation, editing, deletion
  • handling log messages
  • displaying information about builds with a web interface

Noted.

During the talk I mentioned something called RDL.

Nope, not the Romanian Deadlift. It’s something we call “Resource Description Language”, a machine-readable spec for web APIs. We started using it for some internal deployment APIs we worked on last month. This spec is transformed into hapi route configurations that contain detailed joi validators.

What’s great about this is that when you change the RDL, it changes the validators and comments which we present using the lout module. We do this by merging together existing hapi route objects using the RDL spec as the source of truth, so the hapi routes we have in code are validator-free and require the RDL as the source of truth. This has worked very well and our spec always matches the reality. This works a lot better than other systems that actually generate source code from RDL, which is not ideal because it cannot stay in sync as your code changes.

It’s been fun! I’ll also be on the “Scaling Business Critical Node.js Applications” and “v0.12 and Beyond” panels tomorrow, so check those out if you’re attending NodeSummit.

Published in Technology