11-30-2009 06:16 AM
I am asking this particular question for an audio streaming app which I am working on.
I am making a http request to a server which contains an audio file of around 5mb. So it takes a considerable amount of time to return a response. And as I request bigger files the response time gets on increasing.
So basically I am getting a very delayed start. There is no problem in buffering and playing the file.
If mds does have a cache, any idea what can I do to get a better response time?
Solved! Go to Solution.
11-30-2009 06:30 AM
1. The BlackBerry first downloads the whole 5MB of the response, and then lets your application read it as a stream.
2. The MDS first downloads the whole 5MB of the response, and then streams it to your BlackBerry. Compared to case #1 above, you should be able to read your stream a bit earlier, unless it's the MDS <-> web server connection that is the bottleneck.
11-30-2009 06:35 AM
Right now I m using the mds simulator to test. But it does take a time of around 2minutes to start downloading/buffering a file of 5mb or greater.
Can u clarify a bit more on this issue?
11-30-2009 06:38 AM
Not really. I can only suggest that you check whether the data is buffered somewhere. For example, you could avoid the device-side HTTP buffering (if it happens at all), by establishing a TCP connection (via the MDS) to your server, issuing the HTTP request via the TCP connections, and checking how quickly you start receiving the response (you don't have to actually parse it for this test).
11-30-2009 07:26 AM
Interesting. I suppose this really means that all 5MB of the response were buffered in the lower network layers on the BlackBerry before your application got any of the data...
11-30-2009 07:30 AM - edited 11-30-2009 07:30 AM
The data transfer keeps on happenin as the application progresses. But I dont have to wait longer for a http response:200.
Earlier it was like the bigger the file the longer the response and then the actual data transfer to my app started. But now the response time is normal like any other url i.e a few seconds.