Chris Oman (4) [Avatar] Offline
#1
Are you interested in corrections to the code samples provided? I believe that a couple of Java examples in chapter 2 have errors in them.
Duncan DeVore (11) [Avatar] Offline
#2
Hi Chris,

By all means feel free to post to this forum the corrections that you feel should be included.

Cheers,

Duncan
Chris Oman (4) [Avatar] Offline
#3
We have been in development of a fairly large scale application using Akka but using the Java API instead of the Scala side. I am really looking forward to reading the rest of the book. We have developed some patterns in house, but I am very interested in the pattern you will be describing, especially CQRS. As for an introduction, the first two chapters have been an great starting point for those new to actor systems and Akka in particular. I eagerly await the rest of the book.

Here are a few things I have found so far.
1. Figure 2.4 - I believe in the bottom half of that, the last message should be 'B msg 2' instead of 'B msg 4'.
2. Listing 2.1 - the declaration of the member 'name' was omitted
3. Listing 2.4 and 2.5 are exactly equivalent in handling unhandled messages. In Listing 2.4, the message will be marked as unhandled and sent to the event stream. In Listing 2.5, any message that is not Hello or Goodbye will just be logged to the logger. Not a big deal if you aren't going for exact equivalence. The same thing is true between Listing 2.6 and 2.7.
4. In Listing 2.6, the getContext().become(hello) statement should be in the actors preStart method rather than the onReceive. As it is, the actor would get it's first message in the onReceive and then the actor would become hello, as opposed to the Scala version where it starts out immediately in the hello state.
5. Listing 2.8 has missing quotes at the end of the path

These are nit-picky things, I realize. Overall, I like the content of what you have so far.
Duncan DeVore (11) [Avatar] Offline
#4
Hi Chris,

This is great feedback. We are hoping to get the next two chapters out within a two weeks and I will include your chapter 2 edits. The CQRS/ES content will be begin to show up the release after next, and is something we are very excited about as well.

Cheers,

Chris Oman wrote:We have been in development of a fairly large scale application using Akka but using the Java API instead of the Scala side. I am really looking forward to reading the rest of the book. We have developed some patterns in house, but I am very interested in the pattern you will be describing, especially CQRS. As for an introduction, the first two chapters have been an great starting point for those new to actor systems and Akka in particular. I eagerly await the rest of the book.

Here are a few things I have found so far.
1. Figure 2.4 - I believe in the bottom half of that, the last message should be 'B msg 2' instead of 'B msg 4'.
2. Listing 2.1 - the declaration of the member 'name' was omitted
3. Listing 2.4 and 2.5 are exactly equivalent in handling unhandled messages. In Listing 2.4, the message will be marked as unhandled and sent to the event stream. In Listing 2.5, any message that is not Hello or Goodbye will just be logged to the logger. Not a big deal if you aren't going for exact equivalence. The same thing is true between Listing 2.6 and 2.7.
4. In Listing 2.6, the getContext().become(hello) statement should be in the actors preStart method rather than the onReceive. As it is, the actor would get it's first message in the onReceive and then the actor would become hello, as opposed to the Scala version where it starts out immediately in the hello state.
5. Listing 2.8 has missing quotes at the end of the path

These are nit-picky things, I realize. Overall, I like the content of what you have so far.
348112 (1) [Avatar] Offline
#5
In version V05 in Listing 8.1 Order Validation

The REPL test yelding to the validation Errors has the excact same call as the working example just before.
so in (6) there is the line

println(Order("cust1", 1434931200000L, OrderType.Phone, List(OrderLine("item1", 1))));

and in (7) the same line is just copied but giving the validation errors as a result.

I think theres a quick fix for that.