Skip to content

add answers to exercise 1-6 chapter 8 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 27, 2016

Conversation

ryblovAV
Copy link
Contributor

Hi, @axel22
Pls see my changes

@@ -0,0 +1,10 @@
language: scala
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that this shows that travis.yml is added, when it is already in the repository.

@axel22
Copy link
Member

axel22 commented Jan 11, 2016

Nice!
Please address my comments, and I will merge this in.

@ryblovAV
Copy link
Contributor Author

Thanks for the reply, I'll try to fix

@ryblovAV ryblovAV force-pushed the master branch 5 times, most recently from 8348719 to 6cf639f Compare January 26, 2016 11:16
@ryblovAV
Copy link
Contributor Author

@axel22,
pls see my changes


def checkTransferTo: Receive = {
case AccountActor.Ok => log.info("Transfer complete")
case AccountActor.Error =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should never receive an error from an actor to whom you sent PlusMoney, no?

@axel22
Copy link
Member

axel22 commented Jan 26, 2016

Thanks! I left a couple of minor comments.

@ryblovAV
Copy link
Contributor Author

Hi, @axel22
Thanks for you recommendation,
Maybe I should use the Akka persistence (http://doc.akka.io/docs/akka/current/scala/persistence.html) in exercise 2 ?

@axel22
Copy link
Member

axel22 commented Jan 27, 2016

No, if actors can arbitrarily fail, the only thing you can do is to implement a consensus algorithm and replicate the state of all the bank accounts across multiple actors.

That exercise is meant as a thought experiment to convince yourself of how hard this problem actually is.

axel22 added a commit that referenced this pull request Jan 27, 2016
add answers to exercise 1-6 chapter 8
@axel22 axel22 merged commit 5347792 into concurrent-programming-in-scala:master Jan 27, 2016
@axel22
Copy link
Member

axel22 commented Jan 27, 2016

LGTM! Thanks a lot!

@ryblovAV
Copy link
Contributor Author

Thanks !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants