crazybrumi
New Member
I am trying to build a twitter-like follow mechanism. User takes an action. We make a list of all that users' followers, and then populate all of their streams with some information. Since this can take some time (if you have 10,000 followers that's 10,000 streams to insert information in, ie. 10,000 SQL calls perhaps), I want to make sure that this is done in the background, while the user that takes the action can go on with his life.So, the strategy I'm considering is this:
- user takes action.
- php script opens another php script that will do all the work and that might take a second or two.
- meanwhile, the user that took the action can go on with their life, their script just goes on and it's fast.