I've built my first web-based iPhone app and I have some performance issues that I needs to be resolved. I want to verify that I'm doing it right, so your feedback is really appreciated... :-)
The application presenting data - images & text directly from my remote MySQL DB using PHP based web-services.
I'm using the SDWebImage for lazy-downloading.
Now, I wonder if I'm doing everything right or is there something needs to be modified for better performance -
Each connection to the DB is handling via NSMutableURLRequest using POST method. It's running again if I receive time-out connection from the DB and displaying an alert-view if connection fails.
There is only one PHP web-service for every operation - I mean - if, for instance, I'm running the remote getInfo.php script for fetching information from my DB to be presented on info-view-controller, there is only one copy of this script on my web-site, so everyone's running their app and wants to fetch this kind of info from the DB will call the same file. Is it ok to do it like that? Does it have any impact on performance? Should I duplicate the web-service and create a basic round-robbin load-balancing between several copies?
My DB is physically stored on Asian data-center - I can transfer it to other place. In case my app has traffic from all over the world - would it be better to transfer the DB to European/US data-center? I can duplicate the DB between two sites but I don't think it's necessary and I believe single DB is sufficient.
Based on this information - when I'm testing my app, the response time is good most of the time, but from time to time I'm encountering with high latency/connection failure. Is there something else I need to take into account and add to my configuration?
I hope everything is clear...
Many thanks for your help.
Comments
Post a Comment