Upgrade to Pro — share decks privately, control downloads, hide ads and more …

❌ error 🖐️ling (Portland, OR)

❌ error 🖐️ling (Portland, OR)

PDXNode
Portland, OR
Aug 8, 2019

In the era of async/await, the grass has never been greener over here in Node.js-land. But when fostering a stable code base, there are still a few major gotchas you need to watch out for, and some of them are less than obvious. Mike will review the most common practical risks and annoyances teams tend to encounter in real-world #javascript applications, as well as his favorite best practices for avoiding those mistakes.

He'll pay special tribute to "parley" (https://lnkd.in/eezaxux), the highly-optimized #stability library that powers async/await usage in Sails & other Node.js packages. You'll learn best practices to streamline common pain points: error negotiation, tolerance (conditional swallowing), retries, timeouts, and interceptions (but, like, for upstream services ☁️, not 🏈).

Mike McNeil (@mikermcneil) has been an avid business user and evangelist for #nodejs for the last eight years. He's also the creator of Sails.js, a popular open-source MVC framework that's kind of like Rails for Node.js.

143a2600e408b5a2edbb00c3631ed5f5?s=128

Mike McNeil

August 08, 2019
Tweet

Transcript

  1. August 2019 @

  2. Thank you!

  3. The Company Mike McNeil @mikermcneil open-source MVC framework for Node.js

    creator of
  4. ❌ error ling @mikermcneil

  5. Everyone has this problem.

  6. Overly complex async logic Usually, you don't need this. Even

    at high scale, there are other, much more immediately-relevant performance and scalability bottlenecks.
  7. Swallowing

  8. Dealing w/ upstream services 3rd party APIs, servers maintained by

    other other internal teams ☁
  9. the code

  10. What's wrong with try/catch?

  11. What's better than try/catch?

  12. …in a Sails app

  13. …in vanilla JavaScript Not using Sails? You can actually use

    the same approach, even in vanilla JavaScript.
  14. npm install parley

  15. None
  16. .intercept()

  17. .tolerate()

  18. .retry() 㾾

  19. .timeout() ⏳

  20. sails.helpers.flow ⚗ (if time allows)

  21. npm install flaverr (if time allows)

  22. questions?

  23. Thank you! @mikermcneil @sailsjs sailsjs.com