Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

We are developing a web application for mobile that gives live stock updates for the given scrips.

The clients who is going to use this application on mobile has 2G connections in India and that is the bottleneck of downloading data. It gives delay of 8 to 10 second to get updates of all 10 to 15 scrips.

We are looking for best optimized technique to get the live stock updates of each and every second. Please note that it is a pure browser based application.

MAKEUSEOF VIDEO OF THE DAY
SCROLL TO CONTINUE WITH CONTENT

Can you please help us on this topic?

Thank you

Harsh

Harshparekh
2011-09-29 14:03:00
First of all, apology for late reply and thx a lot for your valuable feedback.Actually we cracked it by getting compressed data using gzip technique on IIS and is working excellent.Now another major issue we are facing is the mobile browser compatibility with our application. We are using JavaScript with timer functionality that throws request every second to server to get the updated rates.  Many browser has JavaScript support but somehow it doesn't provide full support.  We chose web based to work smoothly to avoid mobile device compatibility but now the issues is with the web browsers. We are searching for better solution to get rid of this issue.  We'll appreciate your feedback incase anyone has better workaround.Thanks again guys- Harsh
Tina
2011-09-04 10:36:00
Harsh,I'm willing to feature your question as a toughest question, but not without seeing your feedback regarding the information and help Mike and Jeffery have already provided. So please let us know what you think...
Jeffery Fabish
2011-08-31 09:09:00
What programming language and databases will the application need to be developed in, Ajax and PHP with MySQL? There are already quite a few highly optimized open source API's. Assuming the website is quite popular, you could always index a previously displayed result for a user within an X time period, this will help in optimization. For example if user "A" visits, your server will display data for him. There is no reason to re-query the database for user "B", instead just index that result and wait to requery when the results may be different.You'll probably receive more help at a Freelancer website.
Mike
2011-08-31 08:45:00
I'm not a developer whatsoever but here is what I think:Instead of executing 10-15 scripts within the App/client on demand I would run them every xx seconds/minutes on a server, cache the results and use a single script to get the cached results to your App/client.You could either use something like a cron job or add a timestamp like test that determines the last update and if the cached data is too old do the refresh.Another benefit using a server side solution on your end is that in case you have to adapt the way stock data is fetched you don't have to push application/client updates to your
customers but can do the update on your own server.
Mike
2011-08-31 08:48:00
ps: I kind of ignored the fact that it's a web application on purpose. I think it's easier to understand by separating client from server even if both run on the same system.