5 ms·
> If they made a lower-level model, like, for example, "we start up your binary, and it needs to bind to port X, then we'll send HTTP requests to it and it sho
by notheguyouthink 9y ago
> If they made a lower-level model, like, for example, "we start up your binary, and it needs to bind to port X, then we'll send HTTP requests to it and it should respond appropriately using the following JSON specification," it would take a lot more work to set up your Lambda function and get it working correctly than it does now.
Man, the JSON specification must be annoying/complicated - because the first part of what you said, binding to port X and responding to HTTP, is like.. 1 line in Go.
So the first part of what you said is extremely trivial, so the difficulty must lie in the second part?
I wonder what makes the JSON specification so difficult? From your wording, I assume the HTTP response is being sent to AWS, not the actual HTTP requester. Regardless, it must be damn clumsy to justify calling a simple HTTP response too complicated for developers.
Clearly I've never used Lambda though.
- sreque 9y agoI'm only saying that it would take more effort and place more burden on a developer to figure out how to do all that in their programming language rather than just implement a function. I'm surprised this is a contested point. Tell me in Java, without looking up any online resource, how to set up a FastCGI web application. Can you? Probably not. Now tell me how to write a static method in Java. If you have at least the equivalent Java experience of a freshman undergrad, you can do the latter but not the former. If you think Lambda should use FastCGI as its common interface, then by all means create a project on github that deploys a Go-based FastCGI bridge to Lambda and makes it easy for you to bundle up your FastCGI application into a Lambda function. Problem solved! Now you just have to get people to use it.
- YawningAngel 9y agoI'm pretty sure anyone who programs Java for a living can start up Jetty via their favourite framework. It isn't as if lambdas are trivial to package either.
- SideburnsOfDoom 9y ago> I'm only saying that it would take more effort and place more burden on a developer to figure out how to do all that in their programming language rather than just implement a function But the average developer isn't going to do that, and won't need to. Within a week there would be more than one framework up on github to do the binding in their favourite language for them. Look at how many web frameworks there are.
- landryraccoon 9y ago> there would be more than one framework up on github That's annoying, and something I hate about Javascript. There's no standard way to do it, so everyone has a different way of doing it. I prefer that Lambda has sane, solid standard ways of doing things so if I have to move between projects I know what the heck is going on, rather than having to figure out which of the many homegrown ways of doing things people decided to use.
- nicoburns 9y agoI cant see that being an issue here libraries for unofficial languages / runtimes would likely follow the same api as the official ones. There's precedent in the form of unofficial AWS SDKs...
- SideburnsOfDoom 9y agoI wasn't actually thinking about JavaScript at all. It applies to all languages that I have looked at.
- seniorsassycat 9y agoImplementing a Go lambda is already more complicated than writing a function. It requires binding to a TCP port and receiving gob encoded values. AWS released a library that abstracts that into // main.go package main import ( "github.com/aws/aws-lambda-go/lambda" ) func hello() (string, error) { return "Hello ƛ!", nil } func main() { // Make the handler available for Remote Procedure Call by AWS Lambda lambda.Start(hello) } lambda.Start is the abstraction wrapper.
- ogdoad 9y agoWhy is there a crossbar in the ƛ? Shouldn't it rather be λ?
- stochastic_monk 9y agoI think they have to divide by 2 pi to properly normalize it for a distributed filesystem, analogous to quantum's h-bar. [Edit: this is a joke. I think the person to whom I'm replying has a valid point.]
- seniorsassycat 9y agoI'm not sure, I copied that from the aws/aws-lambda-go repo https://github.com/aws/aws-lambda-go https://github.com/aws/aws-lambda-go