This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FlamingCacti's profile picture

Large scale networking with RP2

Started by FlamingCacti, 22 July 2012 - 03:28 AM
FlamingCacti #1
Posted 22 July 2012 - 05:28 AM


Ok, if there are multiple towns, and very large distances inbetween them, it would not be practicle to set up a router every 45 blocks (-5 to be safe). So, would the solution be to run a RP2 bundled cable inbetween these towns?
Spoiler
  1. Richard (#37, town A) wants to send Mike (#79, town B )an email (about making efficient fuel cans in IC2, lets say), but he doesnt want to say it over chat. And mike wants to have a copy of the message, for reference. So he gets on his computer and sends an email to #79 (Mike)
  2. Since all the computers in town are on rednet (similar to a WiFi setup), his message gets sent along other peoples computers (Like routers) untill it reaches the main town WiFi server. This server can only talk via WiFi to other computers in the town. The main purpose of this server is to handle in-town networking only. If a packet requests outside of the network, it forwards it to the I/O server
  3. The I/O server knows how to properly send and receive messages from the NAC. The I/O server connects to the NAC through 2 wires, one for in and the other for out. These are bundled into a cable to reserve space in the tunnel. When the I/O server gets a request for outgoing comunications, it checks the queue. Once the file gets to the front of the outgoing queue, the I/O server converts it to binary code and sends it.
  4. The binary message reaches the NAC center. The DNS server waits for the End Of Message code, and then converts the completed binary message back to strings and reads it. All messages are encoded with the destination computer's number. The DNS server searches for the town computer number 79 (Mike) is located in. The DNS server knows 79 is in town B, so it adds the message to the queue. Then after it reaches the end of the queue the server translates it to binary and sends it along town B's incoming wire.
  5. Town B's I/O server notices a message on the incoming line. After the End of Message code is received, the I/O server converts the binary back to a regular string. It then hands the completed message to the WiFi server for distribution.
  6. Town B's WiFi server has a list of all of the computers that were ever connected to it's network. It double checks the computer ID, to make sure the message is at the correct location. IF the server doesnt recognise the ID number, it implys the message came to the wrong place. It then prints out the message on paper, so a human can manualy deliver the message. IF the server does recognise the ID number, it uses rednet to send the message along the routing computers.
  7. Mike sucessfuly recieved a message without error.

By no means am I asking for code for all of this. That would just be a massive project to take upon. What I am asking, however, is is my concept correct? Or would the message get lost in the wires because of unloaded chunks? How could I improve this? What if instead of uses wires and a NAC room, I print out all the messages and load them onto chest carts. Every day, someone escorts these carts to all the towns in which they have an automated sorting system that scans each letter and puts it in a chest if its in the right town.

Just a few ideas Ive had. How practicle are they?
Lyqyd #2
Posted 22 July 2012 - 05:34 AM
If you're setting up a repeater system, you may as well just use rednet instead of trying to use RP2 bundled cables. They are significantly slower for transmitting data versus rednet.

LyqydNet using the longlink option on the between-town routers would accomplish what you're wanting the network to do; you'd just need to write the client/server software.