jasongoodwin / learning-akka Goto Github PK
View Code? Open in Web Editor NEWCode From Learning Akka
License: Apache License 2.0
Code From Learning Akka
License: Apache License 2.0
Hi,
In the chapter 2, AkkademyDb class, we have two different syntaxes for the same pattern (sending a failure message to the sender)
case None => sender() ! Status.Failure(new KeyNotFoundException(key))
and
case o => Status.Failure(new ClassNotFoundException)
Why do we user sender() !
in the first example and not the second? Is there any difference? Does it matter?
The default implementation of the SClientIntegrationSpec
class gives an error if we try to run the tests twice. (port already in use).
The default template from giter8 uses TestKit
and BeforeAndAfterAll
to cleanly close the test class after execution. Why not use those?
I'm trying to run your code without activator. It works if I run it with sbt publishLocal
and sbt run
as downloaded. When I copy your build.sbt and src/ directory to another project akka remoting doesn't start. I've also added the activator and activator-launch-1.2.10.jar file but that makes no difference.
What else do I need to get this to work without activator?
Hey, I just went through this and for the code example on page 112:
public void postStart() {
self().ask(new Connect(), null);
}
override def postStart = self ! connect
Shouldn't it be:
public void preStart() {
self().tell(new Connect(), null);
}
override def preStart = self ! connect
I don't find postStart as an akka method that we can override. And the java code should use tell instead of ask.
Is it a typo or am I missing anything?
Thanks
.java not found
learning-akka/ch6/akkademaid-java/src/main/java/com/akkademy/AkkademyDb.java
[
import com.akkademy.japi.GetRequest;
import com.akkademy.japi.KeyNotFoundException;
import com.akkademy.japi.SetRequest;
] not found
file content:
learning-akka/ch6/akkademaid-java/build.sbt
name is [akkademy-db-scala]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.