Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Akka Streams leverage Akka Actors?

I started learning Akka Streams, which is a framework for processing data with back-pressure functionality. The library is part of Akka that describes itself as:

Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.

These capabilities comes from the nature of Akka actors. However, from my perspective, stream processing and actors are irrelevant concept to each other.

Question: Do Akka Streams take advantage of these features of Akka actors? If yes, would you explain how actors help streams?

like image 707
suztomo Avatar asked Dec 20 '22 01:12

suztomo


1 Answers

Akka Streams is a higher level abstraction than actors. It's an implementation of Reactive Streams which builds on top of the actor model. It takes advantage of all the actor features because it uses actors.

You can even go back to using actors directly in any part of the stream. Look at ActorPublisher and ActorSubscriber.

like image 126
Quizzie Avatar answered Jan 06 '23 06:01

Quizzie