Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.

We’ve recently started using PubNub to power some of the realtime connection stuff we do here at CodePen. For instance, with our Professor Mode feature, you use our editor to teach a group of students who are watching on their own computers in their own browsers. That requires a robust realtime connection to do that.

The developers amongst you might be aware of WebSockets. That’s exactly what we’re using, just through PubNub, meaning we’re using their fast/reliable/robust/international network. It also helps us do it all through HTTPS and get through firewalls which can be tricky.

We’ve been super happy with them.

Plus it was awesome to find out after we started using them that they were using us as well! They have a fun tutorial called Doodle With Strangers! showing off how to build a collaborative drawing enviornment. And what does every good tutorial have? A live demo!