Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Networking Limits
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hamid14




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: 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?..
DemonWasp




PostPosted: 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.
mirhagk




PostPosted: 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.
DemonWasp




PostPosted: 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.
mirhagk




PostPosted: 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.
DemonWasp




PostPosted: 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).
hamid14




PostPosted: Tue Mar 08, 2011 3:57 pm   Post subject: Re: Turing Networking Limits

Thanks for the replies, that's all I needed to know.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: