DEV Community

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

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
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.

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


weedshaker profile image

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: (it's not a chat but a p2p hosting, chat could be built on top though)