Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart Isolate vs Akka

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.

like image 808
lihsus Avatar asked Nov 02 '22 01:11

lihsus


1 Answers

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.

like image 104
Alexei Kaigorodov Avatar answered Nov 15 '22 08:11

Alexei Kaigorodov