Re:Reality Check for Cloudflare Wasm Workers and Rust
by csomar on Sunday September 19, 2021 @07:50AM
(#28583600)
Thanks. I didn't know about waitUntil, that can unlock some powers.
> we're working on improving that.
I'd assume you are working for Cloudflare. Do you see it going the way of firebase?
Re:Reality Check for Cloudflare Wasm Workers and Rust
by kentonv on Sunday September 19, 2021 @09:57AM
(#28584351)
I'm the tech lead for Cloudflare Workers. :)
I don't know much about Firebase, to be honest, so I'm not sure how to answer that question. But, our aim is that every type of server compute should be something you can build on Workers. Meanwhile, our design philosophy is that Workers should feel like you're programming one big, globe-spanning computer, rather than lots of individual servers.
You can use `event.waitUntil()` to schedule a task that runs after the HTTP response has completed, and you can use cron triggers to schedule background work in the absence of any HTTP request at all. You can even build a reliable async queuing system on top of cron triggers and Durable Objects, though at the moment it's a bit DIY -- we're working on improving that.