forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
Summer of Code 2016: ServiceWorker infrastructure
Awal Garg edited this page Mar 24, 2016
·
2 revisions
Contact: Josh Matthews (jdm, josh@joshmatthews.net)
The goal of this project is to implement some important building blocks required for the ServiceWorker API. Due to the API's size and complexity, this project is focused on the parts of the specification that revolve around intercepting network requests.
- Implement the missing handle fetch integration for the Fetch implementation, and add unit tests
- Implement logic for marking a service worker as registered and determining if a given HTTP request should be controlled by a worker or not
- Allow script event loops to be notified that a FetchEvent should be dispatched to an appropriate worker, and create a mechanism allowing the result to be propagated back to the network request
- Create infrastructure for sharing workers between multiple pages
Specifications:
Reference: http://www.html5rocks.com/en/tutorials/service-worker/introduction/
Current implementation:
-
https://github.com/servo/servo/blob/master/components/net/fetch/methods.rs (currently missing integration with
handle fetch
from SW specification) - https://github.com/servo/servo/blob/master/components/script/dom/worker.rs
- https://github.com/servo/servo/blob/master/components/script/dom/dedicatedworkerglobalscope.rs (implementation of Web Worker API)
- https://github.com/servo/servo/blob/master/components/script/dom/webidls/Worker.webidl
- https://github.com/servo/servo/blob/master/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl
(Feel free to ask questions in #servo on irc.mozilla.org, or our mailing list!)
- Read the existing Fetch and DedicatedWorkerGlobalScope; try to understand it and its relation to the specifications; as well as how WebIDL works
- Gain experience using Rust by solving an easy DOM issue. Please leave a comment saying that you're working on it.