Viktor Klang's blog articles

0
comment
on 11/29/2010 4:32 AM
Curious about what we’ve done? A lot of work has gone into the different dispatchers through Akkas relatively short but intense life so far. Here are some news for Akka 1.0-RC1: 1) There is no public start/stop lifecycle anymore, the dispatcher will be started when it gets its first actor and will be stopped when the last actor leaves 2) The dispatchers will re-start when they get another actor if they were previously stopped 3) The dispatchers will only stop if a new actor hasn’t registered within X mill[...]
>> Read the full article
.
0
comment
on 11/29/2010 3:00 AM
No! Long live the Future! Something that’s new in Akka 1.0-RC1 is the possibility to add hooks that are executed when a Future is completed. Behold! Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_22).Type in expressions to have them evaluated.Type :help for more information.scala> import akka.actor._import akka.actor._scala> import akka.actor.Actor._import akka.actor.Actor._scala> val actor = actorOf( new Actor {  def receive = {    case “foo” => Thread.sleep(10000);[...]
>> Read the full article
.
0
comment
on 11/28/2010 1:07 PM
I’ve been meaning to write something very thoughtful about dependency management over the past year, but haven’t found time to do it. So now I’ll just blurt it out and see what you think of it. Dependency management in Java land usually means keeping track of .jar-files - this is stupid. “What?” you say? Well packaging a .jar file means that you feel you’re qualified to make the decision on what parts of your code other people will need and use. In other words, you’re trying to see into the future and cre[...]
>> Read the full article
.
0
comment
on 11/28/2010 1:01 AM
Something that’s new in Akka 1.0-RC1 is the “unhandled”-callback for Actor. This is what it looks like:   /**    * User overridable callback.    *    * Is called when a message isn’t handled by the current behavior of the actor    * by default it throws an UnhandledMessageException    */    def unhandled(msg: Any){      throw new UnhandledMessageException(msg,self)    } Then the current behavior of an actor doesn’t handle a message, we pass that message to the unhandled method, and by default that throw[...]
>> Read the full article
.
0
comment
on 11/27/2010 6:02 AM
What’s new in Akka 1.0-RC1 is that HotSwap now takes the following signature: case class HotSwap(code: ActorRef => Actor.Receive, discardOld: Boolean = true) Before it only had: case class HotSwap(code: Actor.Receive) So what’s new is that you can use the “discardOld” parameter to control if you want behaviors to be stacked or not. “discardOld = true” will essentially issue an “unbecome” before it applies the new code. The problem with HotSwap before was that you couldn’t have any reference to “self”, and [...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper