Akka 2.0 branch pushed to repository

35 views
Skip to first unread message

Jonas Bonér

unread,
May 16, 2011, 7:32:01 AM5/16/11
to akka...@googlegroups.com
Here it is: https://github.com/jboner/akka/tree/wip-2.0

IMPORTANT: all code that is pushed into either 'master' or the upcoming 1.2 branch must be cherry-picked and pushed into this 'wip-2.0' branch. 

After lots of work and painful merge I have now committed the branch that will be Akka 2.0. This merges in the clustering stuff from the Cloudy Akka commercial offering. But is changing clustering and remoting from an API to a configuration/deployment task.

The general idea is to add a virtual "address" when creating the Actor like this:

val actorRef = actorOf[MyActor]("service-pi")

And then from the outside configure it how it should be deployed using a deployment config as below. Then it is write the code once, not thinking about remoting or clustering and then as a deployment step configure it to run in a specific way.

Most of the mechanics is there. Clustering, cluster-wide deployment, basic routing etc.

akka { actor { deployment { service-pi { # stateless actor with replication factor 3 and round-robin load-balancer router = "round-robin" # routing (load-balance) scheme to use # available: "direct", "round-robin", "random", "least-cpu", "least-ram", "least-messages" # or: fully qualified class name of the router class # default is "direct"; format = "akka.serializer.Format$Default$" clustered { # makes the actor available in the cluster registry # default (if omitted) is local non-clustered actor home = "node:test-1" # defines the hostname, IP-address or node name of the "home" node for clustered actor # available: "host:<hostname>", "ip:<ip address>" and "node:<node name>" # default is "host:localhost" replicas = 3 # number of actor replicas in the cluster # available: integer above 0 (1-N) or the string "auto" for auto-scaling # if "auto" is used then 'home' has no meaning # default is '1'; stateless = on # is the actor stateless or stateful # if turned 'on': actor is defined as stateless and can be load-balanced accordingly # if turned 'off' (or omitted): actor is defined as stateful which means replicatable through transaction log # default is 'off' } } } }

Some remote test have been commented out. Since the remoting API will be completely removed some are not valid any longer.  The cluster tests have also been commented out since the explicit API will not be exposed later. We have to help out all of us to write good tests for the new clustering. 

There is still a lot of work to do (months) but I think we are on the right track. 

--
Jonas Bonér
CTO 
Typesafe - Enterprise-Grade Scala from the Experts
Phone: +46 733 777 123
Twitter: @jboner

Scott Clasen

unread,
May 16, 2011, 10:15:01 AM5/16/11
to Akka Developer List
Awesome. Excited to see this!

On May 16, 4:32 am, Jonas Bonér <jo...@jonasboner.com> wrote:
> Here it is:https://github.com/jboner/akka/tree/wip-2.0
> *
> *
> *IMPORTANT*: all code that is pushed into either 'master' or the upcoming
> 1.2 branch *must* be cherry-picked and pushed into this 'wip-2.0' branch.

√iktor Ҡlang

unread,
May 16, 2011, 1:59:38 PM5/16/11
to akka...@googlegroups.com
Alright, we should drop the release-1.1 branch.
--
Viktor Klang

Akka Tech Lead
Typesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang

Raymond Roestenburg

unread,
May 17, 2011, 3:54:20 AM5/17/11
to akka...@googlegroups.com
Really cool stuff. Will have to dive into this. Will you still be able to configure deployment programmatically?

On Mon, May 16, 2011 at 1:32 PM, Jonas Bonér <jo...@jonasboner.com> wrote:



--
Raymond Roestenburg

Jonas Bonér

unread,
May 17, 2011, 4:20:48 AM5/17/11
to akka...@googlegroups.com
On 17 May 2011 09:54, Raymond Roestenburg <raymond.r...@gmail.com> wrote:
Really cool stuff. Will have to dive into this. Will you still be able to configure deployment programmatically?

Perhaps. You want that? 

Raymond Roestenburg

unread,
May 17, 2011, 4:28:57 AM5/17/11
to akka...@googlegroups.com
Yes I would like that. Well at least in a way that testing is still easy to do, so setup some stuff and run tests on it. I always like full programmability.

On another note, I have been waiting a while for practical reasons to see what would happen with remoting, since the tickets I was busy with are very dependent on the inner workings of this. (I should have probably picked a less intrusive thing to start off with!)

Just some questions:

Is the remote API going to be completely removed, including netty remote support etc? Or is just the interface going to change (so it is all sort of still there but not visible to the user?) 
Do the guaranteed delivery and pipes and filters tickets still make sense in the light of 2.0 or should they be scrapped? (since it possibly already has guaranteed delivery?)
Do different remoting supports still have a future in this?

Otherwise I'm happy to just pick up some other tickets in the meantime if this is not entirely clear yet.

-- 
Raymond Roestenburg

Jonas Bonér

unread,
May 17, 2011, 4:40:42 AM5/17/11
to akka...@googlegroups.com
On 17 May 2011 10:28, Raymond Roestenburg <raymond.r...@gmail.com> wrote:
Yes I would like that. Well at least in a way that testing is still easy to do, so setup some stuff and run tests on it. I always like full programmability.

I have added this: 

Deployer.deploy(Deploy(
  "service-pi",
  RoundRobin,
  "akka.serialization.Format$Default$",
  Clustered(
    Node("test-1"),
    Replicate(3),
    Stateless))))

But not exposed it to public yet.  

Raymond Roestenburg

unread,
May 17, 2011, 6:10:27 AM5/17/11
to akka...@googlegroups.com
Looks good.
Reply all
Reply to author
Forward
0 new messages