Swift Distributed Actors
There is an existing, influential, paper called &quot;A Note on Distributed Computing&quot; that hugely influenced Java (and other) languages and frameworks that argued precisely against abstracting away <i>remoteness</i>.<p>The Swift team seems to be challenging that thesis:<p><i>&quot;[U]nlike other concurrency models, the actor model is also tremendously valuable for modeling distributed systems. Thanks to the notion of location transparent distributed actors, we can program distributed systems using the familiar idea of actors and then readily move it to a distributed, e.g., clustered, environment.<p>With distributed actors, we aim to simplify and push the state of the art of distributed systems programming, the same way we did with concurrent programming with local actors and Swift’s structured concurrency models embedded in the language.<p>This abstraction does not intend to completely hide away the fact that distributed calls are crossing the network, though. In a way, we are doing the opposite and programming assuming that calls may be remote. This small yet crucial observation allows us to build systems primarily intended for distribution and testable in local test clusters that may even efficiently simulate various error scenarios.<p>Distributed actors are similar to (local) actors because they encapsulate their state with communication exclusively through asynchronous calls. The distributed aspect adds to that equation some additional isolation, type system, and runtime considerations. However, the surface of the feature feels very similar to local actors.&quot;</i><p>Amusingly, in a section immediately followed by &quot;Deja Vu All Over Again&quot;, Waldo et al. write:<p><i>&quot;One conceptual justification for this vision is that whether a call is local or remote has no impact on the correctness of a program. If an object supports a particular interface, and the support of that interface is semantically correct, it makes no difference to the correctness of the program whether the operation is carried out within the same address space, on some other machine, or off-line by some other piece of equipment. Indeed, seeing location as a part of the implementation of an object and therefore as part of the state that an object hides from the outside world appears to be a natural extension of the object-oriented paradigm.<p>Such a system would enjoy many advantages. It would allow the task of software maintenance to be changed in a fundamental way. The granularity of change, and therefore of upgrade, could be changed from the level of the entire system (the current model) to the level of the individual object. As long as the interfaces between objects remain constant, the implementations of those objects can be altered at will. Remote services can be moved into an address space, and objects that share an address space can be split and moved to different machines, as local requirements and needs dictate. An object can be repaired and the repair installed without worry that the change will impact the other objects that make up the system. Indeed, this model appears to be the best way to get away from the “Big Wad of Software” model that currently is causing so much trouble.<p>This vision is centered around the following principles that may, at first, appear plausible:<p>• there is a single natural object-oriented design for a given application, regardless of the context in which that application will be deployed;<p>• failure and performance issues are tied to the implementation of the components of an application, and consideration of these issues should be left out of an initial design; and<p>• the interface of an object is independent of the context in which that object is used.<p>Unfortunately, all of these principles are false. In what follows, we will show why these principles are mistaken, and why it is important to recognize the fundamental differences between distributed computing and local computing.&quot;</i><p>RMI, some may recall, was heavily influenced by the above critique which lead to the very verbose and ceremonial characteristics of Sun&#x27;s Java distributed system&#x27;s APIs that were later criticized as cumbersome.<p>[1]: <a href="http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.41.7628" rel="nofollow">http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.41.7...</a><p>[2]: <a href="http:&#x2F;&#x2F;www.cs.yale.edu&#x2F;homes&#x2F;aspnes&#x2F;classes&#x2F;465&#x2F;notes.pdf" rel="nofollow">http:&#x2F;&#x2F;www.cs.yale.edu&#x2F;homes&#x2F;aspnes&#x2F;classes&#x2F;465&#x2F;notes.pdf</a>