Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Disadvantages of Actor model

16 views
Skip to first unread message

Horizon68

unread,
Jul 4, 2019, 4:46:03 PM7/4/19
to
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.

Mr Flibble

unread,
Jul 4, 2019, 5:29:36 PM7/4/19
to
On 04/07/2019 21:45, Horizon68 wrote:
> 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).

Inversion of control is a good thing not a bad thing and when combined
with message passing complex systems can be easily reduced to a collection
of simpler sub-systems. Such systems can be considered orthogonal to
concurrent or data oriented systems, i.e. the two approaches can be used
together if the design of the system (and the system designer) isn't
fucktarded.

So, no, message passing is NOT considered harmful, only a fucktard would
think that.

/Flibble


--
"Snakes didn't evolve, instead talking snakes with legs changed into
snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” –
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."
0 new messages