DEV Community

Discussion on: Why P2P WebRTC Text Chat Isn't A Good Idea

Collapse
 
emad__elsaid profile image
Emad Elsaid

Another solution is to store the data on all users machines and sync it when they get online together, something like CRDT can help
en.wikipedia.org/wiki/Conflict-fre...
that means you'll keep all the history in all peers machines so you'll have offline search and it's secure as Webrtc connection is already secured, no need for a server to keep the messages at all.

Collapse
 
volomike profile image
Mike Ross πŸ‡ΊπŸ‡Έ

Fascinating!

Collapse
 
weedshaker profile image
weedshaker

That would be a good solution. Or you could use IPFS. My biggest problem with WebRTC is that the ICE Servers get blocked on 3g/4g and I would to have to work around with websocket, then I can just use a centralized service. But look for yourself: peerweb.site/ (it's not a chat but a p2p hosting, chat could be built on top though)