Streams
@CrabDude がすでに取り組んでいます。
2015年5月5日 から。
評価
この issue はまだ評価されていません。
説明
- Break the below into coherent sections
- Explain unix pipes and their corollary with node.js streams (explaining the concept of node.js streams as well)
- Explain the need for streams (memory pressure, decreased latency, CPU amortization & convenience)
- Lead with
.pipeexamples- Emphasize that source streams can be piped to multiple destination streams
- Show example of piping from multiple source streams (
readable.pipe(writable, {end: false}))
- Cover the basics: .read(), .write(), .pause(), .resume & events: 'data', 'close', 'error'
- Mention briefly push vs pull-based streams and how Streams 2/3 uses pull streams
- Mention how back-pressure is handled
- Briefly explain buffers, link to a reference (docs or blog post or guide), and show
String(buffer) - Show 2 simple as possible examples of consuming (read: piping) each of the 4 stream types. You should use the most common examples e.g., req/res, through, fs read/write.
- Provide a common use case (e.g., A common type of duplex stream would be a WebSocket).
- Strongly recommend working through the stream-adventure nodeschool.io workshop and provide a screen shot of the stream-adventure exercise selection menu.
Advanced section:
- Explain object mode briefly, provide minimalist example and provide link to a more comprehensive explanation
- Provide code samples on how to create your own streams (i.e., .push, _read, _write & _transform) and additional links
- Show of JSON streaming example & explain !!LOUDLY!! how JSON.parse/stringify are the #1 cause of CPU blocking in node.js
The stream handbook is nice, but it's too verbose and needs more structure. In general the examples are good, so use them.
What success looks like: Succinctness and clarity. Less is more.
Reference Wikis: Authentication & Authorization, Setup
Open separate issues for required links to community sources if you're having trouble finding any.
Please assign to yourself before working on this.
/cc @NinjaSudo @philster @azoff @DiyahM
- 主要言語
- 言語のデータがありません
- スター
- 74
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codepath/nodejs_guides のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
codepath/nodejs_guides#21 · コメント 1 件 ·
-
Improve Javascript/Node markdown syntax highlighting再び着手できるかも @nesquena が 4179 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
codepath/nodejs_guides#19 · コメント 1 件 · 担当者 1 名 ·
-
help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
codepath/nodejs_guides#18 · コメント 3 件 ·
-
Design Patterns再び着手できるかも @pixelknitter が 4064 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンhelp wanted
codepath/nodejs_guides#16 · 担当者 1 名 ·
-
JavaScript: Inheritance再び着手できるかも @pixelknitter が 4172 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンhelp wanted
codepath/nodejs_guides#14 · 担当者 1 名 ·