Re:Going Serverless: AWS and Compelling Science Fiction
by mdergosits on Friday November 11, 2016 @04:52PM
(#12934804)
Wouldn't loop detection be equivalent to solving the halting problem? Obviously a naive approach would be disallow recursion/ mutual recursion, but there are valid use cases for those that may not result in infinite execution
[ Parent
| on HN ]
Re:Going Serverless: AWS and Compelling Science Fiction
by harlanji on Friday November 11, 2016 @05:30PM
(#12935091)
I helped design a large scale JS execution engine. We used Babel to rewrite code with loops that could be interrupted by our system. Eg. `for(...){mycode();}` would be recompiled to `for(...){if(!running()){halt();}mycode();}`. The technical reason is that tight loops wouldn't respond to SIGINT, if I recall correctly. So while it doesn't stop infinite loops, it can control the program. I wasn't involved in productionizing it.