evolution-gaming / akka-effect

Cats-Effect & Akka interop
MIT License
55 stars 5 forks source link

Documentation: general aim of the project #145

Open bblfish opened 2 years ago

bblfish commented 2 years ago

Hi,

I am working with Akka and started with cats effect recently and am looking to understand how the two can best work together. This lead me to your project Akka-effect

How are you using it? What is the motivation behind it? What kinds of integration does Akka-effect offer?

t3hnar commented 2 years ago

Hello, these days we mostly use akka-cluster-sharding and relevant dependencies.

This project covers very important bits for using akka cluster & sharding without really exposing Actor/ActorRef as api And it is still far from out of box solution, as we still have things in private repositories

Important thing about this project - as it provides building blocks rather than framework like setup. Those building blocks you can use in various part of Interoperability with akka

bblfish commented 2 years ago

I also wanted to integrate cats-effect with my Akka project Reactive Solid. But I was wondering: how do they tie together?

For example are you running your cats-effect fibres inside one actor or from a thread pool? Or have you found a way to use the actors themselves as fibres? How would you recommend combining cats-effect and actors?

t3hnar commented 2 years ago

I think you should take a look at this test/example https://github.com/evolution-gaming/akka-effect/blob/master/actor-tests/src/test/scala/com/evolutiongaming/akkaeffect/ActorOfTest.scala#L125

bblfish commented 2 years ago

Thanks. That is very interesting example.

I am implementing the IETF's "Signing HTTP Messages" (in httpSig repo) using typelevel bobcats (perhaps that is of interest to evolution-gaming?) So I'll go the IO route in the httpSig tests and look to your examples for inspiration.

I am using Akka typed and also Cats Effect 3.0 so I won't be able to use your cats-effect directly yet. I am looking forward to understanding-by-doing how working this way makes Akka coding better...

t3hnar commented 2 years ago

We see no future in Actor as main building block for applications as well as in Typed Actor

Typed Actor had huge permormance implications in akka-persistence module, hence at Evolution we stick with non typed actors where it is really required and try to hide it type unsafety from users.

overall examples should be good enough to give a rough idea :)