🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A whole lot of Hellos..

posted in Septopus for project Unsettled World
Published November 10, 2018
Advertisement

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

1 likes 0 comments

Comments

masskonfuzion

This is coming along

November 10, 2018 05:56 PM
Septopus

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

 

November 10, 2018 06:48 PM
Rutin

Nice job, oh and "Hello!" :D 

November 10, 2018 07:21 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement