4 ms·
This is cool. But why should I run stuff in a Cloud worker, when it can be run in the Browser's service worker !?
by z3t4 8y ago
This is cool. But why should I run stuff in a Cloud worker, when it can be run in the Browser's service worker !?
- elithrar 8y agoDifferent use-cases. You can do crypto operations in a hosted worker (sign/validate requests, auth clients), make caching decisions that don’t require you to consume (precious) client bandwidth, and make routing decisions based on both client properties (geo-location, auth state, etc) and server properties (backend uptime, latency, etc). A good example is HTTP middleware in your web framework of choice: there are things it does that can’t be done safely or correctly on the client, but that you may want to do at the edge before it hits your backend entirely.
- aaimnr 8y agoFor all the reasons you use any kind of backend. To access authenticated resources, to persist data centrally, to share information between users, to hide your proprietary code...