http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Apache-Flink-and-serious-streaming-stateful-processing-tp1865p1867.html
Hi Krzysztof,
Thanks for the kind words! I think that Flink is to a good extend set up and provide what you are looking for. The remaining gaps are WIP.
Let me elaborate a bit on Gyula's answers:
1)
Backpressure is very much there, it has always been working well, also better than in Storm, as far as I can tell.
The way Flink builds streams is by shipping buffers through logical channels, which are multiplexed through back-pressured network channels. The buffers (on both sender and receiver side) come from managed bounded buffer pools. As soon as receivers slot down, some bounded amount of data will queue up in the buffer pool on both sender and receiver side, but then the producing operator will block until space in the buffer pool is available.
The back pressure goes back all the way to the sources, and eventually the source will stop grabbing more data, and will leave it (for example in Kafka).
2)
This part is currently under evolution, API wise. It would be good to get your input to make sure we validate the design with real-world use cases. Let me make sure we get correctly what you want to do.
You want to do stateful computation and use key/value state abstraction, but the state should not go into an external key value store. It should be maintained in Flink, but in a out-of-core enabled fashion.
You can do much (but not all) of that right now. You can keep a hash map in your application and make state changes on it. The hash map can be backed up by the fault tolerance system.
This will, however, only work up to a certain size. The benefit is (compared to Samza) that state restoring is quite fast.
We are working on making incrementally backed-up key/value state a first-class citizen in Flink, but is is still WIP.
For now, concerning out-of-core state, you can experiment with embedding an out-of-core key/value database in your operators, something like http://www.mapdb.org Because operators are long lived (unlike in mini batches), this db will keep existing as well. You can even write a method that lets Flink back this up periodically into HDFS. It should work as long as the checkpoint interval is not too high.
Let us know how far that gets you. We will also keep you posted with advances in the state abstraction.
Greetings,
Stephan