Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #5087

Disadvantages of Actor model

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Horizon68 <horizon@horizon.com>
Newsgroups comp.programming.threads
Subject Disadvantages of Actor model
Date Thu, 4 Jul 2019 13:45:21 -0700
Organization A noiseless patient Spider
Lines 62
Message-ID <qfloh1$6u7$5@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 4 Jul 2019 20:45:21 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="2a1580de7ae43484b97e33297e7f0d77"; logging-data="7111"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yt7qmE0Hro73U1FqsTWson/gWBnjvtaI="
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
Cancel-Lock sha1:xyiuO7KSyWTXEu7NTZw5pajuQy0=
Content-Language en-US
X-Mozilla-News-Host news://news.eternal-september.org:119
Xref csiph.com comp.programming.threads:5087

Show key headers only | View raw


Hello..


Disadvantages of Actor model:

1- Not all languages easily enforce immutability

Erlang, the language that first popularized actors has immutability at 
its core but Java and Scala (actually the JVM) does not enforce 
immutability.


2- Still pretty complex

Actors are based on an asynchronous model of programming which is not so 
straight forward and easy to model in all scenarios; it is particularly 
difficult to handle errors and failure scenarios.


3- Does not prevent deadlock or starvation

Two actors can be in the state that wait message one from another; thus 
you have a deadlock just like with locks, although much easier to debug. 
With transactional memory however you are guaranteed deadlock free.


4- Not so efficient

Because of enforced immutability and because many actors have to switch 
in using the same thread actors won't be as efficient as lock-based 
concurrency.


Conclusion:

Lock-based concurrency is the most efficient.


More about Message Passing Process Communication Model and Shared Memory 
Process Communication Model:


An advantage of shared memory model is that memory communication is 
faster as compared to the message passing model on the same machine.

However, shared memory model may create problems such as synchronization 
and memory protection that need to be addressed.

Message passing’s major flaw is the inversion of control–it is a moral 
equivalent of gotos in un-structured programming (it’s about time 
somebody said that message passing is considered harmful).

Also some research shows that the total effort to write an MPI 
application is significantly higher than that required to write a 
shared-memory version of it.




Thank you,
Amine Moulay Ramdane.

Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

Disadvantages of Actor model Horizon68 <horizon@horizon.com> - 2019-07-04 13:45 -0700

csiph-web