logoalt Hacker News

tekacsyesterday at 11:04 PM1 replyview on HN

First of all, this is wonderful stuff!

As a minor thought / question – I'm a little surprised that this isn't (yet) wired up for pods to run in Web workers.

I appreciate that there is a Clock mechanism (allowing you to step the cluster), which would be more difficult in that setup, but... I feel like especially with SharedArrayBuffer (which admittedly requires the right COOP/COEP), that could be pulled off with atomics.

Would be very cool to be able to actually thread in earnest with this design!


Replies

samwhoyesterday at 11:35 PM

Web workers were on my mind from the start but I never found myself needing them. They were always my ace-in-the-hole if this ended up being too CPU hungry on the main thread but it never happened, so I didn’t bother.

One of the fun things is it shouldn’t be too difficult to create a new RuntimeService that uses web workers and slots in alongside my existing CRI. I’d love a PR along those lines!

show 1 reply