Resource Intensive PHP Tasks part 4

Since telling is nothing without the showing. We have a very simple implementation of the above work.

The resource being created is a text document with time set every ten second apart for an iteration of ten.

Now this is a trivial application but should be able to show what we need. You can get a copy of the source files from github https://github.com/prodeveloper/long_running_script

Without further a do here are the files.

For this particular implementation I have chosen to choose one file for progress and one for storage, they are imaginatively named store.txt and progress.txt. For the application to work this files must be readable and writable to apache.

For your own application you definitely want to use a better database not to mention provide a way of identifying the different workers.

Next time we will talk about libraries and tools that can help you in your development process.

Remember to follow me on twitter/ subscribe to my feed.

Till next time happy coding!!

by Jacob Chencha

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Published by

jchencha

API Engineer