As the world is growing, so is the data. And analysis of this data has become important. But how will you do it? How will you work with the data whose size is unknown to you? A solution to this scenario is Akka-Streams and here I’m going to discuss it.
In this session, you will get to know the basics of Akka-Streams just to get you started. So, let’s begin !!
2. Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session timings, you
are requested not to join sessions
after a 5 minutes threshold post
the session start time.
Feedback
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Silent Mode
Keep your mobile devices in silent
mode, feel free to move out of
session in case you need to attend
an urgent call.
Avoid Disturbance
Avoid unwanted chit chat during
the session.
3. Our Agenda
01 What is Stream
02 What is Akka Stream
03 Why Akka Stream
04 Stream Terminology
05 Working with flows
06 Demo
4. What is Stream
● The word stream means “steady flow of something” and here we have a flow of data.
Stream is basically a sequence of data that can be infinite.
● Streams are a series of elements emitted over time. The series potentially has no
beginning and no end.
5. What is Akka Streams
● Akka Streams follows the Reactive Streams manifesto, which defines a standard for
asynchronous stream processing.
● It is a library to process and transfer a sequence of element using bounded buffer space.
● It is nonblocking that means a certain operation does not hinder the progress of the calling
thread.
● The Akka Streams API is completely decoupled from the Reactive Streams interfaces.
6. Why Akka Stream ?
● Akka Streams provide a higher-level abstraction over Akka's existing actor model.
● Streaming helps you ingest,process , analyze, store data in a quick and responsive manner.
8. Elements
● An element is the processing unit of streams.
● All operations transform and transfer elements from upstream to downstream.
● Buffer sizes are always expressed as number of elements independently from the actual size of the
elements.
9. Source
● This is the entry point to your stream.
● An operator with exactly one output, emitting data elements whenever downstream operators are
ready to receive them.
10. Sink
● This is the exit point of your stream.
● An operator with exactly one input, requesting and accepting data elements, possibly slowing down
the upstream producer of elements.
11. Flow
● The flow is a processing step within the stream.
● An operator which has exactly one input and output, which connects its upstream and
downstream by transforming the data elements flowing through it.
12. Actor Materializer
● It is responsible for creating the underlying actors with the specific functionality you define in your
stream.
● Materialization of a stream is done when there is some terminal command like run or command
like runwith etc. Without materialization there won’t be any functioning as required resources won’t
be provided.
14. BackPressure
● It is a way for consumers of data to notify the producers about their current availability.
● It can also slow down the producer to meet it’s consumption need.
● In the scenario when there is a producer that is producing data at a very high rate and consumer is
slow, then there could be problem.
15. Runnable Graph
● Source , Sink and Flows doesn’t do anything themselves. They are just like templates. We can reuse
them.
● A Flow that has both ends “attached” to a Source and Sink respectively, and is ready to be run().