I would like to create for myself a base core (or package) for handling interactions between the server side and client side. My approach is this:
- Set the time interval to every two seconds (arbitrarily picked)
- Create a script on the PHP side. This script will allow other PHP scripts to add functions to call (or remove them) to collect information that will be sent to the client.
- Every 2 seconds, the client will call this PHP script to request the information.
- When this occurs, the PHP script will call all added functions, store their data, and send all data back to the client.
- The client will handle this data appropriately
I am not sure if this actually describes an implementation of the Push-Pull model, or of a similar, but different, model. I imagine the "pushes" from the client to the server side would not need to be synchronized into this two second window.
The ultimate goal in all of this is for me to create a method in which the client side can remain up to date when displaying information that is likely to change while the browser window is open.
I would like to ask if this is a correct interpretation of the push pull model, if this is a suitable way to accomplish this goal, and if there is possibly a more suited paradigm for this goal.