GRPC within service worker / web worker
See original GitHub issueIm trying to run GRPC from inside a service worker. It works fine from inside the main application thread and only throws an error from inside a service worker.
const media = new MediaServiceClient(process.env.VUE_APP_GRPC)
media.index(pagination, headers)
Error:
Uncaught (in promise) TypeError: e.serializeBinary is not a function
Im assuming this is due to how GRPC communicates to the backend services and assuming this is not possible to do at the moment?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Single scheduler — Multiple Worker Architecture with GRPC ...
The scheduler is a gateway to the worker cluster. Requests to the scheduler are made via HTTP, these requests are then translated into...
Read more >The state of gRPC in the browser
The gRPC HTTP/2 implementations all support the four method types: unary, server-side, client-side, and bi-directional streaming. However, the ...
Read more >@ngx-grpc/worker-client - npm
Angular gRPC framework: worker client package. Latest version: 3.0.3, last published: 2 months ago. Start using @ngx-grpc/worker-client in ...
Read more >What Are gRPC Web Services and When Should I Use Them?
Instead, like WSDL/SOAP services, gRPC is a technical specification that lets you call methods over the Internet without worrying about what ...
Read more >Performance best practices with gRPC | Microsoft Learn
gRPC is designed for high-performance services. ... A worker in the client is sending or receiving regular messages with a gRPC service.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have a patch in google-closure to support service workers (via fetch) and will try to get the change to github soon.
How so? The generated code references window object which is not available in web worker. @markns