<p dir="auto">As a developer, I want to be able to write a service worker and use it both in clients (user agents / web browsers) and in servers.</p>
<p dir="auto">If <code class="notranslate">deno</code> adds support for installing service workers with support for <code class="notranslate">install</code>, <code class="notranslate">activate</code>, <code class="notranslate">fetch</code> and other <code class="notranslate">ServiceWorkerGlobalScope</code> events then isomorphic service workers become a possibility.</p>
<p dir="auto">To build a production ready cloudflare worker/ faas alternative with deno it would be very hard to use the current deno web worker implementation. (basically starting one webworker per handler and then dispatching messages from the main script)<br>
i see some pain points implementing the registration / update workflows that browsers have in the main script, but i think finding a good solution there would REALLY pay of well:</p>
<ul dir="auto">
<li>custom caching strategies for fetch events</li>
<li>resourceful lifetime management of external 'processes' like browsers do with service workers, without having to manually start and stop the web workers</li>
<li>handling, rewriting, transforming, monitoring the requests that imported files make (huge number of possibilities here)</li>
</ul>
<p dir="auto">would love to help, but i dont know rust (yet) and not even at what point in the architecture this would need to be implemented</p>