Multiple Clients in App

0 Nolan John · August 18, 2015
So i Created Android App that allows Client to go on server,execute php scripts,and fetch some data from MySql database.

But problem is that,it can happen that 2 or more Clients can execute at the same time,the same php scripts,and fetch same data  from MySql database..Of course it will be big problem...

So does anyone have some suggestion,idea or how to create something(some script or java file) on server side that will allow or share permissions to users when they can or can't execute php scripts?


Post a Reply

Replies

Oldest  Newest  Rating
0 Dol Lod · August 19, 2015
I don't understand. What exactly do you want help with?

At first I thought was about how to avoid race conditions on data. Then I read further and just got confused.
0 Nolan John · August 19, 2015
In principle , yes .
I want to avoid and make sure that two clients can't at the same time make the same query for same data in database.
0 Durant ShaoQiang · August 19, 2015
 you should learn some knowledge of synchronized or  google some key words like ReadWriteLock etc
0 Dol Lod · August 20, 2015
Agreed. Look into atomic and concurrent classes to simulate locking. Just make sure you have some "master" to ensure everything is happening atomically.
  • 1

Java / Android Development

107,224 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator