Vaibhav
Vaibhav3w ago

websocket or sse

So, im implementing real time transcription using google api , so should i use sockets or sse in trpc for this? im using nextjs btw , also tried integrate sockets in my app , its pretty complex for a noob coder like me
3 Replies
BeBoRE
BeBoRE3w ago
For a small app hosting on Vercel with SSE subscriptions removes a lot of complexity involved with setting up NextJS + a WS server
Vaibhav
Vaibhav3w ago
yes you right , but sse only supports server to client comm not vice versa right? im implementing a live transcription , where the user will get the transcript live while he speaks
BeBoRE
BeBoRE3w ago
Subscription are one way only aswell One problem with using HTTP mutations here are the amount of mutations you’d have to send to the server, WebSockets would probably be better for latency
More Posts
How to use output validation for dates? (Zod, SuperJSON)I am trying to add output validation with zod, and my defined zod schema. I have currently set up suCan someone explain to me how `deserialize` works in `input` of `transformer`?```TypeScript export interface DataTransformer { serialize(object: any): any; deserialize(objectWebSocket Subscriptions in Next.js 14 Using `fetchRequestHandler` and `createTRPCReact`Hello everyone, Does anyone have a working example of using WebSockets/subscriptions with `fetchReqHow do I pass FormData from client to the public procedure ?Whilst being able to pass objects when calling mutate() from react-query's, FormData seems to not woTRPCClientError: Cannot use 'in' operator to search for 'error' in nullI am getting weird errors only in production. Everything works and builds perfectly fine locally, buAll backend imports becoming accessible on frontend?**Node Environment Version**: v20.10.0 **Package Manager**: PNPM Workspaces **Repo Setup**: MonorepoComponent suspends/rerenders on cached querykeyI've been trying to fix this issue for ours but dont get ahead I have a query which takes in a striNew versions doesn't fit the docs?I just updated versions of my packages and now I get typescript errors that the my query doesn't fitFind Usages of a procedure do not show client calls.If I define a procedure: ``` const appRouter = router({ list: publicProcedure.query(...) }) ``` tRPC + GCP headers issueHey everyone, I'm currently working on a tRPC-based app and I'm facing an issue with retrieving hea