Data infrastructure optimization, availability & security software
Data integration & quality software
The Next Wave of technology & innovation

Expert Interview (Part 3): Jeff Bean and Apache Flink’s Take on Streaming and Batch Processing

At the recent Strata Data conference in NYC, Paige Roberts of Syncsort sat down for a conversation with Jeff Bean, the Technical Evangelist at data Artisans.

In the first of the three part blog, Roberts and Bean discussed data Artisans, Apache Flink, and how Flink handles state in streaming processing. Part two focuses on the adoption of Flink, why people tend to choose Flink, and available training and learning resources.

In the final installment, Roberts and Bean speak about Flink’s unique take on streaming and batch processing, and how Flink compares to other stream processing frameworks.

Roberts: So, aside from the ability to describe state, what else about Flink makes it especially cool?

Bean: It’s the real-time stream processing. A lot of vendors will say that they offer real time stream processing. When you look at what they actually offer, it’s some derivative side project, maybe a set of libraries that does stream processing, or a couple of extra functions that you can call. Flink is designed from the ground up for stream processing, and it treats batch processing as a special case rather than the other way around. I think that is more interesting for applications that want to handle both analytic data, and real-time data with streams. You don’t need to have two different sets of applications for that since Flink treats them both as the same. It sees batch as a special case of streaming rather than the other way around.

I can picture how if you have a batch process that you sort of chop it into tinier and tinier batches until you’re down to one event, and now you have streaming, but if I’m starting from a streaming point of view, how do I get to batch? What kind of a special case is batch?

Batch is basically streaming with bounds. You point your processor at a fixed data set, and it will process it one record at a time as if it were a stream. Off it goes and it’s done. With Flink, it’s really designed for streams as input. You can point it at a file or a table and say, “That’s a stream.”” I found that when you consider batch processing as a special case of streaming, rather than the other way around, it all comes together more easily.

And if you’ve pointed it at a table, after it pulls all the data off, then new transactions coming in actually become a stream?

Yep, exactly. We’re trained to think about data as if it were static, fixed objects like tables and files, but in fact all data is generated as a stream.

You didn’t get a million records all at once. You got them one at a time. 

The New Rules for Your Data Landscape, batch processing

So, I remember one time asking one of the Spark experts about true streaming handling in Spark Streaming, and they said, “Well, yeah, it does true streaming.” And I said “I thought it did microbatch.” They said, “Well, everybody does microbatch. It’s just that our microbatches have gone down to one message at a time.” What’s your opinion on that?

When you’re working with Spark Streaming, in order to get optimal performance, you have to tune your microbatch size, or your microbatch interval. In Flink you choose the time characteristic instead, and in the event time characteristic, events are microbatched until the watermark advances. It’s a similar issue but it’s closer to the business problem. There is microbatching, but it happens at the framework level, and the OS level, at the level of the network buffer. Which is where it should be, really.

Okay. That makes sense. 

It’s more intuitive, it’s more expressive. As a developer, I find it much easier to learn.

Are there any non-programming interfaces? I know there’s a lot of ways you can write Spark jobs that have nothing to do with Java or Scala or Python. You can build a KNIME workflow and execute in Spark. Syncsort DMX-h can build a data integration job and execute it on Spark. There are notebooks and such. Is there anything like that for Flink?

Not so much, at least on the commercial side. Zeppelin supports Flink, though. I would love to see more of that, and I kind of see that as part of my charter to help build.

So, before we wrap up, is there anything you’d like to let the readers know about before we end?

I mentioned it a little earlier but make sure to check out for some great courses.

Alright. Thanks for taking the time do this. Good talking to you. Good luck with the new job!

Thank you.

Related Posts