How do functional programmers do user-observable persistent asynchronous programming? I feel like reinventing the wheel building my own infrastructure of hand-written "actors" on top of Lwt in OCaml.
I'm currently using home-made "actors" (threads each running a loop around listening to a mailbox), wherein the state is persisted in a key-value store, with actor IDs deterministically computed from the "intent" of the actor.
-
-
It's good so long as your actor IDs can be stabilized stable in case of moderate changes in actor definitions. Makes replay, extension, debugging, rendering/animation, etc. a lot easier and more stable.
-
Unfortunately, GC of 'actors' is extremely awkward to implement within pure FP.
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!