marick,
@marick@mstdn.social avatar

I don't yet know how to efficiently answer questions about the Swift language, so forgive if the answer is obvious.

Erlang/Elixir have a fault-intolerance library built on top of their version of actors. https://en.wikipedia.org/wiki/Open_Telecom_Platform It involves "supervision trees”, where supervisors control the lifespans of actors they supervise, react to unexpected failures, etc.

Is there an equivalent library for Swift?

dgregor79,
@dgregor79@sfba.social avatar

@marick @ktoso might be able to answer this

ktoso,
@ktoso@mastodon.social avatar

@dgregor79 @marick The isolation model implemented in erlang heavily relies on how a "(erlang) process" (aka. actor), is implemented in the BEAM VM. They get their separate mini-heaps and truly "share nothing". This way one actor can "die" and not impact others.

Swift's actors (as well as Orleans, Akka etc), don't have such strong isolation model, and the actors DO share a common heap, and therefore could technically corrupt shared data. 1/2

nighthawk,
@nighthawk@aus.social avatar

@marick AFAIK this does not exist. An unfortunately placed exclamation mark will crash a Swift program at runtime with no recourse.

The closest you might get in Swift is the work on distributed actors. Though that’s still in beta: https://swift.org/blog/distributed-actors/

ktoso,
@ktoso@mastodon.social avatar

@nighthawk @marick mini clarification: distributed actors are stable and part of the language. The cluster library didn’t hit 1.0 yet but it’s been used in production in some places.

You could also write your own IPC system using the language’s distributed actors :)

But yeah I answered in another toot that we don’t really have the same way to deal with dislocation as the beam vm

nighthawk,
@nighthawk@aus.social avatar

@ktoso @marick Thanks for the clarification and details. Fascinating stuff!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • swift
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • GTA5RPClips
  • InstantRegret
  • rosin
  • love
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • everett
  • thenastyranch
  • osvaldo12
  • provamag3
  • tester
  • cisconetworking
  • tacticalgear
  • ngwrru68w68
  • Durango
  • cubers
  • mdbf
  • normalnudes
  • anitta
  • modclub
  • Leos
  • megavids
  • JUstTest
  • All magazines