I have been looking at the ways things can talk to other things.
Browser to Browser
- WebRtc is a way of communicating P2P without a server being the broker, unlike websockets, WebRtc says to the host, "hi I need to talk to that browser let me connect to them directly and securely... but server, I don't need you anymore, go away". This is the underlying technology of Google hangouts and other web based meeting / chat apps. What might not be so obvious is that webrtc can send text based data it doesn't have to be video or audio which makes it a faster safer alternative to websockets.
The spec - https://webrtc.org/
MDN - https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API
Browsers to Server, Server to Browsers
- Websockets are real time tcp sockets connected to the web, they do require a server throughout any communications, they send data bi-directionally, they are a noticibly slower. They do not reconnect you if a client looses connect, you have to handle that.
- cookies, a string of delimited text that can hold arbitrary information, it can be accessed on response or in browser.
Server to Browser
Browser to Server
- Post and Put requests can send data bodies between client and server, this is not realtime, but this might not matter, pair this with SSE if you want to.
Server to Server
- TCP it's like the internet for your local network 🔦 (http 1 and 2 are TCP based)
- UDP it's like the internet for your local network except it's got no f***s to give and will send data extremely quickly at anything and nothing ⚫
That's all we have time for folks. 😍
Missed anything? Let me know in the comments.
Top comments (0)