Distributed coding assistant demo: a developer client sends programming questions to a frontend router, which load-balances work across backend worker nodes.
Built with Apache Pekko Cluster for horizontal scale (Apache 2.0, production-friendly).
| Layer | Choice |
|---|---|
| Language | Scala 3.6 |
| JVM | Java 25 (--release 25) |
| Actors | Apache Pekko 1.1.3 (cluster + Artery) |
| Packages | com.pratyabhi.assistant.* |
protocol/ CodingQuery, CodingResponse, WorkerRegistration
server/ CodingRouterApp (frontend) + CodingWorkerApp (backend)
client/ DeveloperClient — rotates sample coding prompts
Requires JDK 25 and sbt 1.10+.
1. Router (frontend, port 2551) — start this first; it is the cluster seed node.
sbt "server/runMain com.pratyabhi.assistant.server.router.CodingRouterApp 2551"2. Workers (backend) — join after the router is up.
sbt "server/runMain com.pratyabhi.assistant.server.worker.CodingWorkerApp 2552"
sbt "server/runMain com.pratyabhi.assistant.server.worker.CodingWorkerApp 0"3. Developer client
sbt "client/runMain com.pratyabhi.assistant.client.DeveloperClient 127.0.0.1 2551"The client cycles prompts such as Scala 3 val vs def, async/Future composition, Pekko scaling, refactors, git workflow, tests, and Kubernetes readiness.
CodingQuery("Explain `val` vs `def` in Scala 3.", "dev-1730-0")
// → CodingResponse(..., answer, sessionId)Workers return keyword-aware stub answers suitable for demos; swap CodingWorkerActor.stubAnswer for a real LLM client when ready.