Permalink
Browse files

Minor doc clarifications

  • Loading branch information...
1 parent adba29b commit 84ce8d811317de2628f998a8e4f5fa2bba6c2b27 @bantonsson bantonsson committed Sep 2, 2012
Showing with 9 additions and 6 deletions.
  1. +7 −4 GREEN_BELT_AKKA.md
  2. +2 −2 service/src/main/scala/com/typesafe/akkademo/service/BettingService.scala
View
@@ -12,7 +12,7 @@ Below is a brief introduction of some concepts you will need for this kata with
### Actor Systems
-An actor system is, among other things, the context in which actors operate.
+An actor system is, among other things, the context in which actors operate. You can have multiple actor systems within the same JVM.
See [Actor Systems](http://doc.akka.io/docs/akka/2.0.3/general/actor-systems.html)
@@ -29,12 +29,13 @@ See [Actors](http://doc.akka.io/docs/akka/2.0.3/scala/actors.html)
**Creating actors**
-In system context ()to be use sparesly)
+In the system context, called top level actors (to be used sparsely)
```
val myActor = system.actorOf(Props[MyActor], "myActorName")
```
-In actor context (i.e. when you already have an actor)
+
+In the actor context, called children (i.e. when you're inside an actor)
```
val myActor = context.actorOf(Props[MyActor], "myActorName")
@@ -48,9 +49,11 @@ Fire and forget
myActor ! "A message"
```
-As futures
+As futures (has performance implications)
```
+import akka.pattern.ask
+
val myFuture = myActor ? "A message"
```
@@ -20,7 +20,7 @@ class BettingService extends Actor with ActorLogging {
*/
def receive = {
- case bet: Bet =>
- case RetrieveBets =>
+ case bet: Bet
+ case RetrieveBets
}
}

0 comments on commit 84ce8d8

Please sign in to comment.