Great guide, thanks a lot, it's very usefull ! Looks like I'm not able to use SSE while using Next.js ... I think has something to do with a proxy rewrite + compression, such a shame
Do you think using SSE is better approach than ... flask-socket-io ? Or am I misunderstanding how differently both approaches can be used? For example let's say I have a backend which also is communicating with Hardware (Camera, PLC or something) and then I'm doing some kind of processing with the given data from the hardware and then I want to update UI from the server side. Should I be using multiple while loops with Threads + Queue mechanisms (so while loops wouldn't eat CPU time) or I should use Sockets for such thing ? Sorry for the long question and thank you for the video !
I don't deal with hardware much, but from my understanding use sockets when you need Two-Way communication. If the communication is unidirectional SSE is a good solution to choose. In your example, is the server sending information back to the devices?
Thank you!!!!!!!!!!!
thanks for give me guide!
THANKS A LOT!! This helped me tonss!
Great guide, thanks a lot, it's very usefull !
Looks like I'm not able to use SSE while using Next.js ... I think has something to do with a proxy rewrite + compression, such a shame
I played around with a PR to get that to work. It is possible, just not straightforward or kind
nice information thanks
Do you think using SSE is better approach than ... flask-socket-io ? Or am I misunderstanding how differently both approaches can be used? For example let's say I have a backend which also is communicating with Hardware (Camera, PLC or something) and then I'm doing some kind of processing with the given data from the hardware and then I want to update UI from the server side. Should I be using multiple while loops with Threads + Queue mechanisms (so while loops wouldn't eat CPU time) or I should use Sockets for such thing ? Sorry for the long question and thank you for the video !
I don't deal with hardware much, but from my understanding use sockets when you need Two-Way communication. If the communication is unidirectional SSE is a good solution to choose.
In your example, is the server sending information back to the devices?
Hi, do you know how to make this work cross origin? We are struggling with that 😅
have the server respond with allowing all cors headers