On a recent scroll through unread emails, I came across Surma’s post, “When You Should be using Web Workers“. This is a thought that I have been coming back to in recent projects.
We used workers in the Compage framework to offset the work done with a data object in the browser. The framework loaded LinkedData object taken from the Flask framework. As we did not have an architecture to go from, I decided to use Web Workers to offset the longer running tasks, such as running some search and linking algorithms, or waiting for the back end to load.
One of the concerns was that the User Interface was not blocked whilst an action took place. It does give the framework a slight asynchronous feel as data might appear a minute after an action is taken. Using them feels a bit clunky but they do allow for the UI to handle larger tasks but, to some point, be user friendly.