
AKKA 액터모델은 JVM 기반에 작동하며 SCALA/JAVA뿐만아니라 Kotlin으로도 이용가능하며
TypedActor 액터모델을 활용해 Kotlin으로 작동시켜보는 샘플모음집입니다.
액터모델 러닝커버를 낮추기위해 Copilot를 통해 액터모델을 생성하고 개선해 가는 방법을 채택하였으며 코틀린으로 시작하는 개발팀과 함께 학습하기 위해 작성을 시작하였습니다.
목차:
GIT : https://github.com/psmon/java-labs/tree/master/KotlinBootLabs
kotlin spring-boot-starter-webflux 템플릿으로 시작되었으며 akka 종속및 유닛테스트 종석은 다음을이용
val scalaVersion = "2.13"
val akkaVersion = "2.7.0"
dependencies {
// Akka
implementation(platform("com.typesafe.akka:akka-bom_$scalaVersion:$akkaVersion"))
// Akka UnTyped Actor
implementation("com.typesafe.akka:akka-actor_$scalaVersion:$akkaVersion")
implementation("com.typesafe.akka:akka-stream_$scalaVersion:$akkaVersion")
// Akka Typed Actor
implementation("com.typesafe.akka:akka-actor-typed_$scalaVersion:$akkaVersion")
testImplementation("com.typesafe.akka:akka-actor-testkit-typed_$scalaVersion:$akkaVersion")
// Logging
implementation("ch.qos.logback:logback-classic:1.4.12")
implementation("com.typesafe.akka:akka-slf4j_$scalaVersion:$akkaVersion")
// TestToolKit
testImplementation("com.typesafe.akka:akka-testkit_$scalaVersion:$akkaVersion")
// JUnit
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.3") } |
AKKA 액터모델이 국내활용 사례가 잘없어 인기있는것은 아니지만 리액티브 스트림이 활발한 글로벌 기업의 경우 많은 활용사례가 있습니다.
액터모델은 언어/플랫폼 종속적이지 않는 개발모델로, 자바진영으로 한정 없이 활용 Case는 더 많을것으로 추정합니다.