It’s asynchronous all the way down
Captain Obvious has something to tell us:
Asynchronous methods can call synchronous ones, but synchronous methods can’t call asynchronous methods, or they must become asynchronous.
Duh.
What does that mean for the Node.js developer however? Well, it means that when building infrastructure pieces for an application, if anything a method is going to call into has any chance of being, or of becoming asynchronous, then that method itself needs to be asynchronous. More or less, that in turn means that the lower-level the code is, the more it needs an asynchronous API.
This is really important, and shouldn’t be understated: asynchrony needs to be baked into your applications at the lowest levels as early as possible. If you don’t, a major refactoring is to be expected, and it’s not going to be fun. This is particularly important to keep in mind if you came from a platform that doesn’t put as much an emphasis on asynchrony as Node does.