Posted 07 December 2012 - 09:52 PM
Greetings!
New to the forums, been playing with CC for about a month (loving the mod). I've been a professional programmer for 1.5 years and studying CS at a university for over 5 - so coding is nothing new to me. Feel free to use "big words" in your replies - I know what I'm doing (most of the time).
I am working on a distributed system involving dozens, up to maybe a hundred cooperating turtles. (I'm only going to say, a replacement for Logistic Pipes for SMP. If it ever approaches anything close to useable, I might post it here.) Currently, every turtle in the system carries several (currently 5-6) programs that the system uses. For a while now I have been wondering about how to handle system updates. While I'm testing things in SSP I got used to simply putting all of the files in the /rom/ folder, which is obviously impossible on SMP. And running around derping with a disk drive doesn't sound like my idea of fun.
I know of the pastebin program, and HTTP is enabled on my server, so I can use it. The system has one "Terminal" node which a user uses to interact with the system. From a user standpoint, I would love updating everything (every turtle in the system) to be as simple as typing an update command into the terminal. I already have the architecture to send this command to every node in the system.
However the problem is, every time I change the contents of a pastebin file, its address changes. So I can't just keep a hardcoded list of addresses for all the necessary files. I don't think there is any way to derive the "new" link from the "old" link (other than well parsing the pastebin webpage, which seems a bit overkill). Unless there is some undocumented feature of the pastebin program that I don't know about. The best I've come to so far is this:
I would like to know if there is some kind of a "standard" way to deal with this issue. If your software consists of multiple programs, or is spread across multiple devices, how do you keep them all up to date? I have looked through the first few pages of all the forums, but I haven't found a good answer yet.
New to the forums, been playing with CC for about a month (loving the mod). I've been a professional programmer for 1.5 years and studying CS at a university for over 5 - so coding is nothing new to me. Feel free to use "big words" in your replies - I know what I'm doing (most of the time).
I am working on a distributed system involving dozens, up to maybe a hundred cooperating turtles. (I'm only going to say, a replacement for Logistic Pipes for SMP. If it ever approaches anything close to useable, I might post it here.) Currently, every turtle in the system carries several (currently 5-6) programs that the system uses. For a while now I have been wondering about how to handle system updates. While I'm testing things in SSP I got used to simply putting all of the files in the /rom/ folder, which is obviously impossible on SMP. And running around derping with a disk drive doesn't sound like my idea of fun.
I know of the pastebin program, and HTTP is enabled on my server, so I can use it. The system has one "Terminal" node which a user uses to interact with the system. From a user standpoint, I would love updating everything (every turtle in the system) to be as simple as typing an update command into the terminal. I already have the architecture to send this command to every node in the system.
However the problem is, every time I change the contents of a pastebin file, its address changes. So I can't just keep a hardcoded list of addresses for all the necessary files. I don't think there is any way to derive the "new" link from the "old" link (other than well parsing the pastebin webpage, which seems a bit overkill). Unless there is some undocumented feature of the pastebin program that I don't know about. The best I've come to so far is this:
- Maintain each file in pastebin (obviously).
- Additionally, maintain one more "master" pastebin file which contains the mapping filename -> pastebin address for all up-to-date files.
- To update, a user would have to input the address of the master file. This would get sent through the system.
- Every node downloads the master file, and then reads it to find out the addresses of all the other actual files.
I would like to know if there is some kind of a "standard" way to deal with this issue. If your software consists of multiple programs, or is spread across multiple devices, how do you keep them all up to date? I have looked through the first few pages of all the forums, but I haven't found a good answer yet.