This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
loading programs to multiple computers from one disk drive
Started by Caleb Ragnarok, 20 September 2015 - 03:59 PMPosted 20 September 2015 - 05:59 PM
I want to store all my programs for a building on one disk drive and share that drive to all the computers on the network. Is this possible and how?
Posted 20 September 2015 - 07:57 PM
This is easily possible providing you don't need more than 256 pieces of network cable (I believe that's the limit). Beyond that it becomes a bit more difficult.
So long as you stay under the limit, you can do the following:
Simply place a modem (not wireless) on each computer and the disk drive and connect them all with network cable. Then turn on the modem on the disk drive (the computer modems don't need to be turned on). Each computer should have a "/disk" directory which is where the contents of the disk drive will be accessed. If there is a file named startup on the disk, every computer will try to run that when they boot.
If you connect more than one disk drive to the network, then you'll have a "disk", "disk2", "disk3", etc. directory on every computer - so it's best to keep it down to one disk drive to avoid confusion. This same issue can crop up on individual computers if you have an additional disk drive attached directly to a computer - it will have multiple, numbered "disk" directories.
So long as you stay under the limit, you can do the following:
Simply place a modem (not wireless) on each computer and the disk drive and connect them all with network cable. Then turn on the modem on the disk drive (the computer modems don't need to be turned on). Each computer should have a "/disk" directory which is where the contents of the disk drive will be accessed. If there is a file named startup on the disk, every computer will try to run that when they boot.
If you connect more than one disk drive to the network, then you'll have a "disk", "disk2", "disk3", etc. directory on every computer - so it's best to keep it down to one disk drive to avoid confusion. This same issue can crop up on individual computers if you have an additional disk drive attached directly to a computer - it will have multiple, numbered "disk" directories.
Posted 25 September 2015 - 05:57 AM
is there anyway I can do this with a wired and wireless network? Example..I need the computers in the engine room to access the disk drive on the bridge to get their programs. Can I wirelessly link the engine room network to the bridge network? like a lan bridge?
Posted 27 September 2015 - 11:31 PM
You could, though it would take some doing.
The disk drive could have a computer whose job is to send the program to any computers that request it
(Through a modem)
The computer(s) in the engine room would send a message requesting the program, and the disk drive computer would simply send the program back
(As a string)
This is a HUGE security flaw, but if you aren't worried about someone hacking your computers, you don't need to worry about it.
The disk drive could have a computer whose job is to send the program to any computers that request it
(Through a modem)
The computer(s) in the engine room would send a message requesting the program, and the disk drive computer would simply send the program back
(As a string)
This is a HUGE security flaw, but if you aren't worried about someone hacking your computers, you don't need to worry about it.
Posted 28 September 2015 - 02:41 AM
whats the big flaw? and how could I make a system like I want without the flaw?
Posted 28 September 2015 - 03:11 AM
The idea is that any wireless transmissions can be eavesdropped on, and it's likewise not easy to determine where they originated from.
Let's say you built a system which responded to requests for files. A system sends out a message asking for eg "myFile.lua", the server system gets the message, and sends the file back.
Catch is, any system within wireless range would also be able to see the request for the file, and would also be able to send a file back. If someone sets up a "fake" server, it becomes somewhat unpredictable as to which file the requesting system will actually get. If the computer is asking for a file which it intends to execute, then people could potentially exploit this to make your system run whatever they like, without gaining physical access to it.
The extent to which you'd need to go to prevent this mostly boils down to the the competency and motivations of the other players in your world. If you're in single-player mode, then obviously there are no other players to worry about. If you're only playing with people you trust, then it's likewise a non-issue.
But if you're playing with people you don't know/trust, and they're familiar enough with the above concepts to take advantage of them, then you might start to worry. Potential defenses are quite complex, unfortunately - you'd generally be using a key-based encryption system if you were to actually try one of them.
Of course, malicious players are just as likely to pickaxe through your physical defenses and reprogram your computers manually, so if you don't have to worry about people trying that, then you likewise probably don't have to worry about this.
Let's say you built a system which responded to requests for files. A system sends out a message asking for eg "myFile.lua", the server system gets the message, and sends the file back.
Catch is, any system within wireless range would also be able to see the request for the file, and would also be able to send a file back. If someone sets up a "fake" server, it becomes somewhat unpredictable as to which file the requesting system will actually get. If the computer is asking for a file which it intends to execute, then people could potentially exploit this to make your system run whatever they like, without gaining physical access to it.
The extent to which you'd need to go to prevent this mostly boils down to the the competency and motivations of the other players in your world. If you're in single-player mode, then obviously there are no other players to worry about. If you're only playing with people you trust, then it's likewise a non-issue.
But if you're playing with people you don't know/trust, and they're familiar enough with the above concepts to take advantage of them, then you might start to worry. Potential defenses are quite complex, unfortunately - you'd generally be using a key-based encryption system if you were to actually try one of them.
Of course, malicious players are just as likely to pickaxe through your physical defenses and reprogram your computers manually, so if you don't have to worry about people trying that, then you likewise probably don't have to worry about this.
Posted 28 September 2015 - 09:03 PM
Unpredictable? Server ticks!
Posted 28 September 2015 - 11:33 PM
Unpredictable? Server ticks!
So you are saying that it IS predictable which file will be received? That does make sense. In fact, it would be a little surprising if it wasn't always the same.
But how do you know which one will be received first? Does the server queue 'modem_messages' based on distance (closest computer first) ?
Maybe it starts at the smallest X and Z then works its way to the largest? Or is it by chunk?
Even if you know exactly how, you can't rely on that.
If you are worried about security (that is, other players hacking your computers), use encryption
Posted 28 September 2015 - 11:42 PM
Honestly I was explaining why it was unpredictable in the most worthless post ever.
I suspect (but do not know for sure) that the Java code would process each computer in order of ID (since that is in order of creation and each is asynchronous) but it is possibly (though unlikely) random.
Again I suspect IDs play a role, and of course which one is on and which one is actually running code.
I absolutely suck at cryptography and am ready to outsource it and make it configurable with custom APIs for every program I plan to release. I just don't get it for some reason.
I suspect (but do not know for sure) that the Java code would process each computer in order of ID (since that is in order of creation and each is asynchronous) but it is possibly (though unlikely) random.
Again I suspect IDs play a role, and of course which one is on and which one is actually running code.
I absolutely suck at cryptography and am ready to outsource it and make it configurable with custom APIs for every program I plan to release. I just don't get it for some reason.
Edited on 28 September 2015 - 09:43 PM