Chrome developer advocate Jake Archibald called 2016 “the year of web streams.” Clearly, his prediction was somewhat premature. The Streams Standard was announced back in 2014. It’s taken a while, but there’s now a consistent streaming API implemented in modern browsers (still waiting on Firefox…) and in Node (and Deno). What are streams? Streaming involves splitting a resource into smaller pieces
Background Image Courtesy: Photo by Joshua Sortino on UnsplashImagine you have a pile of bricks somewhere. And you want to build a wall with those bricks here. Let’s say you have a friend to help move the bricks. To start building, you now have two options. You can either wait until your friend brings the whole pile of bricks to you, or you can start building as soon as you have a few bricks to st
Streams—The definitive guide Stay organized with collections Save and categorize content based on your preferences. Learn how to use readable, writable, and transform streams with the Streams API. The Streams API allows you to programmatically access streams of data received over the network or created by whatever means locally and process them with JavaScript. Streaming involves breaking down a r
A very minimal implementation of a PassThrough stream It's very fast for objects, strings, and buffers. Supports pipe()ing (including multi-pipe() and backpressure transmission), buffering data until either a data event handler or pipe() is added (so you don't lose the first chunk), and most other cases where PassThrough is a good idea. There is a read() method, but it's much more efficient to con
近年、PCに搭載されるメモリは爆発的に増えました。16GBや32GBのメモリが搭載されているのが当たり前の時代です。性能の制限が強いスマートフォンですら4GBほど搭載していることがあります。ストレージの読み書き速度もどんどん加速し、昔では扱えなかったようなデータ量をリアルタイムで処理できます。インターネット回線も同様に大量のデータを扱えるようになりました。 しかし現実的な大きさのデータを一度に扱おうとすると、現代でもそれなりに処理時間がかかります。ユーザはレスポンスに対して敏感で、反応が0.1秒でも遅れるとストレスを感じます。しかし時間がかかるものはかかるのです。この問題は一見どうしようもないように思えます。 そこで登場するのが「データを細切れにして処理する」というコンピュータにおける万能の薬です。細切れにして逐次処理すれば、少しずつデータを処理することができ、素早いレスポンスを実現するこ
Please leave your sense of logic at the door, thanks! Progressing Streams July 5th, 2017 by Adam Rice in What's Next Back in 2014 we announced the Streams Standard. It's about time for an update on where we are and what's coming up. Streaming the response to fetch() via the response.body attribute was standardized last year and is now implemented in several major browsers. Recently streaming uploa
Update: This article is now part of my book “Node.js Beyond The Basics”. Read the updated version of this content and more about Node at jscomplete.com/node-beyond-basics.Node.js streams have a reputation for being hard to work with, and even harder to understand. Well I’ve got good news for you — that’s no longer the case. Over the years, developers created lots of packages out there with the sol
Join 150K+ monthly readers. In-depth articles on Node.js, Microservices, Kubernetes and DevOps. Node.jsNode.js is an asynchronous event-driven JavaScript runtime and is the most effective when building scalable network applications. Node.js is free of locks, so there's no chance to dead-lock any process. Streams come with a great power: You have an asynchronous way of dealing with input and output
Nodeのアドベントカレンダー、既に終わった枠が空いていて、この際書きたいネタがあったんで参加しました。宜しくお願いします。 アドベントカレンダーの時期だけ出没する弱い日曜Haskellerです。普段の実務ではNode.jsにお世話になってます。宜しくお願いします。 さて、みなさんStream API使ってますか?Node.jsといったら非同期ですよね、やっぱり。しかしながら、JavaScriptでも他の言語でも、非同期処理自体は注目されているものの、まだexperimentalという感じで様々なAPIが考案されては消えていき、また元々そういう文化が根強くなかったところから来た人たちにとって、こういう文化はちょっと立ち入りづらいところもあるかもしれませんね。 今日は、主にそういう人たちに向けて、まず非同期の色々なAPIの紹介、そしてその中でのストリームのメリット、そして実際のStream
この記事で書いている内容は? ストリーム処理とはそもそも何かからはじまり、必要になる検討ポイントなどの情報を振り返り用にまとめたものです。 あとは、今年個人的にこの分野に影響が大きかったと思ったイベントをまとめています。 他の方へ説明する際のベースとするためにまとめているため、 既にこの分野を知っている方にとっては冗長な内容も多いかもしれませんが、 その場合は適宜読み飛ばしていただけると。 あと、私の他記事からも内容引っ張ってきているのでかぶりはあると思います。 特にGoogleが考えるストリームデータ処理とは?とは目的もかぶっているので相応に被りがあるかと・・・ 出来るだけよく出てくる固有の言葉を最初から使用せずに書いているつもりですが、 何かわかりにくい場所あればコメントいただけるとありがたいです。 「ストリーム処理」とだけ書くと微妙にストリーミング配信等とも混同しやすいですが、 デー
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く