watch here for the talks to be released
V8 β€οΈ Node
Β
Node is a first-class citizen in V8
No V8 commit can land if it breaks Node
Jeremy Foster
All are basically microcontrollers with the exception of the system on a chips
There is SO MUCH available in NPM
https://www.adafruit.com/product/2690
Honestly, it sucks to present right after lunch. π΄
Text
const crypto = require('crypto');
const NUM_REQUESTS = 2;
for (let i = 0; i < NUM_REQUESTS; i++) {
crypto the thing
}
crypto
Text
const http = require('http');
const NUM_REQUESTS = 2;
for (let i = 0; i < NUM_REQUESTS; i++) {
make the request
}
http
TLDR - Node uses JS and C++, some of that C++ is async π
disable etag and x-powered-by!!! for performance
between those two example servers. Where did the 19k go?
is a recursive function, hard to optimize, not type specific. sadsies.
fast-json-stringify
schema-based JSON rendering
no more recursion
V8 speeds up functions that are hot(Franzi's talk)
in prod
not much better
avoid closure allocation
build on radix-tree
routing
GH delvedor/router-benchmark
Β
OMG srsly he is going too fast.
huh, ok.
leads to dialects, idioms, styles
fewer deoptimizations
Β
Deoptimizations are when code is "optimized" and then reverted
You might recognize some of this advice, which is NO LONGER TRUE:
Β
Don't use let/const, try/catch. try/finally, for... in
repeat as necessary
devtools is JS only, 0x shows also the c code
width is time, color is hot functions
tells the file and line number
be sure to close all other processes during testing
we could write a microbenchmark for this, or keep running soak testing
remember, v8 analyses your code and optimizes functions, including optimizations based on the shape of your objects
It's about the shape of the object. Object needs to stay the same shape. Order of properties added to object is important.
a great response to a security incident. A+ response
a standard that allows websites to ....
more deprecation of vulnerable versions
bump dependency versions
get snyk, see vulnerabilities
response was incredible to malicious packages in npm
community is great about responding to security issues
we just started doing this, we don't know what we are doing, but we are getting better at it.
Deploy quickly, effectively free
10m executions a month, 90cents?
high degree of isolation
started to separate lambda functions out by route, had to maintain each one individually manually, checklists, hard to reproduce environments, not awesome
cognitive load... it's not pretty
global COP binary π¬
terraform HCL
Serverless
aws sam - serverless application model
probably will need to copy pasta a lot
meh, whitespace is important with is scary
probably lots of copy pasta
also yaml
aws has doing this for a long time
Serverless in 2016
looks a lot like Serverless
Only on AWS
needs a lot to write, copy pasta
tooling looks like server stuff
.arc file
comments start with #
sections start with @
everything else is adhjhfadshfdjlak
uses npm scripts π
whitespace is only important for tables
can't really say the same about the other setup yaml files in existence
still set up region, profile
for working without internets
default deploy to staging
seconds versus manual => hours
node --experimental-use-modules or something
can use import statments?
files have .mjs extension
support bare imports
can import common js
cannot require esm
dynamic import coming soon
similar to C++ namespaces
was intentded to be like jars
ripped out of standards to never be seen again
amd
umd - exports depending on env
can use them in chrome, edge
loader was not specified
loader is a generic term for a workflow: fetch, transform, evaluate
lexically scoped variables: __filename, export......
esm is one of many goals - not binary
node, esm, solve inconsistancies - not only problem
we need to solve this problem in a way
resolve hook?
evaluation hook?
no transform hooks.
hooks are going to deoptimize
will land in official mime registry
mime types determined by file extension
removes ambiguity
.js will always be ambigous
lots of changes to core
~5300 insertions, half were tests, but stuff all over
async resources tracked in C++
inherites from AsyncWrap
Β
stop after making the tests, no need to continue from there
Β
It's cool, I updated the docs π π½π»π€π½
$ tools/test.py path/to/test
https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
Find things that you can do to contribute!
"Unified Data Model" supports SQL and π noSQL
I don't know. PostgreSQL is my jam. but maybe.
higher ed, school ed, google summer of code, help with commcom onboarding, updating readme, helping members onboard to the org, node together, becoming commcom member, consolidating all the ways we communicate
cleanup, run more often. intel, v8, microsoft, ibm? put benchmarkign stuff in node core, simplify benchmarks, look at how other langs benchmark, nodes will be on github
lots of pain in tooling, async contect, how callbacks get invoked, formalize what async contect means, standardized....? open an issue about formal semantics, use cases, how to realize, tracewriter api on windows has issues, unhandled promise rejections
who are the poeple who get notified about security vuln?
what is the mem criteria?
how many people should be on the team?
what information is private?
will they ever change?
what are they supposed to do?
transparency
security policy - package issue - talk to npm or node?
can we release stuff to a group to do... stuff or something...
vm diversity, bringing more vms to the table, vm neutrality, advance features, competition is great....
Chakra and V8 now, maybe future more VMs
How do we get there? ABI
in experimental, native modules in api???
standardize interface node exposes, how we can better test certain lts interfaces, remain stable in releases, how better run test in browsers in node.js, text endcoder and text decoder, integrate web platform tests, how to support different ecmascript features, something green, test262 for ecmascript into node.js
@emilyplatzer
github/craftninja
emilyplatzer.com