Node to Node Communication for Online Game Server Hosting

3 min readJul 24, 2014

Warning

We’ve updated our SDKs, and this code is now deprecated.

Good news is we’ve written a comprehensive guide to building a multiplayer game. Check it out!

Node to node communicationNodeCraft provides online game server hosting for gamers and community developers, including dedicated servers, Minecraft servers, and additionally web hosting. With NodeCraft’s custom all-in-one control panel, developers can easily monitor and control all aspects of their game server.

The Need for Real-time for Node to Node Communication

When hosting online game servers, stability and security of the message network is paramount. NodeCraft wanted to enrich their entire application with real-time functionality to provide users with an interactive and engaging experience. Specifically with their customer facing control console, the interface needed to capture STDOUT and STDIN connections and deliver them in real time straight to a web browser.

Players

Build vs Buy

The NodeCraft development team was dealing with minor problems across the many open source MQ libraries which would lead to new points of failure in the application.

They first elected to try to build a real-time infrastructure on their own using a JSON-based TCP relay with Node.js, but soon realized the heavy time and cost commitments in doing so. They then tried to build a network using RabbitMQ and ZMQ, but just like their previous open source attempt, it failed to give them the stability and security they needed in time for launch.

“It was simply not an option for us to build a pub/sub network into our application, especially given our time-frame. There were too many possible variables and it was a subject that was simply too new to for us to start using comfortably,” said Jonathan Yarbor, co-founder and lead developer of NodeCraft Hosting.

Picking PubNub for Node to Node Communication

With a small development team and an approaching launch date, NodeCraft needed a lightweight and low latent real-time data stream network that they could easily implement. The development team didn’t want to have to worry about building out a backend network, and then maintain, operate, and update that network as necessary.

“PubNub allows us to focus on our application, rather than the backbone network that supports it and the worries that accompany that. Knowing that we don’t have to setup a whole monitoring system to make sure our backbone network is running and sending messages is amazing; no crashing, no hardware reboots, and no worries,” said James Ross, co-founder and Operations Manager of NodeCraft Hosting.

Secure and Stable Communication

NodeCraft uses PubNub Data Streams to handle remote node to node communication, and to provide their customers with real-time output for various functions in the application. For example, when a customer uses the File Manager in the NodeCraft customer control panel, PubNub securely issues commands to the node. PubNub also powers the NodeCraft instant logging system using PubNub Storage and Playback.

Configure

Using PubNub, NodeCraft has been able to build and deliver secure and stable online game servers to their users. Not having to worry about maintain and orchestrating their backend data stream network, NodeCraft can focus on their core product.

“PubNub took away our security and stability concerns instantly. What’s really great is that PubNub also started solving other problems we didn’t know it could. They’ve provided us with the confidence that our backbone network will be stable and reliable, and given us the ability to sleep well at night,” said Yarbor.

More from PubNub

How to Create a Dating App: 7 Steps to Fit Any Design
Insights6 minMar 15, 2023

How to Create a Dating App: 7 Steps to Fit Any Design

There are common underlying technologies for a dating app, and in this post, we’ll talk about the major technologies and designs...

Michael Carroll

Michael Carroll

How to Create a Real-time Public Transportation Schedule App
Build6 minMar 14, 2023

How to Create a Real-time Public Transportation Schedule App

How to use geohashing, JavaScript, Google Maps API, and BART API to build a real-time public transit schedule app.

Michael Carroll

Michael Carroll

How to Create Real-Time Vehicle Location Tracking App
Build2 minMar 9, 2023

How to Create Real-Time Vehicle Location Tracking App

How to track and stream real-time vehicle location on a live-updating map using EON, JavaScript, and the Mapbox API.

Michael Carroll

Michael Carroll

Talk to an expert