Update samples on the frontpage of akka.io
Currently has:
Scala API // server code class HelloWorldActor extends Actor { def receive = { case msg => self reply (msg + " World") } } remote.start("localhost", 2552).register( "hello-service", actorOf[HelloWorldActor]) // client code val actor = remote.actorFor( "hello-service", "localhost", 2552) val result = (actor ? "Hello").as[String] Java API // server code class HelloWorldActor extends UntypedActor { public void onReceive(Object msg) { getContext().tryReply(msg + " World"); } } remote().start("localhost", 2552).register( "hello-service", actorOf(HelloWorldActor.class)); // client code ActorRef actor = remote().actorFor( "hello-service", "localhost", 2552); Object res = actor.ask("Hello").get(); That's it. Can't be much simpler.
Leave a comment
on 2011-12-15 03:07 *
By Jonas Bonér
Actually, the whole site needs to be changed. Links to STM, Transactors, OSGi etc.
Heather will redo the site for 2.0 final, should we ask her to hurry up and wait for it?
Heather will redo the site for 2.0 final, should we ask her to hurry up and wait for it?
on 2011-12-15 04:35 *
By viktorklang
I think it needs to be started ASAP
on 2011-12-15 05:31 *
By Jonas Bonér
What? Heather's rework or that we should change it?
on 2011-12-15 05:41 *
By viktorklang
The rework. should be done ASAP
Will be fixed with Heather's redesign.