Dart Isolate vs Akka

Issue

From what I have understood, Dart isolate is like Akka actors.

However, what I couldn’t figure out is if dart:isolate serves similar purpose as Akka does. Is there a fundamental difference between the two ?

Is dart:isolate a framework for actor model programming just like Akka?

Is it that dart:isolate more similar to scala actors than akka.

Solution

Isolates differ from Akka actors in many ways:

  • isolates do not share memory, that is, are isolated just like Unix processes are

  • as a result, when an isolate is spawned using spawn, all data in the current isolate are duplicated

  • isolate has no central method like receive – or, better say, that method is hidden under the hood. That method takes tasks from execution queue and executes them one by one. This is similar to as GUI thread works. Task are created with callback methods inside. Callbacks are used everywhere in Dart.

Answered By – Alexei Kaigorodov

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *