Skip to content

Some experiments with using Kotlin coroutines, channels and suspendable functions in working with Akka actors

Notifications You must be signed in to change notification settings

joost-de-vries/akka-kotlin

Repository files navigation

kotlin coroutines and akka actors

These are some experiments in what suspendable functions and channels can mean for Akka.
I wrote an article about it.

Also in there:

  • use suspendable functions to call (ask) akka actor.
  • use functions with receiver for an imperative seeming api.
  • use extension functions to document the request response protocol for the actor.
  • make actorsystem available in coroutine context.
  • make akka actor be the coroutine context so it can call suspendable functions. The coroutines involved have the lifecycle of the actor.

Kotlin actors send a CompletableDeferred in a message to an actor. We can do this for Akka. But that won't work across a cluster of course. So it's of limited use.

About

Some experiments with using Kotlin coroutines, channels and suspendable functions in working with Akka actors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published