February 15, 2020

Serverless: fnproject, OpenLambda

As far as I remember, Google is the first commercial service providing serverless computing environment.  It wasn't easy to use in the beginning, but it was very well scalable.  Not sure if it was cost effective though.

For a start up, it was very reasonable environment.  That was before container like Docker, and before AWS was popular.  My friend's startup back then used it for its backend.  As the product started to get spikes, scaling it was extremely simple. (but wasn't cheap.)

I've been waiting for cheap-affordable serverless computing environment for personal use.  It doesn't have to be distributed or cloud environment.  I just wanted a simple environment that I could run on one node or more.  And I just deploy a simple applications to it -- somewhat similar concept of dropping WAR in Tomcat, or like OSGi (e.g. Apache Felix - http://felix.apache.org/).  But they are Java only, and not for my purpose (small, simple, light apps).

After numerous searching, I found two serverless implementation that can run in a small environment, or even on a single node: fnproject and OpenLambda  Both of them are open source.

fnproject


fn is very mature and complete project, supporting many languages (Go, Java, Node, Python, Ruby).  It was very simple to use and deploy...but the performance wasn't great.  I believe the implementation is using docker container, and container inside of container.

Requires docker, golang

PROS: simple and easy to install.  Support multiple languages
CONS: slow

OpenLambda


This isn't as mature/complete as fn.  And I failed to install this on Ubuntu 18 VM.  Don't know why.  Compilation was done fine, but failed for 'make test-all'.  To compile, docker, gcc, make, and the latest golang is needed. (v12, v13 worked).  but test failed.  This is probably the same way as it requires docker; container in container approach.

PROS: couldn't test
CONS: n/a

Misc


IronFunctions, https://github.com/iron-io/functions - seems like development has stopped.  Looks like using the same approach, using Docker.  Didn't try this, and you shouldn't either.  Just listing here in case someone is interested.

Conclusion


So the search continues.  I'll probably use AWS lambda, the cost for small experiment/use shouldn't be too much.


REFERENCES



No comments:

Post a Comment