Last and this year I had some progress in developing examples (e.g. swift-chat) or brief prototypes [1] of extension plugins on cluster system, like event sourcing and virtual actors. Also with the help of community we're slowly fixing issues in cluster system itself.
While Cluster system is stable and working, it was written before Swift's structured concurrency was introduced and actually uses its own concurrency runtime. This is kinda blocker for me right now, as to develop things further I want system to be stable and up to date with current state of the art. With @ktoso we agreed that best solution right now would be to rewrite system from scratch, here is a issue ticket explaining the motivation and steps: Migrate Cluster system to Swift structured concurrency Ā· Issue #1215 Ā· apple/swift-distributed-actors Ā· GitHub.
I've finally started to reimplement cluster system slowly, and while doing thisārealised that steps on how to implement your own cluster system from scratch could be interesting for people who wants to work with distributed actors. Swift is unique in a way that one of the main parts of distributed actors is bring your own cluster runtime. While Cluster system aims for server side environment, backed by swift-nio, there are many other potential use cases.
While I'm not sure I can fully document it[2], I've decided to create a separate topic here where will try to note what was done and explain each steps as a guideāso that one can read and understand those steps and complexity. Guess, in any case, these notes will be beneficial for later documentation.
So, let's try to dive in and explore this together!
A quick note: Iām learning a lot myself while working on this project, so please donāt hesitate to ask questions, point out issues, or suggest improvements. Any discussion around this topic really helps motivate me to keep developing and writing more about it.![]()