Permalink
Browse files

Minor adjustment

  • Loading branch information...
1 parent b32ecaf commit 0d588a298d0814856aea1edcc58935f0d8f6dd76 Patrik Nordwall committed Sep 28, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 web-to-backend/src/main/scala/sample/Backend.scala
@@ -29,8 +29,8 @@ object Backend {
class TranslationService extends Actor {
self.dispatcher = backendDispatcher
- val translator = loadBalanced(4, actorOf[Translator])
- val counter = loadBalanced(4, actorOf[Counter])
+ val translator = actorOf[Translator].start()
+ val counter = actorOf[Counter].start()
def receive = {
case TranslationRequest(text)
@@ -75,6 +75,7 @@ object Backend {
def receive = {
case x: String
+ // simulate some work
Thread.sleep(100)
val result = x.toUpperCase
self.channel ! result
@@ -86,6 +87,7 @@ object Backend {
def receive = {
case x: String
+ // simulate some work
Thread.sleep(100)
val result = x.split(" ").length
self.channel ! result

0 comments on commit 0d588a2

Please sign in to comment.