I'm slowly catching up on some of the videos from WWDC this year. The new distributed actors in swift, which extends the language native actor model implementation (introduced last year) to non-local actors distributed across an arbitrary network, look particularly interesting.
Distributed actors need to operate with a Distributed Actor System; this is essentially a plugable implementation that handles serialization, discovery, networking, etc for a collection of actors. Out of the box only a
LocalTestingDistributedActorSystem is provided as of the Swift 5.7 release. The video states that further implementations will be made available in future once they are tested and hardened.
On the one hand, it makes sense to not rush these actor systems, but on the other, I do worry that it’s an indication that perhaps these concepts, and specifically the implementation, have not been properly tested in real world applications before becoming baked into the language, similar to how Apple doesn’t seem to be particularly interested in dogfooding SwiftUI before pushing it out to developers and proclaiming it as the future.
Regardless, I’m excited to see this technology develop. First class distributed actors without having to reach for Erlang and all the complex compromises that choice brings is great.
While it seems that the Sample WebSocket Actor System presented in the video will become a production ready tool in the near future, I also hope we see other production ready Actor Systems made available. As an example, given Apple’s range of platforms, a Personal Area Network Actor System that operated over a combination of bluetooth and wifi covering devices such as Apple Watch, iPhone & iPad, and Mac would be an obvious and useful tool for allowing a developers apps across these device communicate easily and securely in ad hoc ways.