by thdrdt · 6y ago · 0 comments
In Hewitt's actor model, messages are also (immutable) actors. At least in the early version I read about.
previous important contributions including lambda calculus
[Church 1932] (first-class procedures), Petri nets [Petri
1962] (true concurrency), semaphores [Dijkstra 1962-1963],
packet switching [Baran 1964] (concurrent communication
between computers using fixed size packets), capabilities
[Dennis and van Horn 1966] (pointer security), Simula [Dahl
and Nygaard 1967] (class hierarchy), and SmallTalk-72
[Goldberg and Kay 1976] (bit-mapped computer graphics and
browser, the precursor of modern programming Integrated
Development Environments). The lambda calculus could not
express concurrency with the consequence that lambda
calculus programs can be thousands of times slower than
Actors. A Petri net cannot dynamically expand and has the
limitation that tokens can miraculously disappear from
different places, which is inefficient to implement.
Capabilities have the limitation that pointers must be
manipulated using indexes into capability lists thereby
making programming awkward. Simula did not implement
concurrency and did not have messages. SmallTalk-72 used a
byte stream of program tokens thereby making it awkward for
concurrency.
See the following for more information: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3418003
> As Erlang became popular we were often asked "Is Erlang OO" - well, of course the true answer was "No of course not" - but we didn't to say this out loud - so we invented a serious of ingenious ways of answering the question that were designed to give the impression that Erlang was (sort of) OO (If you waved your hands a lot) but not really (If you listened to what we actually said, and read the small print carefully).
Oof.
•Automatically reclamation of storage of an unreachable future [Baker and Hewitt 1977] (e.g. process in Erlang). For example, an Erlang process can be orphaned if its Process Identifier (PID) becomes inaccessible. Also, since Erlang is not strongly typed, cyberattacks can be launched against dangling references to processes that no longer exist.
•Language support for holes in the region of mutual exclusion of an Actor implementation. For example, in Erlang it is necessary for application programmers to explicitly code a message handler for each re-entry into the region of mutual exclusion potentially enabling cyberattacks from outside the process.
For example, if process X on node A sends a message to process Y on node B and the network goes down, that doesn't mean process Y won't send a message to process X when the network resume.
You have made the point exactly. The problem of dangling processes is made worse by the fact that Erlang is not strongly typed.
So I would qualify 'best' to meant "easiest system that 95% looks like actors that you can quickly get up and running and doing useful things and or play around with"
edit : i misread your post, thought you were designing a system, not a PL... maybe you can still answer my question ?
I think i’m still not clear on how you would design a transactional system ( such as order & paiement processing ) with actors in a way that won’t make it look like a microservice based system ( aka : one per subtask, fetching info from a db for each incoming request, and storing the result in a db in the end)
It seemed to me actors had to have a more fine grained context ( such as one per order), but in that case i’m wondering how it’s supposed to handle saving its state regularely so that no information on the order processing state is ever lost
In my experience with Elixir there are never many processes that have a state to save in a database. Eventually it's the same load no matter if the implementation is actor based or object oriented.
https://en.wikipedia.org/wiki/Oracle_machine
https://arstechnica.com/tech-policy/2019/11/supreme-court-wi...
(In the cover photo of that article, it looks like people have been urinating on the Oracle logo!)