> Function Watchdog
>
> You can make any Docker image into a serverless function by adding
> the Function Watchdog (a tiny Golang HTTP server)
> The Function Watchdog is the entrypoint allowing HTTP requests to be
> forwarded to the target process via STDIN. The response is sent back to
> the caller by writing to STDOUT from your application.
FaaS/serverless is very similar to CGI. When talking to new adopters, I describe serverless cynically as an incredibly resource-wasteful rediscovery of CGI using VMs instead of processes; I describe it charitably as a very flexible CGI in which you don't have to think nearly as much about your physical hardware (that runs your webservers) or your platform code (webservers and frameworks, e.g. httpd/wsgi, that need to be configured to provide the right CGI containers/layers) in order to scale.
CGI is a very powerful concept whose initial adoption was hindered primarily by a lack of standardization of API interchange formats. It's experiencing a resurgence now, I think, because we've gotten a lot better at API-first design, and also because orchestration layers have gotten a lot better.
I feel similarly about Docker/containers: they're basically the rediscovery of static linking, made more popular than it was initially due to the present-day abundance of disk resources and the presence of really easy-to-use-at-scale deployment platforms.
Note that I'm not equating static linking/containerization with CGI/serverless in quality. CGI was pretty much universally an improvement over its predecessor. Static linking has and had many flaws, as the Docker crowd is discovering as container-based shops shift into "who built this crazy Dockerfile anyway, and why did they hand-select an ancient version of OpenSSL?!?!" maintenance mode, and ops folks get surprised by the disk, memory, and startup time costs of legacy containerized microservices that turn out (long after their creators move on) to not be so "micro" after all.
Unless you are binding to a limited set of runtimes (i.e. Node and Python in the way Kubeless currently does) then you do need to find a common "language" or "protocol" to speak to functions. STDIN/STDOUT appears to work quite well.
Not reinvented, the author is aware. For example, the Watchdog has an option called "cgi_headers", which controls whether the headers should be parsed and sent as environment vars (like in CGI) or passed raw.