[Pitch #2] Distributed Actor Runtime

Hello everyone,
As the first part of distributed actors–SE-0366 - Distributed Actor Isolation–was accepted recently, we proceeded on updating the second pitch to the latest state of the design and implementation.

Significant changes were made since the initial designs, most notably:

  • removal of any source generation involvement in the design
  • complete support for generic actors and generic methods
  • completely pluggable serialization mechanism, which make use of SE-0366's introduction of SerializationRequirement and extend it with InvocationEncoder and InvocationDecoder which are able to serialize/deserialize distributed target invocations.
    • these (de-)coders are able to read and write directly to buffers which can be used for the networking layer of the distributed actor system, allowing for very efficient implementations; We are also able to avoid all kinds of indirections, by involving the compiler more in the synthesis of remote calls.
  • the introduction of the remoteCall method on DistributedActorSystem
    • previously this was not possible because the function was not expressible in Swift; Thanks to the new SerializationRequirement, Invocation and RemoteCallTarget concepts as well as introduction of ad-hoc protocol requirement checks we were able to provide this great developer and user-experience with looks-like-normal-swift system implementations.

I'd like give huge shout-out to @kavon, @xedin who helped shape this iteration of the design and implementation. Their work on actor initializers, (distributed) method accessors and overall input on this revision of the design was invaluable. Thank you!

We will be seeking to start a review on this design as soon as the core team is available to do so; In the meantime, please review and let us know any of your questions.

We will be updating the Swift Distributed Actors cluster implementation to support this latest runtime in the coming weeks. Feel free to track progress by watching the repository.

Thank you very much and looking forward to your feedback and questions!


Complete pitch text available here

In case the text has some typos or silly mistakes, please comment on the PR directly.


The previous pitch thread is here: [Pitch] Distributed Actor Runtime - #13 by ktoso

20 Likes