#2836 Adding concurrency with Worker like RingoJS to Fantom?

CretinHo Tue 15 Jun

Sorry I have to say that, I found RingoJS's Worker is easier to use than Fantom's Actor. Even though both being very similar (sending and passing of messages) I found Actor is too complex to grasp.

https://ringojs.org/documentation/workers/

Worker just beautiful. I could get my first multithreading program working after about 30 mins playing with it. Compared to our Actor which I spent days reading the docs and the examples, I still can't grasp it!

SlimerDude Tue 15 Jun

Hi, (I maybe opening up Pandora's box here but...)

You may find my SynchronizedState class a little easier to comprehend, as it is scope safe - that is, the compiler won't let you reference objects you're not supposed to access.

You still have to battle with the comprehension of Fantom's immutability and const classes though - which can be tough at the start.

CretinHo Wed 16 Jun

RingoJS's Worker is share-nothing so we don't have to care about immutable or not because nothing get shared between the thread. I still not yet see anything easier to use than RingoJS's worker.

BTW, RingoJS's Worker is inspired by the Akka framework as they stated in the link above:

https://akka.io/

So it's also the same Actor model being used like our? The only different is the implementations!

Login or Signup to reply.