3 ms·
I didn't see anything in there about ensuring that the messages passed between actors are immutable. Did I miss it?
by Scramblejams 14y ago
I didn't see anything in there about ensuring that the messages passed between actors are immutable. Did I miss it?
- pron 14y agoIt's not enforced by Quasar, and Java, obviously can't ensure that, but in Clojure everything is immutable.
- Scramblejams 14y agoAh, 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.
- pron 14y agoYou'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).
- rektide 14y agoI'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.pdf 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.