In Akka, I can initialize an actor system from the main(), like this:
object HostManagerApp {
def main(args: Array[String]) {
val system = ActorSystem("Foo", ConfigFactory.load.getConfig("Bar"))
}
}
Alternatively, I can do the same from a class that extends Bootable. As mentioned in the docs, this also allows me to start the app from the command line. What’s the difference between the two approaches?
Its a way to make your code more modular. Using Bootable you can have different independent actor systems in different scala classes all bootstrapping independently, instead of putting them all in one main class.