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

[peripheral] Suggestion - Servers

Started by unstopablekk, 13 January 2013 - 04:58 PM
unstopablekk #1
Posted 13 January 2013 - 05:58 PM
Before you rant: Yes, Yes. I know there is a peripheral called ccMySQL by Espen (His profile here, ccMySQL here). But what about something more nub friendly? I know nothing about setting up a MySQL Database, nor do I want feel entitled to learning MySQL and getting one setup for the minor task I request.

What are you asking of?
I am asking of a simple addition to computercraft (not implemented in the actual modification itself) where I can connect computers to this small server, all in-game, and have a main terminal connect to the servers.

Example: Here I have a picture of a mock database center that does absolutely nothing but give the room appeal. I would like to have a new block, as some may call it, and have it connect to a computer using rednet or using Xfel's Peripheral Cables to send and receive data or lines of code/text.
Lets say that Advanced computer in the picture is the main terminal and it would use rednet to add text to the servers. Servers can be setup in a line and connected via cable and given an ID such as computers. The main terminal (advanced computer) runs a program and connects to one which may(not) be connected to another server. The main Terminal (ComputerA) can be used to setup new "Profiles/accounts" for users. I would then use a command to receive/send the rednet message via rednet.send(ServerID,message).

Here's a video of the idea behind this suggestion.
As you can see in the video this is pretty much what I want to use these "servers" for. Also to create accounts via main terminal with a friendly UI such as this and this2 with this2 image UI option 1 Create Username & Pass account, Option 2 Create Password/phrase (each creates new file inbedded into the servers. In which you can receive via computer via rednet)
At 3:40 of the video you can see the code. This will be what it looks like, it would just insert the data of what you'd like without the typing of the code. These can be considered presets which is what the options are, presets.

Other things to add/suggestions:
rednet.serverconnect(etc, etc) | idk something like that.
rednet.servergetpass(filename) | Gets the pass allowing the program to match the users os.read() with the pass made from the file created.
Turn servers on and off using main terminal if connected via Xfel's Peripheral Cables. Ex: Server.power(ServerID,On/Off)
if >1 Computers connect to main terminal then < 1 must use Cables to connect to main terminal or other servers.
Servers can connect to other servers via cable.
Servers can interact with other servers via cable.

Feel free to question and comment with additional suggestions about this suggestion below.
Dlcruz129 #2
Posted 13 January 2013 - 06:07 PM
Program it yourself. Computercraft gives you the tools to make something great; it does not make it for you. This could easily be done over rednet.

Edit: And if you want SQL support just use a PHP script.
theoriginalbit #3
Posted 13 January 2013 - 06:12 PM
Edit: And if you want SQL support just use a PHP script.
Or asp or jsp
unstopablekk #4
Posted 13 January 2013 - 06:13 PM
Like I said, Im a noob. I don't know how to script it all myself. This is just a suggestion for anyone who'd like to take up the project. I'm not forcing anyone to take this burden upon them but just to consider it if they have a good sense of scripting.
Tiin57 #5
Posted 14 January 2013 - 02:25 AM
Like I said, Im a noob. I don't know how to script it all myself. This is just a suggestion for anyone who'd like to take up the project. I'm not forcing anyone to take this burden upon them but just to consider it if they have a good sense of scripting.
Then put it in General if it's a request (which will most likely not be fulfilled, considering that we are not code monkeys, good idea though it is); the Suggestions forum is for additions to the mod which can only be implemented by the CC devs and which make sense to be implemented.
zekesonxx #6
Posted 14 January 2013 - 08:07 AM
Go program it yourself.

We aren't your little coder monkeys.
Orwell #7
Posted 14 January 2013 - 01:00 PM
Go program it yourself.

We aren't your little coder monkeys.
No need to be a dick about it.. He got the message already.

I think that this is something that should be done in Lua. It's 100% possible. Peripherals are rather there to extend the functionality of Lua. So, I'm not sure if you think you can do it yourself.. But if you'd ask anything, I would ask for a Lua program that does this. (Reminder, these forums are aimed at helping people learn Lua, asking for programs isn't a popular act around here :P/> )
unstopablekk #8
Posted 14 January 2013 - 06:46 PM
@Orwell
Thanks for an apporpriate and respectful response.
I've decided to just change the textures of the original computer and give it a server tower look.
I have already started on the programming portion and if I need any help i'll be sure to ask the pro's.
And sorry, I didn't know that asking for a program would generate such aggressive responses, lol.
A video and file should be up on the forums withing the next few days if i'm not too busy, for anyone that cares.