Velotio interview question

How would you implement service workers and web workers.