FSM: describe alternative for Java
The Java FSM DSL may be a far stretch, but we can definitely improve documentation on the Java side. Mail below.
On Fri, Nov 18, 2011 at 5:44 PM, Roland Kuhn <roland.kuhn@typesafe.com> wrote:
Hi Jonas,
there are multiple ways of encoding a state machine within an Actor, but wrt. Java and Akka I don't know of public examples right now. It is basically a matter of how to structure the code: if you look at the Scala FSM trait, it does not actually do much apart from Timers and enhanced syntax. Depending on how much the behaviors for the different states overlap I would either dispatch based on the message or on the state from onReceive(). I am currently on my phone, writing code examples is a bit cumbersome.
Regards
Roland Kuhn
Typesafe — Enterprise-Grade Scala from the Experts
twitter: @rolandkuhn
On 18 nov 2011, at 14:56, Jonas Bonér <jonas@jonasboner.com> wrote:
Roland, do we have any Java API for the FSM DSL? Can you help Manfred?
On Thu, Nov 17, 2011 at 8:51 PM, Manfred Pauli <…> wrote:
Hi Jonas,
I was listening to your speak about Akka today and started to play around with it today (was a very interesting one).
Are there any examples of how to use Akka on Java to implement a State Machine?
Thanks and kind regards,
Manfred
On Fri, Nov 18, 2011 at 5:44 PM, Roland Kuhn <roland.kuhn@typesafe.com> wrote:
Hi Jonas,
there are multiple ways of encoding a state machine within an Actor, but wrt. Java and Akka I don't know of public examples right now. It is basically a matter of how to structure the code: if you look at the Scala FSM trait, it does not actually do much apart from Timers and enhanced syntax. Depending on how much the behaviors for the different states overlap I would either dispatch based on the message or on the state from onReceive(). I am currently on my phone, writing code examples is a bit cumbersome.
Regards
Roland Kuhn
Typesafe — Enterprise-Grade Scala from the Experts
twitter: @rolandkuhn
On 18 nov 2011, at 14:56, Jonas Bonér <jonas@jonasboner.com> wrote:
Roland, do we have any Java API for the FSM DSL? Can you help Manfred?
On Thu, Nov 17, 2011 at 8:51 PM, Manfred Pauli <…> wrote:
Hi Jonas,
I was listening to your speak about Akka today and started to play around with it today (was a very interesting one).
Are there any examples of how to use Akka on Java to implement a State Machine?
Thanks and kind regards,
Manfred
Leave a comment
on 2011-12-05 03:33 *
By Jonas Bonér
Can't we try to come up with a Java DSL? It is not impossible. Fluent interface or something.
Java API needs to be as good as Scala API.
Java API needs to be as good as Scala API.
on 2012-01-24 08:32 *
By rk@rkuhn.info
(In revision:6afed30d430e29f99b7f34040e6e6c8c0cccdcc6) add Java FSM example and reST, see #1428
Branch: wip-1428-FSM-Java-∂π
Branch: wip-1428-FSM-Java-∂π
on 2012-01-24 09:35 *
By rk@rkuhn.info
(In revision:6afed30d430e29f99b7f34040e6e6c8c0cccdcc6) add Java FSM example and reST, see #1428
Branch: master
Branch: master
on 2012-01-24 09:35 *
By rk@rkuhn.info
(In revision:996b2dc1730d3743b8853b35a5dccc9884bac7f7) Merge pull request #255 from jboner/wip-1428-FSM-Java-∂π
add Java FSM example and reST, see #1428
Branch: master
add Java FSM example and reST, see #1428
Branch: master
on 2012-01-27 09:45 *
By rk@rkuhn.info
(In revision:6afed30d430e29f99b7f34040e6e6c8c0cccdcc6) add Java FSM example and reST, see #1428
Branch: wip-1685-remote-cleaup-∂π
Branch: wip-1685-remote-cleaup-∂π
on 2012-01-27 09:46 *
By rk@rkuhn.info
(In revision:996b2dc1730d3743b8853b35a5dccc9884bac7f7) Merge pull request #255 from jboner/wip-1428-FSM-Java-∂π
add Java FSM example and reST, see #1428
Branch: wip-1685-remote-cleaup-∂π
add Java FSM example and reST, see #1428
Branch: wip-1685-remote-cleaup-∂π