Jump to content
  • Advertisement

Project: Unsettled World

A whole lot of Hellos..

Septopus

748 views

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):

MQTT_router_Primary_workingHellos.png.d4362a91e6f4ab1c2858c8de7b70c542.png

  • 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):

MQTT_router_PEER1_workingHellos.png.3a0653b14675b16ce49d29853057818a.png

  • 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):

MQTT_router_PEER2_workingHELLOS.png.9f52ec438885890fb0433dd6be560088.png

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

mqtt_router_primary_hello_ping.png.502f90a38984719acd5ee19918583fe9.png

 

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



0 Comments


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!