Yjs
Service Worker Connector forIt enables communication with a Service Worker thread. The Shared Worker can handle connections, and save changes using a persistent database (e.g. y-indexeddb), while the clients connect to the service worker leveraging improved performance. You can also set it up to perform background tasks.
- Only the Shared Worker connects to the server / other clients (less connection overhead)
- Works best with y-indexeddb
- Faster start-up when multiple windows are open
- Background tasks
Use it!
Retrieve this with bower or npm.
NPM
npm install y-serviceworker --save
Bower
bower install y-serviceworker --save
Example
// register yjs service workerif'serviceWorker' in navigator // Register service worker // it is important to copy yjs-sw-template to the root directory! navigatorserviceWorker // Connect to the service worker
License
y-serviceworker is licensed under the MIT License.