I'm developing a web app using Symfony 2.8. I need to use the Pingdom API to obtain information about certain websites which are being monitored by Pingdom.
I was able to do a request to obtain the checks of a certain website, using the app key, etc, but I need to create a real-time application, that is, my web app should constantly do requests using the API to obtain new values for these checks.
I've been thinking at which technologies should suit better for this purpose, but honestly, after some research, I still don't know what to use.
I've thought I could use websockets directly, but, as far as I've understood, websockets "listen" to events, and in this case there's no event (right?), i.e. this should be a "polling system".
I've looked at pusher, but this only seems to be a wrapper around websockets.
Note:
I'm aware of the webhooks of Pingdom, but to use them they need to know my IP address (as far as I've understood how a webhook works), but of course I also want to work locally, and thus a "polling" system instead of a "pushing system" is the way to go.
I've already a controller that does the requests to the API, and the only thing I should probably do is do requests to this controller (from the client-side...), but I'm not sure since I've never done this.
Please, only people that have experience with the subject, i.e. with using APIs and in creating this kind of real-time apps where APIs of third-party providers are provider.
I'm aware of that fact I could use like a
setTimeout
and do aXmlHttpRequest
to my controller, but, again, I really don't know if this is the "standard" way of doing it.I would prefer proper tools, instead of the raw ones, but just in case the first ones are well-maintained and work well.
The method doesn't have to be restricted to this particular situation, indeed this actually should be a method whenever there's the need for making repeated requests using any API.
I know this is a long question, which actually could be summarised almost in one line, but I really wanted to point out my situation, and my requirements, lets say.