Need a bit of input on designing a server side web app

Started by
3 comments, last by flyslasher 10 years, 7 months ago

So - I find myself "needing" to create a web app to keep track of my (and some friends) stats in League of Legends.

Researching a bit, I found that you can talk to the servers using RPC (really RTMPS) to get the information I want.

Basically, I am creating a web app that will let people pull their stats to a MySQL database. The code is PHP.

So, I now have a Java client that gets the data that I want, but - the response times are very slow on the queries so I am debating how to translate this to a PHP web app.

What happens is:

- log in to RPC

- send relevant queries

- wait for responses

Now, all my host gives me is the ability to run PHP and MySQL - So, if I were to put this code in a PHP page, that would become very slow and unresponsive.

It's not a huge problem as it will be people I know using it, but as a design exercise - How should I help mitigate this?

Should I use a HTML5/JavaScript client side that kicks off the PHP requests but "seem" responsive (not sure what the web page time outs are).

Should I put the RPC calls on the client side, and then just send the data to PHP?

Any thoughts?

cheers,

// Jens
Advertisement

You could make the php to run on the back end, and it can update the status of the mysql database with the current status of the retrieving the user's information:

  1. Logging Into Server...
  2. Send Queries...
  3. Waiting For Response...

Redirect user to a different page that has javascript and an ajax to call a PHP file that will show the current stage of the retrieval, and the final stats once retrieved. And simply put the ajax call on repeat( every 5 seconds or so )

Yea, that would be pretty - But I am not sure my provide will let me run the PHP persistant.

// Jens

Update, turns out my provider wont let me open a socket server side anyway ;)

So, what I'm thinking now is client side JavaScript to do the RPC calling and then just send the data up to the PHP for stuffing in the database...

// Jens

Well I think you can run php persistant with exec( "php script.php" ), but i'm no expert. And darn provider.

This topic is closed to new replies.

Advertisement