-
-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
README.md
Outdated
@@ -7,6 +7,12 @@ | |||
crowbar makes it easy to write AWS Lambda functions in Rust. It wraps native Rust functions into CPython modules that | |||
handle converting Python objects into Rust objects and back again. | |||
|
|||
## Alternatives | |||
|
|||
As AWS Lambda has added more runtimes, more way to hack rust into the lambda have emerged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here: way -> ways
"run rust on lambda" would probably a better way to communicate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded to sound better
|
||
As AWS Lambda has added more runtimes, more way to hack rust into the lambda have emerged. | ||
|
||
The [Rust on AWS Lambda](https://srijs.github.io/rust-aws-lambda/) project is kind enough to offer an alternative, and a comparison of itself to crowbar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few points that have more to do with the contents of that link than the link itself :)
This compaison lists some data claims without showing any data to back up the claims.
This enables
1) Lower footprint with regards to memory consumption, bundle size, and start-up speed due to no runtime overhead.
2) Lower monetary cost due to #1.
3) No additional build complexity. Building a binary for lambda is as simple as building a Rust binary locally.
Given python is still recognized as having the lowest start up times, are the claims listed here accurate? I have most of my production crowbar lambda functions deployed into the lowest cost tier ( 128mb ) meaning I'm paying the least amount of money possible with crowbar. The complexities of building crowbar binaries targeting the aws env in my experience have less to with python than the state of rusts ssl ecosystem which would be a problem shared by all rust approaches atm.
I'd be interested to see the data these claims were based on and just in general. I'm curious myself how crowbar compares to python proper :) The main benefit in my eyes has less to do with performance gains and more to do with the reliability rusts features offer comparing with python.
I'm surprised this link did not mention is the complexity the application takes on as a result of needing to bundle and run a server as part of the application. To me this begs the question if lambda ( a serverless offering ) is actually the appropriate host run a server vs a server hosting option 🤷♂️
That said, I'm really happy to the solution space evolve. That puts more motivation on aws to officially support rust making none of these necessary :) until then..
Also as an aside the linked serverless plugin is the less maintained and less official one. https://github.com/softprops/serverless-rust now exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issues with that link can be fixed over there since the author of Rust on AWS Lambda seems happy enough to take reasonable changes... And in fact I think has already improved a bit since last time.
I think you're right that the bigger deal is the complexity of building the lambda in the first place, and if you'd rather me write a crowbar focussed snippet instead of linking to that one, I could.
I'm marking this "WIP" for the moment since it seems more data is needed to figure out the best way to word this. I'll do a bit more digging and then take another swing at drafting an alternatives section. |
@euank ping |
@softprops Since you commented on the previous revision, does this now look like something you'd want to see merged? |
I reached out to the rust lambda folks who have now started actually measuring things ;) and removed its previous claims. I feel better I about this now. Building crowbar crates is a solved problem for me now. What's left is implementation details that leak through that itself may have a remedy on the way #46 |
crowbar is really cool, but there are some other really cool projects that solve similar problems. Arguably, rust-aws-lambda, despite its worse name, solves the problem better by merit of coming into existence after lambda added go support.
At the very least it seems like a good idea to let users know of the alternatives.
If you'd rather me word it differently or create a crowbar-biased comparison, I'd be happy to.