Jump to content
  • Advertisement

Project: Unsettled World

A whole lot of Hellos..



Well, I've made some significant progress on my MQTT Router.  I've successfully brought 3 nodes online, 1 Primary and 2 Peers, and they are communicating Hellos and building connections between each other.

Here you see the Primary Router's output(Linux):


  • Checks command line arguments (mode, local address/port, primary router address/port)
  • Integrated client subscribes to it's local command feed (IP:Port)
  • Integrated client ON Primary subscribes to the "Router-Hello" feed.
  • Waits for peers to say Hi.
  • Builds new connections to new Peers
  • ReQs Hellos for each Router node on the network.

Peer Router #1(Windows):


  • Checks command line arguments (mode, local address/port, primary router address/port)
  • Integrated client subscribes to it's local command feed (IP:Port)
  • Begins sending periodic Hellos to Primary Router Node
  • Processes Hellos from other router nodes requeued by the Primary.
  • Builds connections to other nodes.
  • Monitors those connections by sending Ping Messages to calculate the RTT.

Peer Router #2(Windows):


  • Same as Peer1 ;)

Here's what the ping output looks like(I had to get rid of some console output to see all the hellos and get them working right.)



So, now that my routers know where everybody is, and how long it takes to get there.  All I need to do now is iron out the message "routing" bits and these things will actually be dynamic routers for the MQTT protocol... I'm kinda pleased with myself so far. 

You're probably still wondering what the hell I'm doing with this stuff... That's okay, I am too.  Kinda. 

I'm currently thinking of it as a Content Delivery Network.  It allows me to push Content out to clients, but it also allows clients to publish/subscribe Content to/from Other Clients. :D

If I integrate this into my game client, it gives me an entirely separate data channel for content delivery, not to mention the peer-to-peer networking implications.

All for now, will share some code and an updated specification when they're moving messages. ;)


Recommended Comments

Indeed, wrote most of the "routing" bits last night, gonna see if I can debug them into a functional state today. :D


Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!