danbopes Posted September 13, 2011 Share Posted September 13, 2011 I have a client and a server solution setup at the moment. We are currently creating an API that will be run on the clients end that will allow their clients to connect to them. On our end, we want to log the number of attempts are API is being used so that we may charge the clients appropriately. My question is this. How is the most efficient way of doing this? Do I call mysql_connect from the client and just shoot the insert log statements across the web. Should I create a php script on our end that looks for post/get input and takes the data and inserts it? What if the client can't connect to our server; should I cache the data and send it off all at once? Should I create a job that every hour shoots up x records API requests happened? Relatively confused at what angle I should be taking when approaching this. I want this to be scalable to a point where we can have thousands of requests an hour, and not horribly slow down apache/mysql running at either end (Specially if the server is talking with several clients). Quote Link to comment https://forums.phpfreaks.com/topic/247051-question-regarding-clientserver/ Share on other sites More sharing options...
dreamwest Posted September 13, 2011 Share Posted September 13, 2011 give them a key when they start using the API. If you want scalabilty store the data in cassandra then use the php thrift to simply update and retrieve the data cassandra rocks! Quote Link to comment https://forums.phpfreaks.com/topic/247051-question-regarding-clientserver/#findComment-1268743 Share on other sites More sharing options...
danbopes Posted September 13, 2011 Author Share Posted September 13, 2011 I'm looking through, and it seems very promising. The question I have, is if the clients internet is down, and they are unable to connect to the "server", is it possible to have it cache the data and upload it in blocks? Quote Link to comment https://forums.phpfreaks.com/topic/247051-question-regarding-clientserver/#findComment-1268765 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.