Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: FaaS – Serverless functions framework for Docker (github.com/alexellis)
73 points by alexellisuk on March 22, 2017 | hide | past | favorite | 21 comments



Anyone knows how this compare to iron functions https://github.com/iron-io/functions

Looks similar. Docker image with entry point but the entry point is a server instead of process and it reuses the docker container instead of shutting it down

Would be great to get a quick comparison between the two.

Another tool in the same category is hook.io microcule https://github.com/Stackvana/microcule

both iron functions and microcule are battle tested by companies


The project and UI looks very cool. But can someone explain to me why FaaS is a good thing? Isn't this just a perversion of microservices with a ton of development, operations, CPU, memory and network overhead?


Kindof. If you look at aws lambda, you get a few more things for the overhead price: namely, integration with other services (Iam, cognito) and no need to worry about whether your auto scaling setup or instance sizes are appropriate... It really is just a logical extension of the concept of the cloud.

Then again, I certainly wouldn't use it for everything, but ymmv


Wow, I was thinking about building something like that but this looks very good!

Is there a way to map query parameters and / or http headers to input JSON? (a la API Gateway).


So I'd like to know more about your usercases - it's something I want to add to the roadmap. Right now this is designed to be facing services making HTTP POSTs aka webhooks and to act as an event type bus for modern web.


Sometimes I've got a service that won't send plain JSON but rather some data in query parameters and some in http headers. So it's rather for integration with others. AWS API Gateway makes it possible to build the input JSON out of any of (body, headers, query params) just before the lambda function is invoked. Note that they are using Velocity templates so it doesn't really look good but if you need this data it gets the job done.


That makes sense, do you have any examples? The input doesn't have to be JSON btw.


I'm wondering more what kind of apps you build where you don't have any exposed API. This seems to be the melody of serverless though but for me the most obvious use case is an API so I'm not really following.


One use-case is for acting as an event sink or event bus for webhooks. So integrations with Github, AlertManager, Confluence, Minio - basically anything that generates a webhook could be sunk into this gateway and handled as needed.


Github webhooks also have data in headers. Some of it is security critical (X-Hub-Signature). See https://developer.github.com/webhooks/#delivery-headers


This might be the only reason why I give Docker another try.


I like the simplicity, but have some issues with the stdin/stdout approach - firing up a new interpreter for every invocation has the potential to become costly in terms of time to first byte...

iron.io seems a trifle better in that regard, although and I've been fiddling with it and trying to figure out the amount of work involved in getting it to run on ARM, which seems to be quite a bit more.


What's interesting is that all other alternatives listed here in comments also use stdin & stdout. Have we returned to CGI?


This works on ARM natively, just use files named .armhf. there is a cost involved with process pipes but you can optimize this by providing your own web server listening on port 8080, it just has to accept a POST.

Here's a quick-start guide for ARM: https://gist.github.com/alexellis/665332cd8bd9657c9649d0cd6c...


It would be nice to see an example of a function that accepts POST, btw., since that would make it easy to do a long-running function that took advantage of recurring requests to cache/optimize parts of a computation.

I went through the repo and didn't spot anything obvious (might have missed it).


The post is handled in the watchdog function which is embedded into each function. https://github.com/alexellis/faas/blob/master/watchdog/main....

All sample functions are using a POST - within your function you receive that value through STDIN and output response via STDOUT.

Example Alexa Skill:

https://github.com/alexellis/faas/blob/master/sample-functio...

Markdown example:

https://github.com/alexellis/faas/tree/master/sample-functio...


Yeah, but iron.io doesn't. that was my point.


Why does this field love to name projects as generically as possible? First "Serverless framework", now this... Either not googleable, or poisoning the search results for the general thing.


The Docker FaaS UI and built-in Prometheus metrics is a great way to build a Serverless configuration. Not to mention how easy it is to install and deploy with one command.


There's also http://fission.io


I think we're trying to do related but slightly different things. This is for Kubernetes only, FaaS is built on Swarm features which are baked into Docker. I would think either could target both orchestrators in the future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: