I’m trying to learn more about asynchronous PHP programming. The nextcloud updater is a good example of what I’m trying to achieve in my own projects. In particular, I like the way it’s able to complete a number of complex steps in the background one at a time and provide status and feedback through the web interface.
I can’t seem to find the source in GitHub, so I’m assuming it’s “compiled” in some way from other components.
Is this home grown tech, or are some frameworks or libraries involved?
Is there a name for this kind of development? ie: what else should I Google
So what you are really looking for is the concept of IPC, which is for Inter-Process Communication. Basically, you have two or more processes. One is a data producer (in this case, the process that is performing the actual update functionality), which generates information and sends it out via some IPC mechanism. The rest of the processes are consumers, which hook into the IPC mechanism in order to receive and use/display the information.
IPC can be done by all kinds of things, like sysvipc, pipes, database, nosql (like redis), etc.
So you get that? One script runs the update, which writes status updates out to IPC. One reads from the IPC and does something with the data.
Have fun, but don’t think that there is something special or magical about what Nextcloud is doing here.