Under the THIL Bonnet
One of the biggest differences between hosting your scripts on a traditional server - or even on a “cloud server” - and hosting them with THIL is how things work behind the scenes to maximize reliability and efficiency.
Once it has a list of scripts ids “in hand” THIL validates and matches them to the stored script data in our database. Again for maximum speed, reliability and scalability, our database is managed by Cloudant.
Where possible, each individual script in the chain is executed in parallel to reduce overall response time, regardless or execution order, each script is run on it’s own server, with 10GB of disk space available to it while it’s running.
This remarkable feat is achieved with our usage of the IronWorker service. IronWorker does the heavy lifting of ensuring that your tasks get done in a way which is completely non-blocking for other tasks being done at the same time by yourself or other THIL users.
At every stage of task execution, the responsible service has been chosen for reliability and consistent speed.
When you call a synchronous task, the THIL api handler waits for the final output of the script chain before returning a response to you. Due to Rackspace Cloud Sites timeout limitations, the most THIL can wait for this output is 15 minutes.
When you call an asynchronous task, THIL returns an acknowledgement response as soon as it knows that all requested scripts are valid and in process. Because Rackspace Cloud Sites is now not involved, asynchronous tasks can run for up to an hour - the limit imposed by IronWorker.
Scheduled tasks are handled by THIL essentially by storing a “note to self” reminder to call your chain at a certain time in the future. At the moment of execution, the scheduled task behaved exactly as a regular asynchronous task.
All the while your tasks are running, any long, resource-intensive tasks are not blocking access to THIL by other users. If you tried the same thing on a regular dedicated server - or even a “cloud server” hosted with Rackspace Cloud Servers or on Amazon EC2 - you would find that having a long running process would be slowing down your responses for other users and tasks on that same server instance.
This feature, among others, makes THIL a friendlier, safer choice for hosting those unpredictable scripts which you would like to run in the background. By outsourcing intensive tasks to THIL with asynchronous calls, you can better use the “foreground” processes of a dedicated or cloud-based web server.
If you’ve read this far and are still awake and alert, it probably means that you also want to be aware of #AutomateMe - where you can tell us what you’d like to automate in your life and we’ll help you find a solution.
If you are a developer, consider posting a recipe of two in the Recipes Center - you can even sell them there, we don’t take a cut of your earnings. Spread the THIL love.
Until next time, stay on top of the world…