Where to run complex algorithms? Sever side or Client side?
|Added at||2017-01-03 10:01|
I am trying to develop an social networking android application which contains huge database of users. I am very new to Android App development and trying to understand the concepts behind the app development. I am using following technology :
1) MYSQL + PHP (RESTful Web Services) 2) Android Studio (Java)
In the application, I have to run some complex algorithms for ranking users collecting data from different tables from database stored in cloud server.
My question is "where to run this algorithms?". Should I write code in PHP to make the algorithms run in server side and then send this data to client (or) Should I write the code in JAVA (Android Studio) using data collected from server.
How will the performance of my app differs in both cases?
Edit : Thanks for all your responses.
I have idea on Async Tasks and Multi Threading.
This doubt came to me as ranking is common for all my users, there is a difference. If I put raking algorithm in server side, even though the results are same for all users, the same algorithm has to run for several times (say if there are 10000 users, the same algorithm runs for 10000 times on server side). But if I do put in client side, I may over come this. But need expert solution on this.