openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
263 stars 115 forks source link

Add Lambda Custom Runtime mode #45

Open alexellis opened 5 years ago

alexellis commented 5 years ago

Add Lambda Custom Runtime mode

Expected Behaviour

The of-watchdog has several modes including http, streaming and a classic mode which simulates the classic watchdog.

I carried out a PoC that showed we can support functions directly from AWS Lambda using the new custom runtime and published the first solution of its kind on GitHub. The code was just a PoC and needs some refactoring to be hardened.

https://github.com/alexellis/lambda-on-openfaas-poc

I was able to show that given a file-system created by the docker-lambda project we can take code written for a custom runtime on AWS Lambda and run it on OpenFaaS with Kubernetes or any of the other back-ends.

Rather than using channels on their own, for synchronization we should also use a SyncMap or a Map with a RWMutex as demonstrated in my inlets project: https://github.com/alexellis/inlets/compare/sync

I'm looking for a volunteer to add this mode to the of-watchdog and port across the example shown in the repo alexellis/lambda-on-openfaas-poc. This will then allow us to create a template and base Docker images to allow people to run their AWS Lambda Node/Python/Go etc projects on OpenFaaS.

Alex

alexellis commented 5 years ago

@ewilde had volunteered to take this on.

Any update since we spoke Ed?

ewilde commented 5 years ago

No progress made on this yet