Flink API’s
Basic operation of Flink can be explained in very simple terms, as shown in the the following figure:
Figure 18: Flink program execution
As shown in the preceding figure, a Flink programs connects to a source, and then applies use case related operations (transformation, calculations and so on) and then finally outputs the results to the sink. Flink is capable of taking in data of two forms, namely, real-time data (DataStream) and batch data (DataSet). To cater to these distinct data types Flink has two main API’s namely:
- DataStream API: To handle continuous real-time flowing data to cater to real-time stream analytics. API’s are available in Java and Scala.
- DataSet API: To handle stagnant data in batch format. API’s are available in Java, Scala, and Python.
In addition to these main API’s, Flink also has domain specific libraries. The following figure shows some of the important ones that we will be discussing in detail in the following subsections:
Figure 19: Flink API’s