Date: Tue, 27 Jun 2017 10:00:00 +0000
<div class="trix-content"> <div>JSJ 267 Node 8 with Mikeal Rogers, Arunesh Chandra, and Anna Henningsen</div><div>On today’s episode of JavaScript Jabber we have panelists Joe Eames, AJ O’Neil, Amiee Knight and Charles Max Wood and we are talking about Node 8. To help us we have special guests Mikeal Rodgers, Arunesh Chandra, and Anna Henningsen. It’s going to be a great show. Tune in.</div><div>[1:56] Is Node 8 just an update or is there more?</div><ul> <li>More than just an update</li> <li>Two main points:</li> <li>Improved <a href="https://www.npmjs.com/package/prana">Prana</a> support</li> <li>Native API</li> <li>Native APIs are helpful for Native Add-ons. For both the consumer and the developer side.</li> <li>Prior to update these Node Native modules ran in C++ and bound to specific to Node 8 APIs.</li> <li>Causes these modules to be updated or reconciled every time these modules are rereleased.</li> <li>Creates burden for module maintainers.</li> <li>Creates friction in upgrading Node versions in production departments.</li> <li>If you have a deployment depending on a certain Native module, some of the modules may not get updated in time when updating your Node versions. Keeping people from updating Node.</li> <li>Creates compatibility issues with Node users not using Node 8</li> <li>Experimental support for a Native layer in Node 8 to eliminate these issues as much as possible.</li> <li>Important milestone for the module ecosystem.</li> <li>You can write extensions for Node in C++ and it decouples V8 so you can use something else on the front.</li> <li>Modules takes dependency on V8 API specific to a particular version. So if V8 changes your module will be extracted from that.</li> <li>As a side benefit, you can have another VM to take advantage of that.</li> <li>Major version upgrades mean updating Native modules and usually some of those modules haven’t updated to the newest version of Node and be complicated.</li> <li>Deep dependency wise, about 30% depends on a Native module somewhere</li> <li>In the future, with the Native API, you’ll be able to update Node without breaking modules.</li> </ul><div>[5:51] What kind of work went into this?</div><ul> <li>Most of the work was in C++</li> <li>First thing that was done was, they looked at the top dependent Native modules in the ecosystem.</li> <li>Looked for what kind of V8 exposure they had and cataloged it</li> <li>Looked at how these APIs and what their purposes were</li> <li>Looked for a way to extract them so that they are part of Node Core</li> <li>Created neutral APIs, now part of the Node core.</li> <li>All C APIs</li> <li>Also has a C++ wrapper to improves usability of the API.</li> </ul><div>[7:17] What’s an example of what you can do with these APIs?</div><ul> <li>Native modules allows for tighter integration and better module performance</li> <li>Specific APIs that you can use in V8 that isn’t available through JavaScript</li> <li>If you have a C++ variable code and you want to expose a variable into JavaScript, that is V8 API note a Node 8 API</li> <li>Having it bound directly to the VM was something they wanted for a long time</li> <li>Google controls V8 and they bind to V8</li> <li>Created a better relationship with Google starting in IOJS</li> <li>Also worked with Microsoft with their Node Shocker work.</li> <li>Same with <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a> </li> <li> <a href="https://github.com/mozilla/spidernode">SpiderNode</a> is in the works</li> </ul><div>[9:23] Have you guys done any testing for performance?</div><ul> <li>Some. There is a performance working group.</li> <li>There is a need to stay on top of V8</li> <li>V8 team has focused on new language features</li> <li>Many features have been added over the years</li> <li>Many didn’t come in optimized</li> <li>The performance profile has changed with these features</li> <li>If you’... Support this podcast at — https://redcircle.com/javascript-jabber/donations Advertising Inquiries: https://redcircle.com/brands Privacy & Opt-Out: https://redcircle.com/privacy