Node学園祭2017
https://gyazo.com/d574f45cb110fdc8ccf72e45d593a805 http://nodefest.jp/2017/
1日目しか参加できないので1日目のログだけ書くshokai.icon
日時
2017/11/25 13:00〜
場所
jsコミュニティ増えた
node学園もinternationalになってきた
スピーカー28人中21人が英語
beginners
node elementary schoolなど
https://gyazo.com/bc43e2beb2c31c94fd3f54df7a0376ce
2011年からnode使ってる
alinodeというperformance platformがある
registry.npmjs.orgにpublishはできる
installができない(遅い)
node.js performance platform
custom runtimeでlogを集める
社内にjs functionもある
lambdaみたいなやつ
Node.js Production Checklist by Gergely Nemeth
https://gyazo.com/fb51c9dbacdbd9b19f69a0308f8d866f
GoDaddy.net
ダウンタイムを減らす
error handling
boom npmをexpressで使うとエラーを綺麗に返せる appの上の方でcatchするmiddlewareを作る
security
Node Security Project
Snyk
security herader付ける
X-Frame-Options Strict-Transport-Security X-DNS-Prefetch-Controlなど
input validation
code:joi.js
const result = Joi.validate([
username: 'abc'
}, schema)
logging
error, warn, info, log, debug
よくわからんshokai.icon
CI/CD
testする
monitor
average response timeは見ても無駄
route毎に見る
最悪に遅いrouteを探す
blackbox monitoring
incident handling
chatでwar roomなどのchannelを作る
顧客向けのstatus pageを更新する
escalation policy重要
stdlib.jsを作っている
https://gyazo.com/92ad818d2c1f6cad4e0d349a57c7a128
jsのサブセット
jsにアセンブラ?みたいなのを書く?
WebAssembly
C++→IR→wasm→x86/ARM
format
text format
数値型がある
i32 f32 i64 f64とか
code:text-format(js)
binary format
Memoryとかいじれる
GC
コードサイズが小さい
速い
tools
C/C++をasm.jsに変換する
Binaryen
WABT
WebAssembly Binary Toolkit
Emscriptenに含まれているツール
Cをwasmにコンパイル
$ emcc -std=c99 -O3 -s WASM=1 -s MODULARIZE=1 -s
binary formatにもtext formatにもできるっぽい
wasmはnodejsからnew WebAssembly.Module(readFileSync('foo.wasm'))で読み込める
普通の算術演算とかはpure javascriptの方が速い
wasmとjsの間で値を交換するのが遅い
大きな領域を全部wasmにやらせるなら速い
No REST for the weary... Introducing GraphQL by Sia Karamalegos https://gyazo.com/4009d4a7ceeae867eb5f6d65b1cede44
SOAP
cilent/serverが密
REST
client/serverが疎結合になった
schema定義して必要な物だけ取るAPI
別ページに移動したshokai.icon
Quantum Computing in Node by Nick Doiron (ニック・ドレン)
https://gyazo.com/3303621bb14f69a6c122f74dd0f4a902
もつれ
qubit
bitをシミュレートするやつをIBMとかが作ってる
ゲートをレーザーで読むのをjsで書ける
emulatorもあるらしい
量子暗号