Skip to content

Instantly share code, notes, and snippets.

View tiranuom's full-sized avatar

tiran sameera wijesekara tiranuom

  • intrigsoft
  • Colombo
View GitHub Profile
@tiranuom
tiranuom / AkkaKotlinFeatureExtension.kt
Created November 16, 2020 08:27
Feaure composition for akka to model complex actor.
import akka.actor.typed.ActorRef
import akka.actor.typed.Behavior
import akka.actor.typed.javadsl.ActorContext
import akka.actor.typed.javadsl.Behaviors
interface SessionFeatureProvider {
val ctx: ActorContext<*>
}
//Session feature
@tiranuom
tiranuom / AkkaSpringKotlinIntegration.kt
Created November 15, 2020 13:17
This gist shows how to properly integrate spring with akka. Furthermore kotlin language features are used to create a comprehensive readable code.
import akka.actor.typed.*
import akka.actor.typed.javadsl.ActorContext
import akka.actor.typed.javadsl.AskPattern
import akka.actor.typed.javadsl.Behaviors
import akka.actor.typed.receptionist.Receptionist
import akka.actor.typed.receptionist.ServiceKey
import akka.japi.function.Function
import kotlinx.coroutines.future.await
import kotlinx.coroutines.runBlocking
import org.springframework.context.annotation.Bean
@tiranuom
tiranuom / bind-spring-corouter-with-akka-actor-system.kt
Created November 5, 2020 15:34
This gist shows how to bind spring router function to akka actor system through extension.
package hms.test.springakkaintegration.akka
import akka.actor.typed.*
import akka.actor.typed.javadsl.ActorContext
import akka.actor.typed.javadsl.AskPattern
import akka.actor.typed.javadsl.Behaviors
import akka.actor.typed.receptionist.Receptionist
import akka.actor.typed.receptionist.ServiceKey
import kotlinx.coroutines.future.await
import org.springframework.context.annotation.Bean
@tiranuom
tiranuom / about.md
Created May 3, 2012 13:06 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer