Jump to content




Server Side (in-game Computer) File Access?

help wireless networking

6 replies to this topic

#1 boudragon

  • Members
  • 107 posts

Posted 15 October 2013 - 05:26 AM

Ok so after doing some research I decided I wanted my login and system manager to be set server-side while being able to be accessed via wireless modem by any computer that chooses to access it but I am having trouble figuring out the best way to do this since both the login and manager were originally built without networking in mind not to mention all options are menu based rather than simple text input from the user.

I managed to test on how to have one computer tell another to open a program which in turn displays some text or even a simple question but aside from that I am completely lost! Any help would be greatly appreciated! I will post my login program as an example to base your answers by. Please keep in mind that though the login DOES work it may be a little sloppy.

Spoiler

Thank you in advance!

::EDIT::

Just to clarify the files need to be on the server, run from the clients and displayed on the client side systems rather than the server.

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 15 October 2013 - 08:49 AM

So if I'm understanding correctly, you want to be able to login into another computer remotely, then have access to the file system on that server?

I would do this by extending the shell somewhat (or writing my own version, more likely, but that's probably making things harder then it has to be). It'd capture attempts to get directory listings on the client drive and "add in" folders from the server. Attempting to "cd" into these folders would prompt for login credentials, and attempting to access files in those folders would see them transferred to the client before execution/editing/whatever. All other commands would just be passed directly to the regular shell to handle.

Exactly how you'd handle the actual file/directory access depends on whether you're main goal is security or convenience - are you simply wanting to be able to access all your files from any of your terminals, or are you really wanting to lock things down so that only you can access all your files from any of your terminals? What sort of files - scripts, data files, or both? You'd also need to take into account whether or not you mind having the server's files stored (even if temporarily) on the client's drives, as the complexity would greatly increase if that were taboo.

#3 boudragon

  • Members
  • 107 posts

Posted 15 October 2013 - 06:12 PM

Basically remote access. I want to be able to login via a terminal say 500 blocks away from my Nuclear Reactor where the server (system manager) for said reactor resides. In which case I could turn them on or off etc. This would also be use to manage messages sent and received from other users who have appropriate access. Having the files temp. to the client side isn't that big of a deal since the system will be fairly secured.

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 15 October 2013 - 06:46 PM

Depending on the distances involved, you may need to configure a number of relay servers - wireless modems have limited range, and creating a 500 block long cable sounds more trouble then it's worth.

For starters, I recommend plonking down three or four computers. Write a program that allows each to detect the presense of the others - have it send a broadcast of its label on boot, then sit and wait for transmissions.

If a computer receives such a broadcast, have it add the label and ID of the computer that sent it to a table, then send a message containing that table to every computer in the table.

In this way, every computer that runs this script will detect other computers in their range, and notify those computers of what other computers they can reach. Have each computer print status updates etc as they discover new systems, and once you're happy you've got that working, you'd then want to start incorporating methods of distinguishing servers from clients and passing messages between clients through the server chain.

#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 15 October 2013 - 06:47 PM

Well, for the actual remote access part, you could try using something like nsh. To make your program compatible, you'd want a backend that does all of the actual control and a frontend program that could be started for each computer that connects to the server. The frontend programs would change global variables or the contents of files, which the backend program would use the values/contents of to control the system however you command it to.

#6 boudragon

  • Members
  • 107 posts

Posted 15 October 2013 - 06:58 PM

As far as distance thats not an issue. Most likely can use a world anchor or something similar to keep the chunk loaded. The furthest I have gotten was getting one computer to tell another to run a program and then to relay a line of text back to the original computer which was coded into the program that was run on the 2nd system. Reason why I came here after getting that to work is it seems like that would require a TON of editing my original code. If that's the cause at this point it almost seems like a total rewrite would be easier.

View PostLyqyd, on 15 October 2013 - 06:47 PM, said:

Well, for the actual remote access part, you could try using something like nsh. To make your program compatible, you'd want a backend that does all of the actual control and a frontend program that could be started for each computer that connects to the server. The frontend programs would change global variables or the contents of files, which the backend program would use the values/contents of to control the system however you command it to.

I will DEF. look into that when I have a bit more time. And how did I know this post might grab your attention? :-p

#7 boudragon

  • Members
  • 107 posts

Posted 16 October 2013 - 05:15 AM

Ok so I looked at your NSH and it looks promising! However I have no idea how I'd tie that into my software... still quite the noob! :-p Anyways... would it require much editing of mine (or your) code? Or does it work on the same principle of extending your computer display to another monitor?

::EDIT::

Ok so after fooling around with it for about 5 minutes I am VERY impressed with this! I think this is exactly what I need! I will let you know with further testing! If it works how I need it to I will be sure to give credit where it's due my friend thank you!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users