DEV Community

Murahashi [Matt] Kenichi
Murahashi [Matt] Kenichi

Posted on

Programmable Edge

10 years ago, we said "database access is too slow." We used cache layer, memcached.

5 years ago, we said "access to web server is too slow." We used CDN, application cache.

2 years ago, we said "appCache is not flexible." We used ServiceWorker.

Now, we said "Edge (CDN included) is not flexible."

Introduction of fly

This is from fly readme,

Edge, this is edge, I want to create this by more programmable, and get more flexible.

Example 1

This is just proxy to .

This is getting-started from

import { backends, proxy, middleware, pipeline } from "@fly/cdn";

const mw = pipeline(

const app = mw(

Enter fullscreen mode Exit fullscreen mode

I wrote this, and deployed to fly. I can create edge by easy way!

Example 2

Provided example

   return new Response("Hello! We support whirled peas.", { status: 200})
 // if you'd prefer to be service worker compatibility, this is also supported:
 // around addEventListener('fetch', function(event){})
Enter fullscreen mode Exit fullscreen mode

Example 3

Provided example

addEventListener('fetch', function (event) {
   event.respondWith(new Response('Redirecting',
       headers: {
         'Location': ''
       status: 302
Enter fullscreen mode Exit fullscreen mode


Top comments (1)

shaijut profile image
Shaiju T

What makes different from other cloud providers like AWS, Azure, Netlify. Is it the technology feature or the cost ? Also Do you have serverless technology ?