#Async Signals, Relays, and Signals as Monads

14 messages ยท Page 1 of 1 (latest)

cloud rover
#

Hello! I'm wanting to open a discussion about async and signals in general here. I've been exploring ideas in my signal library, Signalium, which is really trying to show how we can more gracefully integrate reactivity into async in a lot of ways. The talk is here if anyone is interested: https://www.youtube.com/watch?v=wW1AX9yW0hk

This is primarily about sharing ideas and cross-pollination! My hope is that if these ideas make sense, Angular can borrow a few of them or use them as inspiration. And likewise, if someone sees flaws, I'd love to hear about them ๐Ÿ˜„ I'm stuck in React-land for the moment, but I want all of the Signals-based frameworks to get better and learn from each other!

๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ
Tickets are ON SALE for CascadiaJS 2026 - https://cascadiajs.com/2026
๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ

Promises f...

โ–ถ Play video
civic forum
#

Async Signals -> resource (alias "Async reactivity" in documentation)
Relays -> effect
Watcher -> Managed by angular
Context -> Part of resource, a computational params

cloud rover
#

my understanding was that effect needs to be at the top level, and that's not the case in Signalium

#

you can consume a Relay from anywhere in the Signal graph

#

as for async generally, ReactivePromises are I would say an iteration on the Resource idea other frameworks have. The improvement is that ReactivePromises work with async/await, which makes composition of resources much, much nicer

#

yeah @civic forum, Effects and Relays are quite different, I'd suggest digging in a little more there!

faint minnow
#

Aren't relays more like rxResource ?

#

or stream Resources

cloud rover
#

hmm, it's kind of hard for me to tell @faint minnow. Like, conceptually there's a lot of overlap with resource management, so if rxResource can be used anywhere in an observable stream, and it stops using those resources when all subscribers have unsubscribed, then yes

#

I could imagine a world where the new using keyword works with Relays (like, broad sketches, if we actually added syntax for a reactive async function() {} type thing)

#

but using is about block scope, and reactive scope is a bit different

#

but yes, conceptually there's a lot of overlap here. I struggled on naming, I debated calling them Resources but that term felt overloaded

faint minnow
#

Ok, then not exactly.