4 ms·
Show HN: FaaS – Serverless functions framework for Docker
- deleted 10y ago[deleted]
- hbt 10y agoAnyone knows how this compare to iron functions https://github.com/iron-io/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 https://github.com/Stackvana/microcule both iron functions and microcule are battle tested by companies
- isuckatcoding 10y agoThis might be the only reason why I give Docker another try.
- hdhzy 10y agoWow, 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).
- alexellisuk 10y agoSo 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.
- hdhzy 10y agoSometimes 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.
- alexellisuk 10y agoThat makes sense, do you have any examples? The input doesn't have to be JSON btw.
- Kiro 10y agoI'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.
- alexellisuk 10y agoOne 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.
- hdhzy 10y agoGithub webhooks also have data in headers. Some of it is security critical (X-Hub-Signature). See https://developer.github.com/webhooks/#delivery-headers https://developer.github.com/webhooks/#delivery-headers
- mankash666 10y agoThere's also http://fission.io http://fission.io
- alexellisuk 10y agoI 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.
- rcarmo 10y agoI 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.
- alexellisuk 10y agoThis 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/665332cd8bd9657c9649d0cd6c2dc187 https://gist.github.com/alexellis/665332cd8bd9657c9649d0cd6c...
- rcarmo 10y agoYeah, but iron.io doesn't. that was my point.
- rcarmo 10y agoIt 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).
- alexellisuk 10y agoThe post is handled in the watchdog function which is embedded into each function. https://github.com/alexellis/faas/blob/master/watchdog/main.go 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-functions/ChangeColorIntent/handler.js https://github.com/alexellis/faas/blob/master/sample-functio... Markdown example: https://github.com/alexellis/faas/tree/master/sample-functions/MarkdownRender https://github.com/alexellis/faas/tree/master/sample-functio...
- vegasbrianc 10y agoThe 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.
- detaro 10y agoWhy 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.
- arekkas 10y agoThe 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?
- zdragnar 10y agoKindof. 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
- deleted 10y ago[deleted]