News for hackers. Stuff that matters.
Re:Finite state machines with Akka by andy_ppp on Saturday May 14, 2016 @07:59AM (#11695719)
Worth noting that Erlang also has a new gen_statem in R19 coming in June. It looks like a big upgrade to gen_fsm!
Re:Finite state machines with Akka by rdtsc on Saturday May 14, 2016 @12:08PM (#11696716)
Not only that but ssh protocol in R19 will be implemented as a gen_statem, providing a real life usage example for it.

I also liked that Ericsson engaged with the community and considered input and updated code accordingly as they worked on it.

You can see the whole process and discussion in:

https://github.com/erlang/otp/pull/960

Re:Finite state machines with Akka by andy_ppp on Saturday May 14, 2016 @12:30PM (#11696811)
Awesome, I'll definitely have a play with the :ssh module then, even if only from the Elixir side of the fence.

Just been to ElixirConf here in Europe and was super impressed with Erlang Solutions guys and the general quality of the Erlang and Elixir people. Lots of interesting chats!

:-)

Re:Finite state machines with Akka by je42 on Saturday May 14, 2016 @07:49AM (#11695685)
What about Kafka's at-least-once semantics ? Is that being dealt with ?
Re:Finite state machines with Akka by felipefzdz on Saturday May 14, 2016 @02:34PM (#11697449)
Disclaimer: I'm the author of the post.

In this particular example, both events (item_reported and item_deleted) end up in destructive actions identified by unique id. That idempotency makes safe working with Kafka's at-least-once semantics. You can see that it's safe to execute several times this line of code:

  val newItemsToBeDeleted = items.filterNot(_ == item)
Re:Finite state machines with Akka by BrandonBradley on Saturday May 14, 2016 @11:01AM (#11696405)
Your question is hard to understand.

https://kafka.apache.org/08/design.html

"So effectively Kafka guarantees at-least-once delivery by default ...."

Edit: Downvote if you want. I was trying to help you.

Re:Finite state machines with Akka by biot on Saturday May 14, 2016 @02:07PM (#11697327)
GP asked how this system deals with Kafka's at least once semantics. Pointing out that Kafka has at least once semantics is redundant.

What GP was asking: what happens if Kafka delivers the "item added" event twice, but the "item deleted" event only once? Do you end up with an invalid/unrecoverable state?

Re:Finite state machines with Akka by partycoder on Saturday May 14, 2016 @06:59PM (#11698449)
Akka is good, the only thing I don't like is that with actors sometimes type safety is lost, or at least takes some effort to enforce at compile time.