If you’re reading this tutorial to implement video or audio call features on your website then you will need the Peer JS server library.However, if you simply need a chat feature you can still use the Peer Server Cloud Service, provided your website doesn’t exceed the concurrent connection limit.
There are firewalls, routers and other roadblocks that can get in the way of peer-to-peer communication, which is where a server comes in.
Peer Server is the server-side component of Peer JS and allows two or more devices to connect together. You can either implement it your own by using the Peer JS server library or use the Peer Server Cloud Service. If you want to get started quickly then Peer Server Cloud Service is for you.
I had to start off by looking up how P2P works, then figure out how to get messages across the network, and then how to bootstrap each node, without centralizing the network.
I decided to make it connectionless because they were simple messages.
If you want to dive into to the specifics of Web RTC, I recommend you to read this HTML5Rocks article on Web RTC Basics and/or this Mozilla Hacks article on Web RTC acronyms.