After the announcement of distributed actors, I was excited and began to dive deeper into the topic. Unfortunately, couldn't find any examples that covered it comprehensively. However, this hasn't stopped me from learning. I started reading books about Akka and Erlang and created a small repository where porting Akka in action examples, but quickly realised that there were still some missing pieces.
So, to fill those gaps, I've created a small example with several goals:
To reduce the learning curve for new developers.
To cover, at least partially, some concepts like event sourcing.
While it's based on Swift distributed actors, the project also incorporates:
Would be nice to hear some feedback. Want to be this example as actor modelcorrect as possible, and as I'm only learning and don't have much of experience in writing concurrent and distributed apps using actor model—would be nice to hear some thoughts from people who have this experience.
Also would like to mention next steps I want to cover:
Debugging is hard. Like really hard sometimes, even on a single node (cluster can just crash ). Wanna add swift distributed tracing
@Honza_Dvorsky pointed out that it would be nice to add swift openapi generator, which is a good point. Will try!
Maybe adding some simple authentication an spin application somewhere on my raspberry pi4 or VPS and have some more insights
Yes, event-sourcing would be a nice standalone package! There's various approaches but the overall idea should be quite abstractible, especially with macros and the flexibility you get from actorReady so you can store it and register it for "when events arrive we'll call you"
I'm personally a huge fan of doing something like LiveView, that'd be really cool