-
-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Expected Behaviour
I would like to move Derek to the OpenFaaS golang-http-template so that the process can stay alive for longer without re-forking. This would allow access tokens etc to be cached in memory to reduce API requests and will increase memory under load.
It is also a step towards #62 (break out SDK) so that Derek can be run on other platforms or by other processes other than the OpenFaaS watchdog to enable wider use.
Current Behaviour
Each request runs in a new process meaning that panic and os.Exit() are fair-game to appear anywhere in the code. This prevents the above, so part of the work is refactoring any exiting and error handling.
Possible Solution
Template:
golang-http via: https://github.com/openfaas-incubator/golang-http-template
The initial work will be moving to the new template signature, this should be minimal, then from there testing that we never call panic/os.Exit.
The current Dockerfile is unnecessary at this point, since it could be replaced by the original Golang template. https://github.com/alexellis/derek/blob/master/Dockerfile