Node.js Core State of the Union- James Snell

42
Node.js Core State of the Union James M Snell, IBM @jasnell

Transcript of Node.js Core State of the Union- James Snell

Page 1: Node.js Core State of the Union- James Snell

Node.js Core State of the Union

James M Snell, IBM

@jasnell

Page 2: Node.js Core State of the Union- James Snell

Community. Gemeenschap. Communauté. Comunidad.

When I first got involved with Node.js Core, there were 14 active participants (not counting everyone involved in io.js)

Up to that point, Node.js had 681 contributors over it's lifetime.

Page 3: Node.js Core State of the Union- James Snell

Gemeenschap. Communauté. Comunidad Just over a year and a half later, there are 85 contributors with commit

access to the main repository (with more added regularly)

The contributors list now tops 1084 individuals.

Community.

Page 4: Node.js Core State of the Union- James Snell

Gemeenschap. Communauté. Comunidad

476 people in the Node.js GitHub organization

103 GitHub repositories

92 GitHub teams

4109 forks of the node.js/node repository

Community.

Page 5: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

There have been 2.7k+ commits on master since v4.0.0

49% focus on improving documentation, tests and benchmarks.

15% focus on updated tooling, build and dependencies.

17 semver-major commits in v5

90 semver-major commits in v6

Page 6: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

As soon as we made it easier for the community to contribute to Node.js,

That community immediately began working to make

Node.js more secure, stable, and performant.

Page 7: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

http://benchmarking.nodejs.org

Page 8: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

CanaryintheGoldmine

Withcitgm,wearenowproac6velyrunningtestsfor68ofthemostdependedonmodulesintheNode.jsecosystem–catchingregressionsbeforetheyhappen.

h@ps://github.com/nodejs/citgm

Page 9: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

CanaryintheGoldmine

Runningallsemver-majorchangesthroughbothCIandcitgmbeforetheylandisnow

standardprac6ce.

(shoutoutto@TheAlphaNerdformakingthishappen…andgoseehistalk!)

h@ps://github.com/nodejs/citgm

Page 10: Node.js Core State of the Union- James Snell

Stability. Stabilität. Stabiliteit. Cobhsaíochta.

Every non-trivial commit tested on… •  FreeBSD •  ARM v7 – Ubuntu •  ARM v7 – Wheezy •  ARM v8 – Ubuntu 14.04 •  ARM v8 – Ubuntu 16.04

(arm64) •  LinuxOne •  CentOS 5 (32 / 64) •  CentOS 6 (64) •  CentOS 7 (64) •  Debian 8 (64, x86) •  Fedora 22 •  Fedora 23 •  Fedora 24

•  Ubuntu 12.04 (64) •  Ubuntu 14.04 (32 / 64 / PPC BE &

LE) •  Ubuntu 16.04 (32 / 64 / Docker

Alpine) •  MacOS •  Linux-FIPS (Ubuntu) •  AIX •  SmartOS 14 (32 / 64) •  Raspbian Wheezy (pi 1, pi 2, pi 3) •  Windows 10 (VS 2015) •  Windows 2008 r2 (VS 2015) •  Windows 2012 r2 (VS 2015)

Page 11: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

v0.10.0

io.jsv1.0.0

v0.12.0

io.jsv2.0.0

io.jsv3.0.0

v4.0.0 v5.0.0 v6.0.0

2013 2014 2015 2016

There have been 120 Node.js releases* since January 2015

31 releases to v4, v0.10 and v0.12 under the LTS Plan

*including all of the io.js releases

Page 12: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

New major release every 6 months

Even Numbered Releases in April Odd Numbered Releases in October

Even Numbered Releases go under LTS Plan in October

LTS Plan === 30 months of guaranteed support.

Page 13: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

Current Node.js v6.5.0

LTS

Node.js v4.5.0

Maintenance Node.js v0.12.13 Node.js v0.10.44

Page 14: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

Current Node.js v6.5.0

LTS

Node.js v4.5.0

Maintenance Node.js v0.12.13 Node.js v0.10.44

2016-12-31 2016-10-31

2018-04

Time to Upgrade

LTS Expiration:

Page 15: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

Node.js v6.x "Boron" LTS

October 2016

Will be supported until April 2019

Page 16: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

Node.js v7.0.0 Current

October 2016

Will be supported until ~June 2017

First Beta build next week

Page 17: Node.js Core State of the Union- James Snell

Releases. Publiceren. Veröffentlichen. Publier.

Node.js v8.0.0

April 2017

Will be supported until April 2020

Page 18: Node.js Core State of the Union- James Snell

Where we're going Waar we naartoe gaan Où nous allons

Better Web Standards Support

Improved ES6/7 Support

Improved Node.js Internals

Improved Runtime & Post Mortem Debugging

New Installer

Continued focus on Community

Page 19: Node.js Core State of the Union- James Snell

Web standards. Webstandaarden. Les standards du Web.

WHATWG URL Parsing

const url = new URL('http://nodejs.org');

https://github.com/nodejs/node/pull/7448

Page 20: Node.js Core State of the Union- James Snell

Web standards. Webstandaarden. Les standards du Web.

Improved HTTP 1.1 Spec Compliance

Better Input Validation

Enhanced Security

Page 21: Node.js Core State of the Union- James Snell

Web standards. Webstandaarden. Les standards du Web.

HTTP/2 ?

https://github.com/nodejs/node-eps/pull/38

Page 22: Node.js Core State of the Union- James Snell

Language standards. Normes Langage de programmation.

Continued improvements to ES6/7 Support

Promises async await

ES6 Modules

Node.js v7 should ship with V8 5.4

Page 23: Node.js Core State of the Union- James Snell

Language standards. Normes Langage de programmation.

async await is coming. (we just don't know when)

We have some work to do on Promises still.

(Namely, making Promises compatible with Node.js Debugging and making the Node.js

API compatible with Promises)

Page 24: Node.js Core State of the Union- James Snell

Language standards. Normes Langage de programmation.

ES6 Modules are a difficult, non-trivial problem.

Significant effort is going into getting it right.

It will happen, but may take some time.

(andabigshoutoutto@bradleymeckforleadingtheway)

Page 25: Node.js Core State of the Union- James Snell

Language standards. Normes Langage de programmation.

The Node.js Core Team is exploring how to better engage with TC-39 to ensure that new JavaScript

language features meet the needs of Node.js users.

Page 26: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Async-Hook

Multiple-Isolates (Workers)

New Native Module API/ABI

Static Error Codes

uv_link_t Streams

Multiple VMs

Improved Embedding

Improved i18n

Page 27: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Async-Hook

Provides the ability to attach listeners to the event-loop lifecycle.

Allows peeking behind the curtain.

https://github.com/nodejs/node-eps/pull/18

Page 28: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Multiple-isolates (Workers)

Worker-based multi-threading within a single Node.js process.

https://github.com/nodejs/node/pull/2133

Page 29: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

New Native Module API/ABI

A new API/ABI for native module developers that abstracts the VM layer.

No more binding directly to V8 APIs.

https://github.com/nodejs/abi-stable-node

Page 30: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

New Native Module API/ABI

#include <node_jsvmapi.h> void Method(napi_env env, napi_func_cb_info info) { napi_set_return_value( env, info, napi_create_string(env, "world")); } void Init(napi_env env, napi_value exports, napi_value module) { napi_set_property(env, exports, napi_property_name(env, "hello"), napi_create_function(env, Method)); } NODE_MODULE_ABI(addon, Init)

Page 31: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Static Error Codes

Every error generated by Node.js will have a stable, static error code allowing greater consistency in errors.

No more parsing error messages.

https://github.com/nodejs/node/pull/6573

Page 32: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

uv_link_t Streams

Flexible, powerful chained streams API for native modules built directly on libuv.

https://github.com/nodejs/node-eps/pull/32

Page 33: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Multiple VMs

Starting with Node.js on Chakra, work is underway to enable Node.js core to be fully VM agnostic in the future.

https://github.com/nodejs/node-chakracore

Page 34: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Improved Embedding

Working with members of the Electron and IoT communities, work is underway to make it easier to embed Node.js

in other environments.

https://github.com/nodejs/node/pull/6994

Page 35: Node.js Core State of the Union- James Snell

Internals. Wewnętrzne. Sisäosat. Interno.

Improved Internationalization

Work is underway to improve Internationalization in Core by making it easier to discover i18n data sets, transcode Buffers

from one character encoding to another, query Unicode character properties, and more.

https://github.com/nodejs/node-eps/pull/15

Page 36: Node.js Core State of the Union- James Snell

Debugging. Risoluzione dei problemi. Fehlerbehebung.

Common Heap Dump Format

Improved Core Dump Analysis Tooling

node-report – Human-readable diagnostic summary

JavaScriptAPIforNode.jsCoreDumpAnalysis

Page 37: Node.js Core State of the Union- James Snell

Debugging. Risoluzione dei problemi. Fehlerbehebung.

h@ps://github.com/nodejs/post-mortem/issues/13

h@p://github/nodejs/nodereport

h@ps://github.com/nodejs/post-mortem/issues/33

Page 38: Node.js Core State of the Union- James Snell

Debugging. Risoluzione dei problemi. Fehlerbehebung.

Node.js now includes experimental support for the Chrome Inspector.

$ node --inspect

Page 39: Node.js Core State of the Union- James Snell

Installation Shuiteáil. Instalacja. Монтаж.

WorkisunderwaytobuildanewElectron-basedInstallerforNode.js

h@ps://github.com/nodejs/installer

Page 40: Node.js Core State of the Union- James Snell

Gemeenschap. Communauté. Comunidad

Come help us. There's lots to do still.

500+ Open Issues in the Core repo:

100+ Feature Requests 100+ Documentation Issues 60+ Windows Related Issues

58+ HTTP Related Issues 30+ Confirmed Bugs

20+ Issues marked "Good First Contribution"

Community.

Page 41: Node.js Core State of the Union- James Snell

Gemeenschap. Communauté. Comunidad

The Node.js Technical Steering Committee has asked the Node.js Foundation to explore new opportunities for

expanding and diversifying the community of Node.js core contributors.

Community.

Tracy Hinds @hackygolucky

Mikeal Rogers @mikeal

Page 42: Node.js Core State of the Union- James Snell

Grazie. Dank je wel. Danke.

On behalf of all Node.js Core Contributors,

Thank you.

Thank you.