Presented By:
Muskan Gupta(Intern)
Alpakka : Integrating Akka
Streams with different
technology
Lack of etiquette and manners is a huge turn off.
Remote 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.
Turn off your microphone.
Keep your windows on mute.
Our Agenda
● Introduction to Reactive Streams
● Introduction to Akka Streams
● What is Alpakka
● Need for Alpakka
● Kafka to ES and Cassandra
● Demo
Brief About Reactive Streams
Reactive Streams is an initiative to
provide a standard for
asynchronous stream processing
with non-blocking back pressure.
T
● Asynchronous Stream
Processing
● Non-blocking Back-pressured
. ● Stream is basically a sequence of data
that can be infinite.
● Processing a stream is termed as
Stream Processing.
● Asynchronous means that publisher
and consumer are not synced with
each other with a clock.
● Asynchronous processing is required to
enable parallel use of computer
resources.
Asynchronous
Stream
Processing
A way for consumers of data to notify the producers
about their current availability
Back Pressure
Need for Reactive Streams
. ● Handling Streams of data-specially live data whose size is not predetermined.-requires special
care in an asynchronous system.
● To govern the exchange of stream data across an asynchronous boundary - like passing elements
on to another thread or thread-pool.
● The most prominent issue is resource consumption needs to be controlled such that a fast data
source does not overwhelm the stream destination i.e maintaining the back-pressure.
Introduction to Akka-Streams
● Entry point to your
stream.
● Sources receive
demand from
downstream.
● Can receive data from
file, database,
collection etc.
.
Akka Stream is a module built on top of Akka actors to make the ingestion and processing of data easy.
It implement an asynchronous, non-blocking and back-pressured protocol.
● The flow is a
processing step within
the stream.
● It combines one
incoming channel and
one outgoing channel
as well as some
transformation of the
messages passing
through it.
● Exit point of your
stream.
● Sink send
demand to the
source.
● Can write data to
a file, database,
collection etc.
What is Alpakka?
.
Alpakka is an open source project, that is built on
top of Akka-Streams.
It provide a DSL for reactive and stream-oriented
programming.
You can use Java and Scala as well.
It has built-in support for backpressure to handle
the flow of data.
Alpakka provides us a number of connectors to
integrate akka-streams with different
technologies.
Insert Your Subtitle Here
Need of Alpakka
● Akka-Streams does not provide built-in Sources/Sinks/Flows to connect
with different end points.
● If you want to connect external data stores/queue in Akka-Streams you
will have to do coding for that yourself and it would be much more
complex.
● Alpakka comes to rescue in that situation.
Different Connectors in Alpakka
Alpakka Kafka
The Alpakka Kafka connector was originally known as Reactive Kafka or even as
Akka-Streams Kafka.
It let’s you connect Apache Kafka with Akka Streams.
Dependency
libraryDependencies += "com.typesafe.akka" %% "akka-stream-kafka" % "2.0.3"
Alpakka Cassandra
The Alpakka Cassandra provides a connector to connect Cassandra with Akka-Streams.
Dependency
libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-cassandra" %
"2.0.0"
Alpakka Elasticsearch
This is an implementation of Akka-Streams with Elasticsearch. It basically provides us connectors
to connect elasticsearch with akka-streams.
Dependency
libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-elasticsearch" % "2.0.0"
DEMO
References
https://doc.akka.io/docs/alpakka/current/overview.html#versions
https://www.oreilly.com/content/transforming-enterprise-integration-with-
reactive-streams/
https://www.lightbend.com/alpakka
Thank You !
Get in touch with us:
Lorem Studio, Lord Building
D4456, LA, USA

Alpakka:Intergating Akka-Streams with different technology

  • 1.
    Presented By: Muskan Gupta(Intern) Alpakka: Integrating Akka Streams with different technology
  • 2.
    Lack of etiquetteand manners is a huge turn off. Remote 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. Turn off your microphone. Keep your windows on mute.
  • 3.
    Our Agenda ● Introductionto Reactive Streams ● Introduction to Akka Streams ● What is Alpakka ● Need for Alpakka ● Kafka to ES and Cassandra ● Demo
  • 4.
    Brief About ReactiveStreams Reactive Streams is an initiative to provide a standard for asynchronous stream processing with non-blocking back pressure. T ● Asynchronous Stream Processing ● Non-blocking Back-pressured
  • 5.
    . ● Streamis basically a sequence of data that can be infinite. ● Processing a stream is termed as Stream Processing. ● Asynchronous means that publisher and consumer are not synced with each other with a clock. ● Asynchronous processing is required to enable parallel use of computer resources. Asynchronous Stream Processing
  • 6.
    A way forconsumers of data to notify the producers about their current availability Back Pressure
  • 7.
    Need for ReactiveStreams . ● Handling Streams of data-specially live data whose size is not predetermined.-requires special care in an asynchronous system. ● To govern the exchange of stream data across an asynchronous boundary - like passing elements on to another thread or thread-pool. ● The most prominent issue is resource consumption needs to be controlled such that a fast data source does not overwhelm the stream destination i.e maintaining the back-pressure.
  • 8.
    Introduction to Akka-Streams ●Entry point to your stream. ● Sources receive demand from downstream. ● Can receive data from file, database, collection etc. . Akka Stream is a module built on top of Akka actors to make the ingestion and processing of data easy. It implement an asynchronous, non-blocking and back-pressured protocol. ● The flow is a processing step within the stream. ● It combines one incoming channel and one outgoing channel as well as some transformation of the messages passing through it. ● Exit point of your stream. ● Sink send demand to the source. ● Can write data to a file, database, collection etc.
  • 9.
    What is Alpakka? . Alpakkais an open source project, that is built on top of Akka-Streams. It provide a DSL for reactive and stream-oriented programming. You can use Java and Scala as well. It has built-in support for backpressure to handle the flow of data. Alpakka provides us a number of connectors to integrate akka-streams with different technologies. Insert Your Subtitle Here
  • 10.
    Need of Alpakka ●Akka-Streams does not provide built-in Sources/Sinks/Flows to connect with different end points. ● If you want to connect external data stores/queue in Akka-Streams you will have to do coding for that yourself and it would be much more complex. ● Alpakka comes to rescue in that situation.
  • 11.
  • 12.
    Alpakka Kafka The AlpakkaKafka connector was originally known as Reactive Kafka or even as Akka-Streams Kafka. It let’s you connect Apache Kafka with Akka Streams. Dependency libraryDependencies += "com.typesafe.akka" %% "akka-stream-kafka" % "2.0.3"
  • 14.
    Alpakka Cassandra The AlpakkaCassandra provides a connector to connect Cassandra with Akka-Streams. Dependency libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-cassandra" % "2.0.0"
  • 15.
    Alpakka Elasticsearch This isan implementation of Akka-Streams with Elasticsearch. It basically provides us connectors to connect elasticsearch with akka-streams. Dependency libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-elasticsearch" % "2.0.0"
  • 16.
  • 17.
  • 18.
    Thank You ! Getin touch with us: Lorem Studio, Lord Building D4456, LA, USA