BeBoRE
BeBoRE
TtRPC
Created by Andrés on 1/7/2025 in #❓-help
Problem using EventEmitters [Weird behavior]
I use redis for my project https://github.com/bebore/ei-noah-bot but that's quite complex, I recommend just following the redis package docs. It's not much different from the event emitter other than that you need to (de)serialize the input and output.
16 replies
TtRPC
Created by Andrés on 1/7/2025 in #❓-help
Problem using EventEmitters [Weird behavior]
Or use the new httpSubscriptionLink
16 replies
TtRPC
Created by Andrés on 1/7/2025 in #❓-help
Problem using EventEmitters [Weird behavior]
You already found the solution, redis is the solution here
16 replies
TtRPC
Created by Andrés on 1/7/2025 in #❓-help
Problem using EventEmitters [Weird behavior]
The ws and next server run on different node proces, event emitters only exist for one node proces, therefore an event emitted on one will not be received by the other
16 replies
TtRPC
Created by brumbrum_brum on 12/6/2024 in #❓-help
Cloudflare worker subscriptions/websockets
As long as you monitor your spending and know where your expenses are coming from you should be good.
7 replies
TtRPC
Created by brumbrum_brum on 12/6/2024 in #❓-help
Cloudflare worker subscriptions/websockets
Yeah, not using hibernation could increase costs especially, but at lower scales I wouldn't worry about it. Good thing about the fetch adapter is that you can switch to a different service pretty easily, so you aren't that vendor locked.
7 replies
TtRPC
Created by brumbrum_brum on 12/6/2024 in #❓-help
Cloudflare worker subscriptions/websockets
Pretty sure the fetch api handler works fine https://trpc.io/docs/server/adapters/fetch As you stated it doesn’t use durable objects, so that could increase costs.
7 replies
TtRPC
Created by DevPanda on 12/4/2024 in #❓-help
use cases
IMO tRPC is best used in a context where one container needs to communicate to another container where the input cannot be fully trusted. So yes this could be client -> server communication, but I’ve also seen it used in Electron applications where the render thread communicates with the main thread.
24 replies
TtRPC
Created by DevPanda on 12/4/2024 in #❓-help
use cases
What do you mean by this?
24 replies
TtRPC
Created by vbhv on 6/28/2024 in #❓-help
websocket or sse
Should be the same concept, they also use an EventSource etc. https://vercel.com/blog/an-introduction-to-streaming-on-the-web Maybe subscriptions are too long running
15 replies
TtRPC
Created by vbhv on 6/28/2024 in #❓-help
websocket or sse
Does state it in their docs
15 replies
TtRPC
Created by vbhv on 6/28/2024 in #❓-help
websocket or sse
Oh, weird thought the edge runtime supported streaming
15 replies
TtRPC
Created by vbhv on 6/28/2024 in #❓-help
websocket or sse
Yeah it works, see what your dev console say and the network tab
15 replies
TtRPC
Created by Odiel on 11/17/2024 in #❓-help
What is wrong with my subscription setup?
In the network tab?
10 replies
TtRPC
Created by Odiel on 11/17/2024 in #❓-help
What is wrong with my subscription setup?
What does your dev console say?
10 replies
TtRPC
Created by Bart ⚡ on 10/14/2024 in #❓-help
Streaming in React Native?
Damn only that one package?
9 replies