jboner/akka — comment on commit 03bc15feb11a4bed8bf2efa42dde2c87cef9d0af
File: akka-actor/src/main/resources/reference.conf line 274
By henrikengstrom:

Great write-up Patrik!

On Fri, Jan 20, 2012 at 08:10, patriknw <
reply@reply.github.com
> wrote:

> I agree with that we should have one daemonic flag and was going to suggest
>
> akka {
> daemonic = off
> actor {
> default-dispatcher {
> daemonic = ${akka.daemonic}
>
> But we could also remove the daemonic config on the individual
> dispatcher/scheduler/remote things and only use akka.daemonic. +1 for that.
>
> If the default value should be on or off needs some discussion though.
>
> Somehow I think the first impression when trying Akka is very important
> and that we don't have to explain to many things to be able to run the
> first HelloWorld. This would be a fair attempt:
>
>
> object HelloWorld extends App {
> val system = ActorSystem()
> val a = system.actorOf(Props[HelloWorld])
> a ! "hello"
> }
>
> class HelloWorld extends Actor {
> def receive = {
> case x => println(x + " world")
> }
> }
>
> This will not work. "hello world" will most often not be printed. We will
> have to explain thread related things in initial sample. As first time user
> I would be more disappointed that my sample doesn't work at all than that
> the jvm doesn't exit automatically.
>
> I agree with that the first impression of Akka is really important and the
HelloWorld example is a very good illustration of how beginners would
expect Akka to work.

> Also, it feels weird that we propagate non-blocking everywhere but the
> very first thing we need to explain is that you must block, and spare one
> thread for keeping things alive.
>
> I think default should be daemonic = off. The everything runs until
> system.shutdown().
>
> Independent of this I think it is a good idea to add the server.join()
> method for the daeomic = on use case. join is pretty well known, but in
> akka we don't use it anywhere else so I think we should stick to more
> existing concepts. system.awaitTermination()
> Even better would be to make system an Awaitable. Await.ready(system, 2
> hours)
> The result could be an exit status code, nonzero indicates abnormal
> termination.
>

I really like this idea too.

>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/jboner/akka/commit/03bc15feb11a4bed8bf2efa42dde2c87cef9d0af#commitcomment-885011
>