Вопрос

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.

Это было полезно?

Решение

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.

Другие советы

The description http://en.wikipedia.org/wiki/Akka_(toolkit) seems to be similar to what Dart isolates are.
Akka seems more advanced. There is no trancparency yet if you communicate to isolates on the same host or another host for example.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top