Rendered at 11:38:39 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
scott_s 3 days ago [-]
I worked in the streaming area for a decade, doing research and development (see: https://scholar.google.com/citations?user=Rdf5OIYAAAAJ&hl=en). After moving on from streaming specifically and moving into the general problems in large data warehouses, I also concluded: just default to SQL for all analytics and the database lens is the best way to think about streaming for analytics.
I still do think that stream programming models are extremely interesting and powerful. But I used to think they would eventually become more mainstream as a way to elegantly program for high throughput, low latency massively parallel systems. That has not been the case, and I no longer think that it will be. People get by with the existing programming languages and models, that seems to be fine.
necubi 2 days ago [-]
I've similarly spent a decade in the streaming space, started a stream processing startup, built three streaming platforms at various large companies... and I basically agree.
Streaming always felt like it was about to happen, and it kept not happening, in a year of the linux desktop sort of way. I (and others, who also optimistically started stream processing startups) thought it was a technology problem but ultimately it's a demand problem: very few companies actually need low latency processing. And continuously running, stateful systems are inherently more complex to operate and evolve compared to batch systems.
Now that relatively low-latency ingest into warehouses and datalakes is easily achieved, it's really hard to make the argument to invest in complicated streaming systems.
That said, it still feels like we've landed in a suboptimal spot. Stream processors (in particular, those following the dataflow model) solve two problems that are hard in batch systems:
1. Determining and signaling completeness for a time period (when have I likely received all of the data for 12:01pm, such that I can now safely process it)
2. Avoiding expensive recomputations for periodic queries
I do think long term we'll see some amount of streaming influence moving back into the batch systems, particularly as object storage gives us the ability to run stateful workloads with less operational headache.
(If anyone else finds these problems interesting, I'm hiring for my stream processing team at Cloudflare. Email in my profile)
scott_s 2 days ago [-]
Agreed agreed.
During my time in the space, my pithy saying about the system I worked on [1] was that we could scale up or down. If you wanted to do streaming packet filtering with microsecond latency, we could do that. If you wanted to do complex analytics on structured data, we could do that. We did have deployments that "scaled down" and were more stream processing rather than streaming analytics. But analytics is by far the dominant use case, and SQL and relational databases are the better abstraction there. And for the stream processing cases, folks tend to stick to their existing lower-level stacks.
I'm increasingly of the opinion that "basically a data warehouse, but incrementally maintained materialized views under the hood as an implementation detail" (e.g. Materialize, Feldera, anything based on Differential Dataflow / DBSP) is a good point in the design space. I get that they're more complicated than batch, and for many orgs the low latency isn't necessary for pure analytics/dashboards.
I wonder if there's a place for such architecture in the operational path, not just analytics. If you squint, "this microservice reads data from this operational DB and passes it to this other microservice / puts it in a cache / sends it in response to a request" looks sort of like an "ad hoc, informally specified, bug-ridden, slow"[0] implementation of incremental view maintenance (in that a cache, or a service's data model in memory, is a sort of "materialized view" over the source data). I've seen some success in replacing a tangle of imperative-languages-and-network-requests with a declarative, incrementally maintained model in SQL, if the read latency can be kept under control.
I'm curious about the "some amount of streaming influence moving back into the batch systems, particularly as object storage gives us the ability to run stateful workloads with less operational headache" part. could you expand on that?
[and yes, I do find these sort of problems interesting! :)]
I’m not sure you have to squint; an mview is just a cached query. The only difference between an mview and a cache is the “incremental” part of the equation.
That is, my only disagreement is the lack of gusto
convolvatron 2 days ago [-]
the fact that traditional database infrastructure handles many people's needs doesn't really obviate dataflow style architectures. personally I think (3) composition is a real potential win. I would also note that streaming is a really great base on which to build a distributed database that looks more like Postgres on top.
I guess I'm mostly confused about the idea that streaming systems should be trying to supplant sql databases, or that a failure to do so implies that they don't have utility. it looks like the GP has done some really interesting work on automatic parallelism. that isn't pointless just because most people building operational systems still reflexively reach for PG.
scott_s 2 days ago [-]
That work is still relevant! It's just that end-users don't need to be aware of it. The position of the paper I submitted, which I basically agree with, is that "streaming" shouldn't need to be something end-users care about. It's something the system does based on needs.
Databases already have a dataflow style architecture: that's how they implement queries. Because SQL is relational, SQL queries become dataflow execution plans.
One way to think about the programming model I worked on is that it was like exposing a query plan API directly to users, instead of giving them SQL.
fmjrey 7 hours ago [-]
A project to watch in that space is Rama from Red Planet Labs [0]. It pushes further the trend of destructuring databases into a very flexible streaming engine and database.
It has no query engine, instead the platform offers powerful primitives to partition and distribute both data and compute, effectively destructuring transactions and query engine into microbatch and stream topologies.
I think the real value of such platform is in how it can replace tons of microservices and nosql databases into a single platform with a coherent model.
Replacing 1M LOC across 100 services and databases by one cluster with 10000 LOC is an operational dream come true.
Also I expect LLMs limitations to force us to resolve ourselves the operational complexity of IT, as I can't imagine letting LLMs multiply the number of services and databases like PRs on github. Platforms like Rama provide the necessary constraints to channel LLM output into a coherent whole easy to operate and observe.
You paper "A catalog of stream processing optimizations" is great! It seems like a classic in stream processing for me :)
Generally I agree with this comment. Very few niche applications require stream processing and all struggle that had been into research to enable some of the ACID properties for stream processing.
While at it, would you know how kdb+ (mostly used in finance) work? It -- together with q -- seems to achieve very low latency for real time systems.
ModernMech 2 days ago [-]
> People get by with the existing programming languages and models, that seems to be fine.
People like what they like, and they have trouble with anything other than imperative structured programming. It’s been a pain over the last decade plus to get people just to try functional programming, and they already know what functions are!
It’s so hard I think it’s a losing battle. No matter how good a paradigm people will always stick to a) what they know and b) what they’re paid to know.
However, I still think there’s a future for paradigms like dataflow because LLMs use random esoteric languages with great ease, and without complaint. They will use the tool for the job, even if they’re unfamiliar with it at first. “Mainstream” doesn’t really matter anymore.
porridgeraisin 2 days ago [-]
There is a reason imperative programming is so common. It is more amenable to poorly designed, under specified, iterative development. Most real world software is in that category naturally. If you're meticulously designing and engineering it really well from the start, sure functional languages represent it well without leaving much room for misinterpretation and thus bugs. But no one does that.
Marginal cost of adding a feature has to be proportional to the revenue made by that feature. Then In Java or go you just add a ugly special case to appease the large customer and ignore the small ones' emails. Bugs getting shunted around instead of truly fixed at the root is also totally OK as long as they are not in the major revenue/cost centers of the product. No one has time to replace these piles of hacks and eventually you would have given up most of your languages benefits and your types now mean nothing there is probably a hundred flags making it a union effectively.
Rust is one language though where hacking around goes a long way without breaking too many of the guarantees, although it's not perfect, from my experience at a company where services spanned java go rust and ruby.
rafaelRiv 15 hours ago [-]
> If you're meticulously designing and engineering it really well from the start, sure functional languages represent it well without leaving much room for misinterpretation and thus bugs. But no one does that.
I find functional programming better at iterative development. You don't have to go full on on types but you always have the choice to make it good in the future. And from my experience the final refactoring is just better and let you built way more on top than imperative languages.
The reason imperative programming is so common is because of network effect. Unix won over lisp machines
BenoitP 2 days ago [-]
> That has not been the case, and I no longer think that it will be. People get by with the existing programming languages and models, that seems to be fine.
.. as long as the processing they do fits in a map().
I still deeply believe that a new class of programs can be unlocked by using reduce() or all_gather() in a massive concurrent stream.
In a stadium, why can't a uuid be embedded as an acoustic chirp emitted by all the smartphones, then triangulation-reduced in a 3D map of all devices, enabling a stadium-wide sound system?
Why don't we have MMORPGs that can deal with 100k users in a single game instance?
janpeuker 2 days ago [-]
I used to be extremely into Dataflow/Apache Beam and literally had the paper printed on my desk AND the book. I agree they got Event time versus processing time and Never rely on completeness right, and I love they go deeper into why that was just a hard thing to accept. My head still hurts thinking about unbounded stream triggers and I'm happy we got around to a table-centric model. I still think taking some ideas from Spanner, databases as message bus or consistency information per row, basically in-database CQRS would have been nice, though. Great paper.
It views stream processing as a join between queries and data, where internally everything is just materialized views probing each other.
Interesting that the authors above ended up landing in a similar place conceptually.
guglecwoam 2 days ago [-]
> Splitting
This is one of the things I wished for in the Beam APIs, and I'm glad they included it in the doc. Some (single) elements are bigger than a single function, and can't be processed one at a time. For example. a very large CSV file. They added support for it later (as Splittable DoFn's) but each implementation had varying support for it.
7e 2 days ago [-]
Streaming is expensive, both in terms of machine and human cost, and the benefit is quite marginal for most applications. However, Google engineers need to get promotion somehow, you know?
kevinbaiv 1 days ago [-]
[flagged]
rawgabbit 2 days ago [-]
TLDR. 15 years ago they avoided SQL and created a language for streaming. Today, the industry decided that SQL materialized views with a “freshness” or time lag promise is the correct mental model.
I still do think that stream programming models are extremely interesting and powerful. But I used to think they would eventually become more mainstream as a way to elegantly program for high throughput, low latency massively parallel systems. That has not been the case, and I no longer think that it will be. People get by with the existing programming languages and models, that seems to be fine.
Streaming always felt like it was about to happen, and it kept not happening, in a year of the linux desktop sort of way. I (and others, who also optimistically started stream processing startups) thought it was a technology problem but ultimately it's a demand problem: very few companies actually need low latency processing. And continuously running, stateful systems are inherently more complex to operate and evolve compared to batch systems.
Now that relatively low-latency ingest into warehouses and datalakes is easily achieved, it's really hard to make the argument to invest in complicated streaming systems.
That said, it still feels like we've landed in a suboptimal spot. Stream processors (in particular, those following the dataflow model) solve two problems that are hard in batch systems:
1. Determining and signaling completeness for a time period (when have I likely received all of the data for 12:01pm, such that I can now safely process it)
2. Avoiding expensive recomputations for periodic queries
I do think long term we'll see some amount of streaming influence moving back into the batch systems, particularly as object storage gives us the ability to run stateful workloads with less operational headache.
(If anyone else finds these problems interesting, I'm hiring for my stream processing team at Cloudflare. Email in my profile)
During my time in the space, my pithy saying about the system I worked on [1] was that we could scale up or down. If you wanted to do streaming packet filtering with microsecond latency, we could do that. If you wanted to do complex analytics on structured data, we could do that. We did have deployments that "scaled down" and were more stream processing rather than streaming analytics. But analytics is by far the dominant use case, and SQL and relational databases are the better abstraction there. And for the stream processing cases, folks tend to stick to their existing lower-level stacks.
[1] I worked on IBM Streams, https://www.ibm.com/docs/en/streams/4.3.0?topic=welcome-intr..., which had its own language, compiler and runtime system. IBM sold this technology in 2023: https://21cs.com/en/resources/articles/2023/10/10/21cs-acqui....
I wonder if there's a place for such architecture in the operational path, not just analytics. If you squint, "this microservice reads data from this operational DB and passes it to this other microservice / puts it in a cache / sends it in response to a request" looks sort of like an "ad hoc, informally specified, bug-ridden, slow"[0] implementation of incremental view maintenance (in that a cache, or a service's data model in memory, is a sort of "materialized view" over the source data). I've seen some success in replacing a tangle of imperative-languages-and-network-requests with a declarative, incrementally maintained model in SQL, if the read latency can be kept under control.
I'm curious about the "some amount of streaming influence moving back into the batch systems, particularly as object storage gives us the ability to run stateful workloads with less operational headache" part. could you expand on that?
[and yes, I do find these sort of problems interesting! :)]
[0] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
That is, my only disagreement is the lack of gusto
I guess I'm mostly confused about the idea that streaming systems should be trying to supplant sql databases, or that a failure to do so implies that they don't have utility. it looks like the GP has done some really interesting work on automatic parallelism. that isn't pointless just because most people building operational systems still reflexively reach for PG.
Databases already have a dataflow style architecture: that's how they implement queries. Because SQL is relational, SQL queries become dataflow execution plans.
One way to think about the programming model I worked on is that it was like exposing a query plan API directly to users, instead of giving them SQL.
It has no query engine, instead the platform offers powerful primitives to partition and distribute both data and compute, effectively destructuring transactions and query engine into microbatch and stream topologies.
I think the real value of such platform is in how it can replace tons of microservices and nosql databases into a single platform with a coherent model. Replacing 1M LOC across 100 services and databases by one cluster with 10000 LOC is an operational dream come true.
Also I expect LLMs limitations to force us to resolve ourselves the operational complexity of IT, as I can't imagine letting LLMs multiply the number of services and databases like PRs on github. Platforms like Rama provide the necessary constraints to channel LLM output into a coherent whole easy to operate and observe.
[0] https://redplanetlabs.com/
Generally I agree with this comment. Very few niche applications require stream processing and all struggle that had been into research to enable some of the ACID properties for stream processing.
While at it, would you know how kdb+ (mostly used in finance) work? It -- together with q -- seems to achieve very low latency for real time systems.
People like what they like, and they have trouble with anything other than imperative structured programming. It’s been a pain over the last decade plus to get people just to try functional programming, and they already know what functions are!
It’s so hard I think it’s a losing battle. No matter how good a paradigm people will always stick to a) what they know and b) what they’re paid to know.
However, I still think there’s a future for paradigms like dataflow because LLMs use random esoteric languages with great ease, and without complaint. They will use the tool for the job, even if they’re unfamiliar with it at first. “Mainstream” doesn’t really matter anymore.
Marginal cost of adding a feature has to be proportional to the revenue made by that feature. Then In Java or go you just add a ugly special case to appease the large customer and ignore the small ones' emails. Bugs getting shunted around instead of truly fixed at the root is also totally OK as long as they are not in the major revenue/cost centers of the product. No one has time to replace these piles of hacks and eventually you would have given up most of your languages benefits and your types now mean nothing there is probably a hundred flags making it a union effectively.
Rust is one language though where hacking around goes a long way without breaking too many of the guarantees, although it's not perfect, from my experience at a company where services spanned java go rust and ruby.
I find functional programming better at iterative development. You don't have to go full on on types but you always have the choice to make it good in the future. And from my experience the final refactoring is just better and let you built way more on top than imperative languages.
The reason imperative programming is so common is because of network effect. Unix won over lisp machines
.. as long as the processing they do fits in a map().
I still deeply believe that a new class of programs can be unlocked by using reduce() or all_gather() in a massive concurrent stream.
In a stadium, why can't a uuid be embedded as an acoustic chirp emitted by all the smartphones, then triangulation-reduced in a 3D map of all devices, enabling a stadium-wide sound system?
Why don't we have MMORPGs that can deal with 100k users in a single game instance?
It views stream processing as a join between queries and data, where internally everything is just materialized views probing each other.
Interesting that the authors above ended up landing in a similar place conceptually.
This is one of the things I wished for in the Beam APIs, and I'm glad they included it in the doc. Some (single) elements are bigger than a single function, and can't be processed one at a time. For example. a very large CSV file. They added support for it later (as Splittable DoFn's) but each implementation had varying support for it.