Think of any SaaS app that has webhooks to notify users of events, and an API for automations to respond to those events. For example:
* Chat service -> Chat bots
* Forums -> Moderator bots
* Spreadsheet editor -> User scripts to perform complex calculations when a cell changes
* Payments service -> Hook to send an invoice upon a successful monthly payment
Today, for a user to receive those webhooks, they have to run a server somewhere. Maybe on Digital Ocean or the like. That's easy if the user is itself a SaaS service, but it's a high hurdle for many other users.
Imagine instead that they could just upload JavaScript directly to the SaaS service, and it'd be run by the service in place of sending a webhook.
But most SaaS app developers don't want to be in the business of trying to run code on behalf of their users. Security and efficiency are both pretty difficult to get right.
Workers for Platforms lets the SaaS developer leverage Cloudflare Workers to do this. Cloudflare understands how to run arbitrary code security and efficiently.
So now, the SaaS developer can offer their users the ability to upload code snippets to automate events.
(Disclosure: I'm the tech lead of Cloudflare Workers, and I'm personally very excited about this product!)
Congrats on the launch! This is something we plan on adding to the Svix webhooks service[1], and we'll definitely take a look at cloudflare when doing it.
Awesome idea, and awesome product! The blog post mentions CF for SaaS will have these features as well. Does that mean if I have primarily SaaS customers, I can expose this feature to their custom domains as an addon?
It orchestrates you and your customers' code by allowing them to run custom code after specific actions. For example, HackerNews could implement this and allows us to run any code right after we post a comment, so we could send an email, call an api, perform a database call, etc.
What's the benefit? You don't need to set this up yourself (security, authentication, validate tokens, create endpoints).
Why don't create an API so we have more control rather than give customers the ability to run any code? Well, it depends. If you can keep up with customer requests, then go ahead with an API. If you have a lot of requests and it's becoming hard to keep up, then you can use Workers for Platforms.
kentonv|3 years ago
Think of any SaaS app that has webhooks to notify users of events, and an API for automations to respond to those events. For example:
* Chat service -> Chat bots
* Forums -> Moderator bots
* Spreadsheet editor -> User scripts to perform complex calculations when a cell changes
* Payments service -> Hook to send an invoice upon a successful monthly payment
Today, for a user to receive those webhooks, they have to run a server somewhere. Maybe on Digital Ocean or the like. That's easy if the user is itself a SaaS service, but it's a high hurdle for many other users.
Imagine instead that they could just upload JavaScript directly to the SaaS service, and it'd be run by the service in place of sending a webhook.
But most SaaS app developers don't want to be in the business of trying to run code on behalf of their users. Security and efficiency are both pretty difficult to get right.
Workers for Platforms lets the SaaS developer leverage Cloudflare Workers to do this. Cloudflare understands how to run arbitrary code security and efficiently.
So now, the SaaS developer can offer their users the ability to upload code snippets to automate events.
(Disclosure: I'm the tech lead of Cloudflare Workers, and I'm personally very excited about this product!)
tasn|3 years ago
[1] https://www.svix.com
clintonb11|3 years ago
giovannibenussi|3 years ago
What's the benefit? You don't need to set this up yourself (security, authentication, validate tokens, create endpoints).
Why don't create an API so we have more control rather than give customers the ability to run any code? Well, it depends. If you can keep up with customer requests, then go ahead with an API. If you have a lot of requests and it's becoming hard to keep up, then you can use Workers for Platforms.