C-client runs c-service in the browser
C-Service should be launchable as service worker. This allows to launch a C-Service in browser to have a local C-Service writing in PouchDB. This also allows multiple browser applications to share the same instance of C-Service.
Proposed steps (should be split into separate issues):
C-Client:
-
Registration utils for service workers c-client#54 -
run the c-service as ServiceWorker (if supported on the browser) c-client#55 -
investigate current usages for WebSockets protocol definition #49 c-client#27 -
Setup a bidirectional communication channel between client and service: #49 c-client#27 - MessageChannel (sent via cross-worker messaging?) if ServiceWorker is not supported
- else WebSocket (server-side service)
C-Service:
-
Provide a Service Worker #64 -
investigate how to reuse the graphql & REST setup: run Apollo/Sofa in the browser, intercepting fetch events ? #64 -
properly separate the common code from the code specific to {server,browser}-side execution #64 -
compile/bundle to a ServiceWorker (while mainaining current server-side build) #64
Edited by Yannick Li