I'm developing a game based on Html5, JavaScript (jQuery) and ajax with the use of PHP as Server Side. Now what is in the game is, there is a different types of jobs that you can assign to you players as per Job time duration. Suppose I have assign one jobJOB1
to one playerPLAYER1
with the duration of 10 minutes and other job JOB2
to other player PLAYER2
with the duration of 30 minuted. Means,
PLAYER1 = JOB1(10MINS)
PLAYER2 = JOB2(30MINS)
Now I want to create multithreading in PHP to handle this two jobs parallel and get the request to client side after every minute complete of that job.
I know that there are various ways to create multithreading in PHP and I can send the request to PHP server to create the thread when job is started with the use of ajax, but how can I get the data back to the client side and display the data after every minute?
It is possible or not? What are other options to do the same thing?