Well-known Channels
sens 25 Oct 2013
Even though there are so many pages on the Wiki that are out-of-date or in a state of disrepair (it clearly needs more editors ), I'd like to suggest a new page: "Well-known Channels".
In the real world, there is a list of "well-known" TCP ports that are commonly in use by network services (such as Telnet=23 and FTP=21). It allows developers to know which ports to consider off-limits when they assign ports for a new service. So now that we have modem channels in ComputerCraft, I think we should begin to keep track of what programs use what channels, to reduce the chance of crosstalk/glitches when many programs are run on the same network. It looks like many of the programs here ignore packets that don't match their expected pattern - which is good - but now that we're not locked into the Rednet API anymore, it also makes sense for services to run on different channels. Thoughts?
In the real world, there is a list of "well-known" TCP ports that are commonly in use by network services (such as Telnet=23 and FTP=21). It allows developers to know which ports to consider off-limits when they assign ports for a new service. So now that we have modem channels in ComputerCraft, I think we should begin to keep track of what programs use what channels, to reduce the chance of crosstalk/glitches when many programs are run on the same network. It looks like many of the programs here ignore packets that don't match their expected pattern - which is good - but now that we're not locked into the Rednet API anymore, it also makes sense for services to run on different channels. Thoughts?
Lyqyd 25 Oct 2013
This has been brought up before. It's pretty much completely unnecessary. Pick a channel, protect your communications against other communications on the same channel. Remember that the rednet API is still in common usage (for good reason!) and that servers will regularly get computer IDs above one thousand. There's no need to attempt to create an inevitably badly maintained and inaccurate list of channels that a subset of the community programs use.
Engineer 25 Oct 2013
I think this is a good idea, but with a filter that gives another problem.
If a program is good, and gets used very much then there should be allowed to get it's own rednet channel. That's the filter, the problem is: how do you know if a program gets used very much?
However, with or without filter I do agree that this unnecessary. Just confirm with your 'companion' and send the stuff you want to send.
If a program is good, and gets used very much then there should be allowed to get it's own rednet channel. That's the filter, the problem is: how do you know if a program gets used very much?
However, with or without filter I do agree that this unnecessary. Just confirm with your 'companion' and send the stuff you want to send.
theoriginalbit 25 Oct 2013
I don't think this is needed at all. Like Lyqyd said, if your program is dealt to only handle your messages then there is no need for "registered channels" if you want to avoid the GPS channel or the rednet broadcast channel then just make sure its not rednet.CHANNEL_BROADCAST or gps.CHANNEL_GPS.
Also, I'm waiting for a server to get to the point of having so many computers that the rednet api errors saying that the channel is out of range
Also, I'm waiting for a server to get to the point of having so many computers that the rednet api errors saying that the channel is out of range
sens 26 Oct 2013
Lyqyd, on 25 October 2013 - 08:04 PM, said:
Remember that the rednet API is still in common usage (for good reason!) and that servers will regularly get computer IDs above one thousand.
theoriginalbit, on 25 October 2013 - 09:24 PM, said:
...if you want to avoid the GPS channel or the rednet broadcast channel then just make sure its not rednet.CHANNEL_BROADCAST or gps.CHANNEL_GPS.
theoriginalbit 26 Oct 2013
sens, on 26 October 2013 - 04:01 AM, said:
But that's exactly my point. Why avoid the GPS channel but not avoid the Turtle Swarm Miner channel, the Battleship channel, the Print3D channel. There are 65000+ channels - I say, leave the first 5000 unassigned for Rednet, and let developers stake out some of the remaining 60000 if they choose.
sens 26 Oct 2013
theoriginalbit, on 26 October 2013 - 04:15 AM, said:
whats to stop people from using any channel they want
theoriginalbit, on 26 October 2013 - 04:15 AM, said:
... and/or have the user running my program select the channel. Does that mean I have to reduce UX to make a hard coded channel which could run a higher risk of collisions?!
Lyqyd 26 Oct 2013
sens, on 26 October 2013 - 04:01 AM, said:
Lyqyd, on 25 October 2013 - 08:04 PM, said:
Remember that the rednet API is still in common usage (for good reason!) and that servers will regularly get computer IDs above one thousand.
That would be because it is tremendously useful. If your program is a general information server, yeah, you might want to use a specific channel, like GPS does. If you want point-to-point communication between two specific computers, it makes a lot of sense to use rednet, since that's what it is designed for. It provides a useful abstraction to simplify point-to-point communications, as well as providing a common interface that could be overridden by code that adds routing, so that point-to-point communication could be transported seamlessly across multiple hops to the destination. The shunning of rednet as "not advanced enough" is idiotic and a step in the wrong direction.
The list would be useless. The list would not ever be complete or properly maintained and there's no reason to even really care about conflicts. If your software can't handle malformed packets, that's really just too bad. Pick a port number you like or use rednet, either one.
sens 26 Oct 2013
Lyqyd, on 26 October 2013 - 03:16 PM, said:
It provides a useful abstraction to simplify point-to-point communications, as well as providing a common interface that could be overridden by code that adds routing, so that point-to-point communication could be transported seamlessly across multiple hops to the destination.
Lyqyd, on 26 October 2013 - 03:16 PM, said:
The shunning of rednet as "not advanced enough" is idiotic and a step in the wrong direction.
surferpup 29 Jan 2014
sens, on 26 October 2013 - 03:42 PM, said:
I don't see it as any more or less advanced as using the modem peripheral directly, as it's simply a wrapper.
I think that is exactly the point. It is a lower-level protocol.If you want to avoid collisions and stake out your own space, write your code in such away that it only responds to your communications, not to any rogue communications on the same channel. Minecraft (and ComputerCraft) are not intended to operate on enterprise-class security and networking principles. It may be fun to add features which approximate this (for coolness, education or whatnot), but it is not essential to the game.
robhol 30 Jan 2014
The idea is sound, but it's gonna fail in practice. Most coders don't exactly spend a lot of time researching best practices, or worrying about interop issues. The few people who would bother checking such a list (let alone keeping it updated) would be quite unlikely to bump into eachother along 65536 channels anyway.
Edited by robhol, 30 January 2014 - 03:45 AM.
Edited by robhol, 30 January 2014 - 03:45 AM.