Hacker News new | ask | show | jobs
by lazerwalker 2517 days ago
Most times I've worked with Lambda (or other competing cloud functions) it's been difficult or infeasible to run my function locally. Which means I can now ONLY test my code manually after a minute or so of deploy time.

Separate from anything else about Dark, it appears to fundamentally avoid that problem.

4 comments

With Azure Functions, the runtime[1] is open source, and the development tooling for VSCode makes it easy to run them locally [2], starting up in a few seconds. You pass in your database keys etc as environmental variables, and it integrates nicely with the IoT Hub tooling so you can debug the whole device sends message -> function gets hit flow in one window.

However, I have had this break in places before, and not really been able to figure out why from what is going on under the hood, needing to restart various parts to get it working. Checking the contents of the database is annoyingly manual, requiring a seperate GUI only tool[3] and hitting the refresh button a lot, a "watch" window would be much nicer. Profiling once deployed is also difficult, I ended up having to inject timestamps at various different places to try and measure end to end latency.

If Dark can give better tooling for debugging once deployed, it would be a definite advantage.

[1] https://github.com/Azure/azure-functions-host [2] https://docs.microsoft.com/en-us/azure/azure-functions/funct... [3] https://azure.microsoft.com/en-in/pricing/details/data-explo...

To find out the surprising fact that Azure IoT makes no promises about maximum latency at all, not even a "soft" guarantee without SLA penalties.

I've done a fair number of Azure Functions - mostly triggered from messages on storage queues and running locally under Visual Studio they mostly run fine with an occasional glitch where the function won't trigger - easy enough to stop it and run again. I don't find it a huge problem though.
The Serverless framework provides offline functionality (https://github.com/dherault/serverless-offline) to do this - I've found it works pretty well.
For Lambda, SAM Local [0] exists. Not to say that it magically addresses all the local development cases, but it's there.

[0] https://docs.aws.amazon.com/serverless-application-model/lat...

Can't speak for Lambda, but Azure Functions is trivial to run/test locally.
Have you tried localstack (https://github.com/localstack/localstack) to run AWS lambda locally?
I only work with Azure, so no.