This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Decentralized Network
Started by cdel, 02 September 2014 - 07:22 AMPosted 02 September 2014 - 09:22 AM
I am wanting to create a decentralized network that any computer could join, I am also wanting a client to be able to search the network and find the 'quickest' path to their destination. I have tried searching throughout the forums for similar projects however I was unsuccessfull and I didn't know where to start, can someone help me out please? :D/>
Posted 02 September 2014 - 09:24 AM
Are you looking to make a computer a relay towards another computer?
Posted 02 September 2014 - 09:28 AM
Are you looking to make a computer a relay towards another computer?
Not a relay, a network in which people can connect to.
Posted 02 September 2014 - 09:47 AM
If you don't need a relay, then all you need to do is equip a computer with a wireless modem and tell it to open a channel via eg rednet.open(). Bam, you're on a network.
If you do need a relay, then do as above, then set up another computer with a wireless modem and tell it to run repeat.
If you want something more specific, you may need to elaborate. Are you wanting to create something similar to WINS or DNS, like rednet.lookup()…?
If you do need a relay, then do as above, then set up another computer with a wireless modem and tell it to run repeat.
If you want something more specific, you may need to elaborate. Are you wanting to create something similar to WINS or DNS, like rednet.lookup()…?
Posted 02 September 2014 - 10:34 AM
If you don't need a relay, then all you need to do is equip a computer with a wireless modem and tell it to open a channel via eg rednet.open(). Bam, you're on a network.
If you do need a relay, then do as above, then set up another computer with a wireless modem and tell it to run repeat.
If you want something more specific, you may need to elaborate. Are you wanting to create something similar to WINS or DNS, like rednet.lookup()…?
Im considering a decentralized network as I want to setup a system on my server where any one computer will help another computer to reach their destination computer. I know its quite similar to a relay although I want it to be very expendable without any modification to the existing network or having to place another rednet extender/repeater/relay.
Posted 02 September 2014 - 12:49 PM
So basically an ad-hoc system? Or am I mistaken?
Posted 02 September 2014 - 12:59 PM
It sounds like what you'd get if you ran "repeat" on every system in your world, via eg "multishell" so that you could do other things as well.
Posted 02 September 2014 - 05:14 PM
Or if you ran LyqydNet with every computer set up as a router (why?!). Of course, the built-in repeat program is probably enough for most reasonable use cases.
Posted 03 September 2014 - 07:31 AM
It sounds like what you'd get if you ran "repeat" on every system in your world, via eg "multishell" so that you could do other things as well.
my idea is to run some code in the background that will basically connect every computer 'together' even if they're out of range.
So basically an ad-hoc system? Or am I mistaken?
you're not mistaken, basically what im trying to do is connect every computer on my server together without having to setup any main server or something alike.
Posted 05 September 2014 - 12:50 AM
would something like so work?
if peripheral.find("modem") then
parallel.waitForAny(
function()
shell.run("shell")
end,
function()
shell.run("repeat")
end )
end