Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hal and custom runtime instead of node.js #1

Open
purefn opened this issue Mar 21, 2019 · 4 comments
Open

Use hal and custom runtime instead of node.js #1

purefn opened this issue Mar 21, 2019 · 4 comments

Comments

@purefn
Copy link

purefn commented Mar 21, 2019

What are your thoughts on switching from using a node.js runtime environment to using a custom environment with hal instead?

@nmattia
Copy link
Owner

nmattia commented Mar 21, 2019

I didn't know about hal, thanks for sharing! I'll have a look this weekend.

@nmattia
Copy link
Owner

nmattia commented Mar 24, 2019

This is very interesting, I didn't know you could provide custom runtimes: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html

I wonder if using hal would buy us anything, since we need the full input request as opposed to just the request body (I'm sure there's a way of accessing that with hal but couldn't find it). Also the wai-lambda code is much shorter so I do wonder if this wouldn't be overkill. Another solution would be for wai-lambda to provide a function similar to pureRuntime that turns the executable into a "runtime". ll play with both solutions and see what the pros and cons are. Do you have any experience using it @purefn ? Anything to report?

@purefn
Copy link
Author

purefn commented Mar 24, 2019

I haven't used It in anger yet, I've just played with it a bit. I think the mail benefit would be getting rid of any JS code in favor or pure Haskell. It should result in easier to maintain and understand code and better performance.

I'm not sure what you mean about not having full access to the Lambda request. Any of theWithContext or the readerTRuntime function allow you to read it out of the environment.

@Zenleaf
Copy link

Zenleaf commented Apr 23, 2019

You have probably seen this already but you can also use the Haskell AWS Lambda Runtime https://medium.com/the-theam-journey/getting-started-with-the-haskell-aws-lambda-runtime-951b2322c7a3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants