4 ms·
Gnu Cobol is an interesting project, they support a lot of dialects. One big draw back is the generated code isn’t thread safe so cgi is about the only option f
by marktangotango 7y ago
Gnu Cobol is an interesting project, they support a lot of dialects. One big draw back is the generated code isn’t thread safe so cgi is about the only option for server side apps. Maybe someone more familiar with the project could comment on that?
- e12e 7y agoIt's kind of funny that you mention "only cgi" as a drawback on an article discussing "edge workers" - not sure if they're like "serverless functions" (new vm pr request) - but I'm assuming they're heavier than "just" new process pr request :)
- jdub 7y agoMost implementations of "serverless" functions are just long-running processes handling requests, like an HTTP server.
- tomByrer 7y agoCloudflare Workers is really a Chromium "browser service worker" that runs on their servers. Since Chromium makes each browser tab isolated as possible, each instance does indeed act as a mini-VM, & AFAIK usually is created/destroyed per HTTP request. Most deployed code uses JavaScript/TypeScript, but also can run WebAssembly, which is how they got COBOL to run there. I've also seen RUST, GoLang, & other sources run on Cloudflare Workers. Shameless self-plug here: https://github.com/tomByrer/awesome-cloudflare-workers https://github.com/tomByrer/awesome-cloudflare-workers
- deleted 7y ago[deleted]
- steveklabnik 7y agoThey’re much, much lighter than a process. They’re a V8 Isolate, basically a VM thread.
- e12e 7y agoThank you (and sibling comments)! Cunningham's Law still works wonders, it seems ;) (and no, I wasn't aware there were such a light weight primitive beneath cf workers - so I didn't make a "false"(ish) claim on purposeose ). Ed: although for rust, and maybe go - i suppose the wasm vm does add quite a bit of overhead? Compared to just compiling to machine code. Are there any open source application servers built around the same architecture? I gather the cf worker implementation itself isn't released as open source?
- steveklabnik 7y agoThere's no separate VM; since we're using V8, it does everything. Some folks have made standalone webassembly VMs, but web browsers run wasm in the context of their existing JS vm, and we're following browser tech, even though it's "server side" in a sense :) wasm is a bit slower than native, but it all depends. All of this is being actively worked on by folks, and so numbers change. > Are there any open source application servers built around the same architecture? I gather the cf worker implementation itself isn't released as open source? There's nothing exactly like workers that's open source, and yes, our implementation isn't open source either, though I would love for that to be the case. There is some stuff that's sort of similar in some senses that is open source; a lot of folks are playing around with server-side wasm. But they have different properties than Workers does. So maybe that's a comparison in one sense, but it's very much not in another sense.
- marktangotango 7y agoI always thought lua and luajit would be great at this but no ones ever done it.
- e12e 7y agoI'm not quite sure which "this" you mean, but there's: Lua and varnish https://github.com/flygoast/libvmod-lua/ https://github.com/flygoast/libvmod-lua/ Lua in nginx https://openresty.org/ https://openresty.org/ And lua in haproxy - for example to verify jwt tokens: https://github.com/haproxytech/haproxy-lua-jwt https://github.com/haproxytech/haproxy-lua-jwt So depending on if you mean green-thread/sandbox or smart edge side includes - or application server... There may or may not be some thing out there already..?
- judge2020 7y agoYou can see Cloudflare's implementation here https://blog.cloudflare.com/cloud-computing-without-containers/ https://blog.cloudflare.com/cloud-computing-without-containe... Although they do re-use the "process" between requests to further reduce the cold start time, and global variables do persist between requests (although not reliably).
- perlgeek 7y agoAren't process pool based FastCGI implementations a thing?