Platform as reflection of values: Joyent, node.js, and beyond
1. Platform as a reďŹection of values
Joyent, node.js, and beyond
CTO
bryan@joyent.com
Bryan Cantrill
@bcantrill
2. Platform and values
⢠Software platform decisions are big, important decisions with
lasting consequences
⢠One doesnât merely select component infrastructure for where it
is, but also where itâs going â and what it represents
⢠In the post-open source world of software infrastructure, this is
reďŹected and guided by a communityâs values
⢠Beyond right tool for the job, it is the right values for the jobâŚ
⢠âŚand then the right software for the values
4. Platform core values
⢠All of these values are important â but they are in tension
⢠Platforms aspire to balance all of them â but for every platform
some small subset represents its core values
⢠These core values attract a like-minded community â and
become self-reinforcingâŚ
14. Growing core values
⢠While the core values can mutate over time, it usually isnât with
the same people; core values often track people
⢠Ideally, a community is able to grow its core values by attracting
and welcoming people with those new values
⢠In 2010, there was reason for optimism for node.js, as it was
enjoying an inďŹux of technologists bearing the scars from failed
experiments in Twisted Python, Event Machine, C, etc.
16. Growing core values: Debuggability
⢠As we at Joyent built our own production infrastructure on
node.js, we began to need to assert some of our own valuesâŚ
⢠It started with debuggability as we added:
⢠DTrace probes in node.js core (2010)
⢠DTrace probes in arbitrary node.js (2011)
⢠MDB support (postmortem!) for node.js with mdb_v8 (2011)
⢠DTrace ustack() helper for node.js (2011)
17. Growing core values: Rigor
⢠As we hit performance problems in production, we made heavy
use of the DTrace ustack() helper for proďŹling
⢠The need for rigor in understanding this output inspired us to
invent ďŹame graphs (2012) to visualize node.js stacks:
18. Growing core values: Maintainability
⢠As we had more and more services in node.js, we found the
need for a uniďŹed logging libraryâŚ
⢠We developed Bunyan in 2012, reďŹecting not only our values of
maintainability but also debuggability (DTrace probes built in!)
⢠Bunyan also reďŹects our value of stability: we needed
abstractions that we could build upon!
19. Growing core values: Robustness
⢠We found that the de facto modules in several critical areas
didnât entirely reďŹect our own values â especially around
robustness and debuggability
⢠For building REST-based services we developed Restify (2011),
with an emphasis on RFC compliance and debuggability
⢠For constructing robust asynchronous pipelines, we developed
vasync (2012), with a focus on error handling and debuggability
20. Growing core values: Robustness
⢠An early problem â and one with many dynamic languages â
is increasing memory usage over time
⢠Itâs easy to errantly hold a reference to an entire object graph!
⢠We added â::ďŹndjsobjectsâ to mdb_v8 (2012) and have used to
ďŹnd many thorny production problems
⢠We later added the ability to iterate over all functions with
â::jsfunctionsâ (!) â and then the ability to actually print the
variables in a closure with â::jsclosureâ (!!)
21. Growing core values: Stability
⢠We maintained quite a few binary add-ons â and immediately
saw the need for stability in the interface
⢠Stability does not mean intransigence or stasis!
⢠Stability means developing the right abstractions that can
survive future change on both sides of the interface boundary
⢠C++ can make this difďŹcult task much more challengingâŚ
⢠We developed v8plus (2012), a C interface for add-ons that we
continue to use in lieu of NAN (or N-API)
22. Growing core values: Resiliency
⢠Our experience trying to incorporate resiliency in our node.js-
based systems led us to taxonomize node.js errors
⢠The resulting document quickly became authoritative; searching
ânode.js error handlingâ + âIâm feeling luckyâ still yields it:
23. The challenge of changing values
⢠Just because we believed in production-oriented values like
debuggability, robustness, and stability doesnât mean these
values were widely shared!
⢠Values arenât necessarily contagious!
⢠The node.js community broadly identiďŹed more closely with
growth-oriented values like approachability, expressiveness,
and velocity
⢠By 2014, these values were increasingly coming into conďŹict,
and a fracture was (in retrospect) inevitableâŚ
26. Farewell to TJ
⢠TJ Holowaychuk was the most proliďŹc node module contributor;
if nothing else, probably wrote more node.js than anyone else
⢠TJ wasnât the ďŹrst; there had been foreshocks:
27. The challenge of large communities
⢠The departures highlight a challenge with larger communitiesâŚ
⢠When communities are large, values can easily conďŹict or
become diluted
⢠Smaller communities identify more strongly with their values â
but larger communities are more likely to fracture over them
⢠Sometimes this is a fork, but more often, people just leave
⢠Sometimes the values change because people leave, but more
often people leave because the values change (or fail to!)
28. Divergent values
⢠We erred in either not recognizing or not articulating that the
io.js fork in late 2014 represented divergent values
⢠Even to the degree that we recognized it and articulated it, not
clear that it mattered: the problem was the divergence itself
⢠The problem was even more basic at root: we held aspirations
for the values of node.js that it didnât hold for itself
⢠The values of node.js are (and probably have long been) the
values of JavaScript itselfâŚ
30. node.js
⢠The values for JavaScript/node.js and our values didnât align â
and it was clear that they werenât going to
⢠We transitioned node.js to a foundation in 2015
⢠But many in the community putatively believed in our values (or
wanted to), so we remained engaged
⢠This hasnât been easy, and one issue in particular highlights the
challenge in accommodating divergent valuesâŚ
31. Promises
⢠Promises are a different way of asynchronous programming,
dating back to Argus, a CLU derivative from the mid-1980s:â¨
â¨
â¨
â¨
â¨
â¨
⢠node.js was originally implemented in terms of promises, but
removed them entirely in February 2010 (0.2!)
32. Promises
⢠Because of their use in broader JavaScript, demand grew to
reintroduce promise support in node.jsâŚ
⢠But JavaScript promises conďŹate operational errors with
programmatic errors in that they both become exceptions
⢠Unlike thrown exceptions absent promises, we cannot know if a
thrown exception in a promise is going to be later caught or not
⢠This makes it challenging to abort a process on, say, a type
error with enough information to debug it post-mortem
⢠Promises make writing robust software more difďŹcult
33. Promises
⢠Promises embody the divergence of values in modern node.js:
approachability, compatibility and expressiveness in tension
with robustness, debuggability, and simplicity
⢠If node.js must do whatever JavaScript does in the name of
compatibility, is node.js permitted its own values?
⢠This conundrum was on vivid display in the util.promisify() PR:â¨
â¨
https://github.com/nodejs/node/pull/12442â¨
36. Promises
⢠This is not an issue of someone being right or wrong!
⢠These are two different value systems â both admirable and
reasonable â coming into conďŹict
⢠This issue was put to a vote: 9 in favor, 1 against, 4 abstained
⢠But elections do not resolve differences in values
⢠Democracy does not necessarily imply leadership!
37. The challenge for Joyent
⢠We at Joyent are resigned to the divergence in values
⢠This doesnât mean weâre abandoning node.jsâŚ
⢠âŚbut it does mean that we are actively considering other
platforms when making future software platform decisions
⢠In the coming year(s), you will certainly see us in the Go
community â and perhaps Rust or others
⢠These communities arenât necessarily a perfect reďŹection of our
values either â but we feel better prepared for any divergence
38. The challenge for node.js
⢠node.js should deďŹne what its values are â and arenât
⢠Growth may be an objective, but growth is not a value!
⢠Claptrap around values that node.js doesnât in fact have only
plants the seeds of disappointment and discord
⢠node.js should be upfront that compatibility with JavaScript will
trump robustness, debuggability, stability, etc.
⢠We remain hopeful that node.js will be a big enough tent to not
run so counter to our values that we abandon it entirely!
39. Platform as a reďŹection of values
⢠When picking a platform, values matter
⢠Get consensus on values before selecting a platform!
⢠With values in hand, the challenge becomes: how does one
determine the values of a community?
⢠How a community deals with an open issue reďŹects much on its
values around robustness, thoroughness, rigor, etc.
⢠Itâs a balance between your values and that of a communityâŚ
⢠âŚthat may require you to create your own platform and attract
your own community bound by like values!