Vaibhav
Vaibhav4mo 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
BeBoRE4mo 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
Vaibhav4mo 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
BeBoRE4mo 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