Re:Show HN: Lightweight Threads, Channels and Actors for the...
by Scramblejams on Thursday May 02, 2013 @01:27PM
(#5645936)
I didn't see anything in there about ensuring that the messages passed between actors are immutable. Did I miss it?
[ Parent
| on HN ]
Re:Show HN: Lightweight Threads, Channels and Actors for the...
by rektide on Thursday May 02, 2013 @03:25PM
(#5646602)
I've already mentioned Kilim in this discussion- it's a JVM bytecode rewriting framework that implements lightweight greenthreaded & isolated actors. Perhaps their introductory text will be of value for highlighting the value of immutability & it's reciprocal side, isolated messaging-
The “Actor” model, espoused by Erlang, Singularity and the
Unix process+pipe model, offers an alternative:
independent communicating sequential entities that share
nothing and communicate by passing messages. Address-space
isolation engenders several desirable properties: component-
oriented testing, elimination of data races, unification of
local and distributed programming models and better optimisation
opportunities for compilers and garbage collectors. Finally,
data-independence promotes failure-independence an exception in
one actor cannot fatally affect another.
https://github.com/kilim/kilim/raw/master/docs/kilim_ecoop08...I personally am not a fan of prohibiting people from doing things (blame Larry Wall, "first postmodern computer language"), and prefer making good tools available for those who do naturally seek immutability or purity or transferable ownership messages (Transferables in web messaging) or other optional ways of restricting themselves, but the actor model is pretty serious about isolation and Kilim is true to that perspective.
Re:Show HN: Lightweight Threads, Channels and Actors for the...
by pron on Thursday May 02, 2013 @01:29PM
(#5645955)
It's not enforced by Quasar, and Java, obviously can't ensure that, but in Clojure everything is immutable.
Re:Show HN: Lightweight Threads, Channels and Actors for the...
by Scramblejams on Thursday May 02, 2013 @01:46PM
(#5646086)
Ah, thanks for the clarification, I missed that Quasar was aimed at Java, which threw me off. (Apparently I can't be expected to read the first sentence carefully.)
After enjoying the benefits of immutability and lightweight message passing, I'd hate to give up the former -- but if you're stuck with Java, I suppose all this is gravy.
Re:Show HN: Lightweight Threads, Channels and Actors for the...
by pron on Thursday May 02, 2013 @01:50PM
(#5646106)
You're not "stuck with Java". Sometimes it's the best tool around. In any case, Quasar is the foundation. Pulsar wraps it with a nifty Clojure API. Perhaps we or someone else will come up with APIs in other JVM languages (I have my eyes on Kotlin).