0

I want to build a server/client application, where a smartphone streams real-time data from the device to a stationary computer. They are connected directly via WiFi.

The streamed data shall include

  • audio data (at least 44.1 kHz, 16 Bit)
  • video data (no high quality is required, e.g. 640 x 320 pixels or similar), and
  • from different sensors (e.g. accelerometer, GPS, gyroscope, etc.)

As you may notice, all data source are very different in sampling rate (44.1 kHz for audio vs. 100 Hz for accelerometer vs. variable for GPS (event-based)) and amount of data (video with lots of data vs. GPS with only some bytes).

Is it better (in terms of real-time performance and delay) to tunnel the data through one TCP connection, or to use for each data type an own TCP connection? Is it worth to got with UDP?

closed as off-topic by Ron Maupin, Craig Constantine Sep 28 '15 at 15:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "NE is a site for to ask and provide answers about professionally managed networks in a business environment. Your question falls outside the areas our community decided are on topic. Please visit the help center for more details. If you disagree with this closure, please ask on Network Engineering Meta." – Ron Maupin, Craig Constantine
If this question can be reworded to fit the rules in the help center, please edit the question.

  • You should take this question to Stack Overflow, the programming forum. There are many network-savvy programmers there. Programming is off-topic for this forum. – Ron Maupin Sep 28 '15 at 12:31
1

first of all, for real time applications (audio , video ..etc) you must use UDP not TCP (where TCP is connection oriented ) .

second,the only thing you should care about if you run such applications is the throughput and if WIFI connection could handle this through put or not ??? , your audio and video rates as you listed will never exceed the throughput of the WIFI where b/g stander are 54 MBPS and a stander is 150 MBPS

third, regarding run single connection or multi connection , i guess you should run each type of application on single connection , network wise it is better from the side of apply quality of service and traffic control.

  • Why must I use UDP? – Michael Dorner Sep 28 '15 at 12:43
  • let me explain in simple way , TCP as a connection oriented transmission protocol will divide each flow of traffic to divisions (messages) then send each individual message and make sure of it is delivered correctly by using hand check mechanism which take time (delay and latency ) to reform those message again to the original one . TCP is very good in the big data transfer like (browsing, mails ..etc ) , unlike the nature of real time traffic which is in form of short messages must be delivered and reach their destination within few milliseconds – Gadeliow Sep 28 '15 at 13:11
  • Maybe I am wrong, but I implemented a small test setup in Python, where TCP is way faster than UDP (see stackoverflow.com/questions/32654551/… ). And it is not (only) about throughput, but especially about latency. – Michael Dorner Sep 28 '15 at 14:02
  • it may be small data and may be transmission with no error . but at all UDP is more applicable for the real time transmission – Gadeliow Sep 28 '15 at 14:22
  • But if there are no errors and the data was small but same for UDP and TCP, then we should have similar results, shouldn't we? – Michael Dorner Sep 28 '15 at 14:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.