I recently learned of a neat Cloudflare tool to that lets developers deploy “serverless code”: Cloudflare Workers. It approximates AWS Lambda in being a compute instance that lives in closer to the edge of the users' site, and it’s fast at doing what it does. “Just deploy code” in your choice of language: Javascript, Rust, Python, C/C++… and you needn’t preoccupy yourself about unused capacity, auto-scaling, or load balancing.

A use case is localizing content to the language of the region where it’s being accessed (i.e. translating a webpage into the user’s language). To give further context, the alternatives would be 1) server side render: the content to be translated somewhere on the server where the data lives, or, 2) on the other extreme, the user has installed a extension on their browser that intercepts and translates everything.

Cloudflare Workers has other utilities as a tool for full stack, serverless development, and I spent some time building an example here. What it does is transform a boilerplate template with my personalized profile. In the very near future I’ll show code and flow of how Workers does things.

In the meanwhile, Ashley Williams has a talk about the motivation behind serverless development. Watch at least through the pizza example 🍕 JavaScript’s Journey to the Edge