Live data from Hacker News

Dataflow/Beam and Spark: A Programming Model Comparison

cloud.google.com

21–30 of 34 posts

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#21
post #16
post #10

Earlier quoted context omitted.

You're not going to get clean out-of-order processing semantics with any mode of Spark transformations. If you actually take the time to read the article, there's a section discussing the Java/Scala angle. The difference in code size is really secondary (though it is a difference). The difficulty in maintaining and evolving your pipeline over time using Spark is the main point, given the way important concepts become…

> If you actually take the time to read the article, there's a section discussing the Java/Scala angle. They claim this isn't about the length of code, yet they select the most verbose way to use Spark and proudly display how long it is. I mean sure, lack of event-time based processing is known limitation of Spark (and a pretty annoying one - though it is supposed to be worked on) but there are ways to write about it…

I think both length of code is a side effect that results from the primary argument, and "cant do event time" is one of the symptoms. Neither is a primary argument in the blog post.

The primary argument is demonstrated through color coding different logical bits, which end up being clearly portable and elegantly distinct in dataflow.

This is demonstrated in two ways:

1. The "juicy value add" code that does the aggregation is labeled yellow, and doesn't change across all the samples with Dataflow. With Spark, it needs to be rewritten for every use case. Similarly, for all colors.

2. In Dataflow all the colors are separate. This makes expressing your logic easier. In Spark, the colors mix in dramatic ways with every demonstrated use case.

As Tyler said, all this is described in the blog post itself, but I don't blame you for missing it, since it's a really long post :)

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#22

Earlier quoted context omitted.

Accoring to the proposal ( https://wiki.apache.org/incubator/BeamProposal ), OSS impl. of streaming is on the way, by Apache Flink, etc. The blog is just suggesting the model itself is superior, regardless of OSS or not.

Huh, I can't find anything to that effect in the proposal. It does mention the existence of runners for Spark and Flink, but doesn't say they'll be getting streaming support. I had assumed it was unlikely for the same reason that this article talks about (lack of support for first-class processing by event time). But assuming it's true. it's very welcome news! I'll be keeping a close eye on future releases.

Flink's event-time support is coming along nicely. Their first round of true event-time support came in November (https://flink.apache.org/news/2015/11/16/release-0.10.0.html), and much more is on the way. Flink will be an excellent platform for Beam, both batch and streaming.

As I understand it, Spark has event-time support coming soon as well. I think basic stuff is landing in 1.7. Not sure precisely what they have planned, but I can only imagine that Spark will also become an excellent platform for executing streaming Beam pipelines in due time. In the meantime, the streaming runner for Spark can either target those features which Spark does support well (i.e., processing-time windowing, in this case), or try to emulate those it doesn't (such as how it was done in the article).

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#23
post #5
post #4

I think that this is useful. One question though. Is there a reason you can't use the Spark Window functions? https://databricks.gitbooks.io/databricks-spark-reference-ap...

I haven't studied the code very carefully, but I think this is mostly PR piece. Not only using Spark from Java isn't a very good idea, but the "canonical" way to do transformations like that is using dataframes or datasets (which are from Spark 1.6 and provide some improvements over dataframes). Take it with a grain of salt.

I think using Java as a comparison is fine. It's an officially supported platform, and while Scala is better we do a lot of work using Java without problems.

The Datasets thing is more interesting. There is no doubt that the way they unify the Dataframe/RDD programming model is better, but it is so new (1.6 only) we certainly haven't migrated to it yet. The documentation isn't huge, either: http://spark.apache.org/docs/latest/sql-programming-guide.ht...

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#26
Did anyone read this? There was so much buzzwords and bullshit I couldn't slog past the first page.

Who do they write these things for anyways? It's not like we're college admissions or professors, just give us the straight deal. Unless you're pitching to schools and naive undergrads of course.

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#27
I'm much disturbed that the big G hijacked the dataflow term, to suddenly mean their specific - rather involved I must say - dataflow based programming model. The real dataflow [1] is a much broader term that doesn't outline specifics like programming semantics.

Seems as if they're trying to ride the wave of the recent upsurge in interest in dataflow in general (with sub-fields such as Flow-based programming, and implementations like Akka streams etc). That's OK, but hijacking a term for the whole field, is not.

[1] https://en.wikipedia.org/wiki/Dataflow

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#28
post #13
post #9

Earlier quoted context omitted.

I can't remember Google ever giving an open source project a kicking like it feels they've been giving Apache Spark recently, seems very unlike them.

It's less Google and more Google engineers, and from that standpoint it is totally normal fire them to kick the living daylights out of any code, particularly Google code. Spark streaming really feels operationally immature compared to a lot of other stream processing frameworks, even Dataflow. The criticism is both unsurprising and warranted.

What other stream processing frameworks do you prefer in the place of spark streaming?Storm is pretty mature, but does not play very well with YARN last I tried. Flink looks pretty good, but is fairly new. Samza is another one. I'm curious to know if you have any specific issues with spark streaming's operational immaturity. Some things I don't like in general are: # Backpressure algo is fairly new, but pluggable # Does not handle stragglers very well, inspite of back pressure - this is due to treating everything as batch # Events from the system are not very rich and cannot be customized. # Error handling is very unclear, and does not offer a lot of flexibility

In spite of these shortcomings, it has pretty good Kafka integration, mostly uses the same paradigm as batch and plays well with hadoop infrastructure. Makes it a decent choice for many use cases

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#29
post #27

I'm much disturbed that the big G hijacked the dataflow term, to suddenly mean their specific - rather involved I must say - dataflow based programming model . The real dataflow [1] is a much broader term that doesn't outline specifics like programming semantics. Seems as if they're trying to ride the wave of the recent upsurge in interest in dataflow in general (with sub-fields such as Flow-based programming, and im…

It's called Google Cloud Dataflow. Your complaint is like saying Google Cloud Platform is hijacking the meaning of Platform.

Re: Dataflow/Beam and Spark: A Programming Model Comparison

#30
post #10
post #5

Earlier quoted context omitted.

I haven't studied the code very carefully, but I think this is mostly PR piece. Not only using Spark from Java isn't a very good idea, but the "canonical" way to do transformations like that is using dataframes or datasets (which are from Spark 1.6 and provide some improvements over dataframes). Take it with a grain of salt.

You're not going to get clean out-of-order processing semantics with any mode of Spark transformations. If you actually take the time to read the article, there's a section discussing the Java/Scala angle. The difference in code size is really secondary (though it is a difference). The difficulty in maintaining and evolving your pipeline over time using Spark is the main point, given the way important concepts become…

What do you think about Cloudera's Spark backend to Google Cloud Dataflow pipelines[1]?

[1]: https://github.com/cloudera/spark-dataflow

Post reply on HN