Scheduled tasks imply repeatedly executing some piece of code according to some interval. Adding retry implies retrying execution until it succeeds. Creating scheduled tasks with Hyperlambda is extremely easy. Making sure your tasks execute using retry logic is slightly more complex, but it's quite easy once you understand the flow of things, and you learn some basic Hyperlambda. To understand our code, we'll need to analyze some of the core Hyperlambda slots first.
Hyperlambda Is Async to the Bone
The above implies that Hyperlambda consumes tiny amounts of operating system resources while it's waiting for tasks. If you invoke [http.get] to retrieve some data from another server, the thread your Hyperlambda is scheduled to run on is actually suspended and released back to the operating system. This allows your operating system to "reuse" threads for different tasks, resulting in your app as a whole can accept a lot more throughput. Your app scales much better as a result.
from DZone.com Feed https://ift.tt/EjrvkGl
No comments:
Post a Comment