UDP request issue
UDP request issue
I'm working with SFS Java API, and are trying to use UDP protocol to speed up communications. In most cases, everything is OK, but sometimes problems arise: Can not send UDP requests to the server, while still sending TCP requests are normal (can still chat). This makes my program stopped, but users can still chat normal. Does anyone have experience in using the UDP protocol can help me?
Re: UDP request issue
UDP messages can fail to be received on the other hand, this is a characteristic of the protocol.
Can you describe your use case for UDP packets? How many pps (packets per second are you sending)? It seems mobile phones are not very happy to sustain too high packet rates. We have noticed this on iOS, I am not sure about Android.
Also did you check the server logs? Maybe there are related errors that might help to pin down the issue.
Thanks
Can you describe your use case for UDP packets? How many pps (packets per second are you sending)? It seems mobile phones are not very happy to sustain too high packet rates. We have noticed this on iOS, I am not sure about Android.
Also did you check the server logs? Maybe there are related errors that might help to pin down the issue.
Thanks
Re: UDP request issue
PPS in my program is 1 package/second (most UDP traffic is used to send ack packets).
Re: UDP request issue
I don't understand this very well. 1 packet/second doesn't require UDP. Why not using TCP?
Also UDP for ACKs? UDP packets can be lost, plus ACKowledging what? Again TCP does all of that for you and for free
Can you clarify?
Also UDP for ACKs? UDP packets can be lost, plus ACKowledging what? Again TCP does all of that for you and for free
Can you clarify?
Re: UDP request issue
My program should run well in these conditions large latency network (2G mobile networks). So I'm trying to reduce the latency of UDP communication, as far as I know TCP packets can be delayed because it had installed congestion control mechanism. And the use of ACK is to control UDP packet loss. I installed this protocol according to ideas from the article: http://gafferongames.com/networking-for ... w-control/
Re: UDP request issue
What you are saying about TCP is correct, but the anti-congestion mechanism serves a very important purpose which is not to saturate the bandwidth. In a very congested situation the likelihood that UDP packets will go through are very low and by shooting more packets could make things even worse.
UDP can be helpful when you are sending lots of positional updates very fast and you can compensate for what is lost. In other words it's a brute force approach that will saturate the network and will rely on compensation algorithms handled by your code.
In the scenario you are describing it doesn't sound like a good idea. Additionally UDP is not well support over 3G/2G networks which could cause more problems.
That's my 2c. In any case if you want to go ahead with UDP please send us more information about the issue.
1) Server version in use
2) Java API version
3) Client side stack trace of the error
4) Relevant exceptions from the server's error logs
UDP can be helpful when you are sending lots of positional updates very fast and you can compensate for what is lost. In other words it's a brute force approach that will saturate the network and will rely on compensation algorithms handled by your code.
In the scenario you are describing it doesn't sound like a good idea. Additionally UDP is not well support over 3G/2G networks which could cause more problems.
That's my 2c. In any case if you want to go ahead with UDP please send us more information about the issue.
1) Server version in use
2) Java API version
3) Client side stack trace of the error
4) Relevant exceptions from the server's error logs
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 22 guests