diff --git a/sections/.#5-actors.md b/sections/.#5-actors.md deleted file mode 120000 index 0922e93..0000000 --- a/sections/.#5-actors.md +++ /dev/null @@ -1 +0,0 @@ -alex@minielo.4130 \ No newline at end of file diff --git a/sections/5-actors.md b/sections/5-actors.md index 853b8bf..2308599 100644 --- a/sections/5-actors.md +++ b/sections/5-actors.md @@ -360,8 +360,8 @@ building state machines, called [Akka FSM](http://doc.akka.io/docs/akka/current/scala/fsm.html). But it's inadequate, limiting and its usage leads to bad -practices. Current projects should try replacing it and new -projects should steer clear from it. Prefer to model state machines with +practices. Current projects should try replacing it and new projects +should steer clear from it. Prefer to model state machines with `context.become` instead. The three big reasons for why you want to avoid Akka FSM: @@ -403,12 +403,13 @@ firstGoto(Ramping).thenGoto(Dispatched) ``` This is a made up API. Akka FSM doesn't support this. And at this -point you'll need to fork Akka FSM in order to get it. It's certainly -doable. I know I did it. But if you end up forking Akka's FSM for your -project, you've clearly made a mistake in picking Akka FSM in the -first place. And of course, most people won't ever think of forking -Akka FSM, so they'll end up with hard to test and unreasonable hacks, -like pushing extra internal messages on this actor. +point you'll need to fork Akka FSM in order to get it. It's +[certainly doable](https://gist.github.com/alexandru/b663d50642a25a3644f4277751c5adfb). +But if you end up forking Akka's FSM for your project, you've clearly +made a mistake in picking Akka FSM in the first place. And of course, +most people won't ever think of forking Akka FSM, so they'll end up +with hard to test and unreasonable hacks, like pushing extra internal +messages on this actor. The other reason for why Akka FSM is not adequate is because it forces you to model your state machine as a thing that mutates its