Computer Science Canada Turing Networking Limits |
Author: | hamid14 [ Mon Mar 07, 2011 9:48 pm ] |
Post subject: | Turing Networking Limits |
Does anyone know what the maximum network capabilities of Turing are? I'm wondering how fast it can send and receive data, especially when using graphics. If it does lag, there has to be a way to optimize the program to make it run faster somehow? |
Author: | TokenHerbz [ Mon Mar 07, 2011 10:53 pm ] |
Post subject: | RE:Turing Networking Limits |
you could be hopeful but truth is, it runs okay with a few people chatting. it has the ability to send things threw the net. graphics would be at each end being changed by the data being sent, depending on how much is sent/needed, there could be minimal lag to a lot. Turings networking isn't all that great, but just for the purpose of learning i think its worth a shot.. What exactly did you have in mind?.. |
Author: | DemonWasp [ Tue Mar 08, 2011 2:15 am ] |
Post subject: | RE:Turing Networking Limits |
In my experience, Turing's Net module is a clumsy afterthought. It lacks the ability to do anything of particular value. In particular, a lot of important things -- like flushing a single stream -- are impossible. Worse, if your program can't be synchronous with the network, you're up the proverbial creek, because Turing can't handle multiple threads in any meaningful way. While it is often possible to speed up a slow Turing program by applying common sense, there are no profiling or analysis tools available to see where you've gone wrong. If you are bulk-transferring data, you would honestly probably (almost certainly, actually) be better off doing this with a bash script than Turing. Any other language will be faster, generally by several orders of magnitude. If you're writing a chat program, you might be alright. If you're writing a multiplayer real-time game, you're probably all different kinds of hosed -- on networking performance, draw performance, and general computation performance. If it doesn't need to be real-time, you might have a chance. If you do it exactly right, you might be able to get something working in Turing. Or, you could spend a few days learning any other language under the Sun, and have a much better chance of making a working program. |
Author: | mirhagk [ Tue Mar 08, 2011 9:36 am ] |
Post subject: | RE:Turing Networking Limits |
A real time game could work, you just need to compress data right. Like don't use strings, too many people send across "100:103:23" (health, x, y position) when a single character would suffice for each of those values (maybe two for x and y position). The biggest limitation is it's LAN only, but that means lag isn't as big a factor. If you progam it right, and don't care about updating more than like five times a second then your probably okay. |
Author: | DemonWasp [ Tue Mar 08, 2011 10:30 am ] |
Post subject: | RE:Turing Networking Limits |
mirhagk: It's not LAN-only. Local network setup may prevent it from working correctly across wider-area networks, but Turing's Net package should work just fine across the Internet. |
Author: | mirhagk [ Tue Mar 08, 2011 2:20 pm ] |
Post subject: | RE:Turing Networking Limits |
Really? I could never get it to work. It tells you the local IP, so you'd need some way to get it to tell you the ip of your router or w/e. I guess it could work if you modified your router settings to forward packets to your computer on certain ports. |
Author: | DemonWasp [ Tue Mar 08, 2011 3:32 pm ] |
Post subject: | RE:Turing Networking Limits |
Typically, you either need to manually set up port forwarding or "virtual hosts" on your router, or else have it done automagically with UPnP (which is ridiculously complex). You can verify that the Net package works by using it to connect to google.com or whatever; there was a thread about email through Turing recently that did this. However, to receive connections on a local network, you'll have to handle whatever NAT devices stand between your sender and receiver (generally, the router in your house is the only one worth mentioning). |
Author: | hamid14 [ Tue Mar 08, 2011 3:57 pm ] |
Post subject: | Re: Turing Networking Limits |
Thanks for the replies, that's all I needed to know. |