News for hackers. Stuff that matters.
Re:Comparing AWS Lambda performance of Node.js, Python, Java... by Jtsummers on Thursday March 08, 2018 @09:42AM (#16544572)
Isn't the intent with a system like Lambda that you'd not do any kind of blocking action. Instead, you'd trigger some event that the AWS database solutions would receive. Once the DB has finished the query it sends the data back and triggers another lambda function.

EDIT: I write this as someone who does no web programming and has only toyed with AWS. This was my understanding from what I read, but not something I actually made.

Re:Comparing AWS Lambda performance of Node.js, Python, Java... by lostcolony on Thursday March 08, 2018 @12:30PM (#16545952)
No. "Once the DB has finished the query it sends the data back and triggers another lambda function"

What mechanism is the DB 'sending' data via? Is it just the response part of the initial query? Then it's executing in the context of the same lambda function. You -could- then call another lambda function from the running lambda function (but why?), but more, what was the function that executed the query doing while it waited?

If it had something it -could- be doing, it should be doing it, so non-blocking is important. If it had nothing it could be doing, it literally does not matter if it was a blocking call or not; it doesn't effect anything.

Now, if you meant you have a trigger in the DB that calls another lambda function, such that the original lambda could complete, yes, of course you could do that. However, if this was a GET style call, not a PUT, your options to get the data back to the user are limited if you don't just keep the REST request open and respond that way. Certainly, any other solution is more complex, probably more expensive, and may not be possible.

Re:Comparing AWS Lambda performance of Node.js, Python, Java... by SideburnsOfDoom on Thursday March 08, 2018 @10:34AM (#16544931)
The relevant methods in the AWS .Net SDK are all awaitable, i.e. not blocking. Even if you did block on waiting for it, an operation on DynamoDB such as writing a record should typically take under 10ms, which would be ok.

So there is no reason at all not to do it in a lambda.

Re:Comparing AWS Lambda performance of Node.js, Python, Java... by candiodari on Thursday March 08, 2018 @08:50PM (#16549289)
From what I've seen in organisations, no. In fact you start 10 threads all of whom start blocking calls, several to DBs hosted outside of amazon.

Inefficient ? Yes. The quest for the $15 page refresh continues.