TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

“Streaming vs. Batch” Is a Wrong Dichotomy, and I Think It's Confusing

70 pointsby ingve8 days ago

20 comments

fifilura4 days ago
&quot;Try it yourself&quot; &quot;very quickly wanted to get real-time streaming for more&quot;<p>My experience is the opposite.<p>You think you need streaming, so you &quot;try it out&quot; and build something incredibly complex with Kafka, that needs 24h maintenance to monitor congestion in every pipeline.<p>And 10x more expensive because your servers are always up.<p>And some clever (expensive) engineers that figure out how watermarks, out of orderness and streaming joins really work and how you can implement them in a parallel way without SQL.<p>And of course a renovate bot to upgrade your fancy (but half baked) framework (flink) to the latest version.<p>And you want to tune your logic? Luckily that last 3 hours of data is stored in Kafka so all you have to do is reset all consumer offsets, clean your pipelines and restart your job and the in data will hopefully be almost the same as last time you run it. (Compared to changing a parameter and re-running that SQL query).<p>When all you business case really needed was a monthly report. And that you can achieve with pub&#x2F;sub and an SQL query.<p>In my experience the need for live data rarely comes from a business case, but for a want to see your data live.<p>And if it indeed comes from a business case, you are still better off prototyping with something simple and see if it really flies before you &quot;try it out&quot;.
评论 #44023359 未加载
评论 #44020364 未加载
efitz4 days ago
Batch processes IRL tend to “fetch” data, which is nothing like streaming.<p>For example, I’ve worked with “batch” systems that periodically go do fetches from databases or S3 buckets and then do lots of crunching, before storing the results.<p>Sometimes batch systems have separate fetchers and only operate vs a local store; they’re still batch.<p>Streaming systems may have local aggregation or clumping in the arriving information; that doesn’t make it a “batch” system. Likewise streaming systems may process more than one work item simultaneously; still not a “batch”.<p>I associate “batch” more with “schedule” or “periodic” and “fetch”; I associate “stream” with “continuous” and “receiver”.
评论 #44018896 未加载
10000truths4 days ago
&quot;latency&quot; and &quot;throughput&quot; are only mentioned in passing in the article, but that is really the crux of the whole &quot;streaming vs. batch&quot; thing. You can implement a stream-like thing with small, frequent batches of data, and you can implement a batch-like thing with a large-buffered stream that is infrequently flushed. What matters is how much you prioritize latency over throughput, or vice versa. More importantly, this can be <i>quantified</i> - multiply latency and throughput, and you get buffer&#x2F;batch size. Congratulations, you&#x27;ve stumbled across Little&#x27;s Law, one of the fundamental tenets of queuing theory!
binoct4 days ago
The comments here are really interesting to read since there are so many strongly stated different definitions. It’s obvious “steaming” and “batch” have different implications and even meanings in different contexts. Depending on what the type of work being done and what system it’s being done with, batch and streaming can be interpreted differently, so it feels like really a semantic argument going on lacking specificity. It’s important to have common and clear terminology, and across the industry these words (like so many in computer science) are not always as clear as we might assume. Part of what makes naming things so difficult.<p>It does seem to me that push vs pull are slightly more standardized in usage, which might be what the author is getting at. But even then depending on what level of abstraction in the system you are concerned with the concepts can flip.
floating-io4 days ago
From skimming the article, it seems that this is a munging of the terms in directions that just aren&#x27;t meaningful.<p>I&#x27;ve had the following view from the beginning:<p>- Batches are groups of data with a finite size, delivered at whatever interval you desire (this can be seconds, minutes, hours, days, or years between batches).<p>- Streaming is when you deliver the data &quot;live&quot;, meaning immediately upon generation of that data. There is no defined start or end. There is no buffering or grouping at the transmitter of that data. It&#x27;s constant. What you do with that data after you receive it (buffering, batching it up, ...) is irrelevant.<p>JMHO.
评论 #44018588 未加载
brudgers5 days ago
Streams have unknown size and may be infinite.<p>Batches have a known size and it are not infinite.
评论 #44018160 未加载
simlevesque4 days ago
Isn&#x27;t everything batched ? I&#x27;ve built live streaming video, iot, and it&#x27;s batches all the way down.
评论 #44019029 未加载
cgio4 days ago
I know many push batch systems, e.g. all the csv type pushed onto s3 and processed in an event based pipeline. Even for non event based, the fact that I schedule a batch does not make a pipeline pull. Pull is when I control the timing AND query. In my view the dichotomy stream vs batch is meaningful. The fact that there are also combinations where a stream is supported by batch does not invalidate the differences.
davery224 days ago
I think the article was getting at this at the end - different use cases naturally call for either a point-in-time snapshot (optimally serviced by pull) or a live-updating view (optimally serviced by push). If I am gauging the health of a system, I&#x27;ll probably want a live view. If I am comparing historical financial reports, snapshot. Note that these are both &quot;read-only&quot; use cases. If I am preparing updates to a dataset, I may well want to work off a snapshot (and when it comes time to commit the changes, compare-and-swap if possible, else pull the latest snapshot and reconcile conflicts). If I am adjusting my trades for market changes, live view again.<p>If I try to service a snapshot with a push system, I&#x27;ll have to either buffer an unbounded number of events, discard events, or back-pressure up the source to prevent events from being created. And with push alone, my snapshot would still only be ephemeral; once I open the floodgates and start processing more events, the snapshot is gone.<p>If I try to service a live view with a pull system, I&#x27;ll have to either pull infrequently and sacrifice freshness, or pull more frequently and waste time and bandwidth reprocessing unchanged data. And with pull alone, I would still only be chasing freshness; every halving of refresh interval doubles the resource cost, until the system can&#x27;t keep up.<p>The complicating real-world factor that this article alludes to is that, historically, push systems lacked the expressiveness to model complex data transformations. (And to be fair, they&#x27;re up against physical limitations: Many transformations simply require storing the full intermediate dataset in order to compute an incremental update.) So the solution was to either switch wholesale to pull at some point in the pipeline (and try to use caching, change detection, etc to reduce the resource cost and enable more frequent pulling), or, introduce a pulling segment in the pipeline (&quot;windowing&quot; joins, aggregations, etc) and switch back to push after.<p>It&#x27;s pretty recent that push systems are attempting to match the expressiveness of pull systems (e.g. Materialize, Readyset), but people are still so used to assuming pull-based compromises, asking questions like &quot;How fresh does this data feed really _need_ to be?&quot;. It&#x27;s analogous to asking &quot;How long does this snapshot really _need_ to last?&quot; - a relevant question to be sure, but maybe doesn&#x27;t need to be the basis for massive architectural lifts.
kazinator3 days ago
The opposite of &quot;batch&quot; is &quot;interactive&quot;.<p>A classic &quot;batch job&quot; is one that can be executed without input from a keyboard or output to a display, and therefore can be queues in a batch with other such jobs (perhaps from other programmers).<p>There is a connection with scripting; batch job control was done with command languages. This is where DOS&#x2F;Windows &quot;batch files&quot; get their name, and the .BAT suffix.<p>Grouping transmitted items together (such as bytes into a datagram) is better called aggregation, not to confuse it with &quot;batch job&quot; batching.<p>Nearly all streaming uses aggregation, other than at the lowest data link and physical layers.
briankelly4 days ago
&gt; Often times, &quot;Stream vs. Batch&quot; is discussed as if it’s one or the other, but to me this does not make that much sense really.<p>Just seems like a flawed premise to me since lambda architecture is the context in which streaming for data processing is frequently introduced. The batch vs stream discussion is more about the implementation side - tools or techniques best used for one aren’t best suited for the other since batch processing is usually optimized for throughput and streaming is usually optimized for latency. For example vectorization is useful for the former and code generation is useful for the latter.
matjazk3 days ago
This is basically a discussion of advantages of lamda architecture (batch+streaming) for data processing as opposed to kappa (pure streaming). What the author neglects to mention is that in the first case you have to maintain two data processing pioelines, whereas in the second case batch data is treated as a special case of streaming data.
mannyv4 days ago
&#x27;Pull&#x27; and &#x27;push&#x27; make even less sense than &#x27;stream&#x27; and &#x27;batch.&#x27;<p>In the old days batch was not realtime and took a while. Imagine printing bank statements, or calculating interest on your accounts at the end of the day. You literally process them all later.<p>Streaming is processing the records as they arrive, continuously.<p>IRL you can stream then batch...but normally batch runs at a specific time and chows everything.
oatmeal_croc4 days ago
Streams -&gt; optimized for latency<p>Batches -&gt; optimized for efficiency
评论 #44019682 未加载
calrain4 days ago
For me, a key difference is:<p>- &#x27;Streaming&#x27; means the consumer determines server utilization rates<p>- &#x27;Batch&#x27; means the server determines server utilization rates<p>I much prefer Batch as the processing can be performed when the server has appropriate resources, helping products run on lower spec servers.
iLoveOncall4 days ago
It&#x27;s quite amazing how none of the comments have bothered reading the article, but are also commenting about something completely unrelated to its title.<p>The article rightfully says that it&#x27;s not a question of streaming OR batching, because you can stream batches.
评论 #44018257 未加载
alfiedotwtf3 days ago
With the absence of stream ciphers vs block cyphers, I’m guessing the cryptographers are biting their tongues in the comments
gregw24 days ago
If streaming is 5x as expensive as batch, that might be a factor worth considering.
sxv4 days ago
Further reading: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Double-slit_experiment" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Double-slit_experiment</a>
pestatije8 days ago
streaming should be used exclusively for live data...if you keep things that way everything falls smoothly in place
评论 #44017889 未加载