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

Complete Networking Solution?

Started by sci4me, 02 September 2013 - 09:26 PM
sci4me #1
Posted 02 September 2013 - 11:26 PM
Hey guys! So, basically, in my world, I intend to have a large amount of computers and maybe turtles aswell, working together. I intend to have servers mainly, doing different things, and turtles for mining MAYBE but maybe not. The thing is: I will want to be able to have any of them communicate to any and all of the others. This would be fairly simple and easy if it were a wired network, but since I will have wireless, I will need repeaters… and then it just gets complicated. So, my two questions: 1. wired networks dont have a distance limit do they? 2. is there a SIMPLE (basically as easy as rednet's api) to use that will solve these issues for me? Because all the solutions I think of have problems: broadcast - it could probably work, but.. well.. kind of annoying… and the only other way I can think is making it like a real network which is kind of beyond me. Im just not sure what solution would work best. Maybe I will end up only using wired and IF i ever need wireless, make a dedicated computer that connects the wired to the wireless.. I mean, that probably would be easiest for me to do anyway… However, the other option I have is this: my "os" (its intended for servers mainly, but can be used for other things aswell) COULD have something like this in it. If I were to do that, I would make the IP NOT be the computer ID, but something seperate from that which would be used for detecting which computer to send/receive to, and the computer id's would just be for sending it along the network. Anyway, I don't think I could really implement something like that but maybe. I do need to learn networking at a more advanced level at some point but.. maybe not now.. maybe. We'll see. Anyway, let me know what you guys think about this. Please leave any and all suggestions below! Thanks!
theoriginalbit #2
Posted 02 September 2013 - 11:57 PM
There are lots if examples of routing frameworks. 2 that jump to mind are IIRC BluNet and TorNet? I think that KillaVanillas Common Routing API thing should be able to do it too, however it implements encryption and such too, so may make it harder to use.

The main thing you have to think about when you make you own is message propagation, if you send to one, then it send again to act as a router, the original computer will get the signal again, you have to make sure to ignore that when it comes, if you don't then it will send again, and again, and again, until your network is full of all these routers sending the same signal.
Lyqyd #3
Posted 03 September 2013 - 01:46 AM
LyqydNet does override rednet.send to automatically add routing, if you set every computer up with LyqydNet and set up a few routers. It may be somewhat outdated, so if you run into any trouble with it, please post on the LyqydNet topic (in APIs and Utilities) or post an issue on the github for it. It doesn't handle roaming turtles perfectly yet, IIRC.