I plan to run a webserver with some content generated through a Python script. I have a script that generates the data I would want to present at the moment that polls every 2 minutes with a fairly large request. How can I put this data onto a webpage without making voluminous numbers of requests? I can think of a few stupid methods including writing all of my data to text files to be read by some JavaScript, but I’m looking for a better solution. Thank you.
Share
I wouldn’t write off the javascript polling idea.
Consider generating the file and pushing to a CDN. Make sure to let the CDN know you need a specific TTL that meets with the schedule you’re generating with as their default TTL will probably be longer than 2 min. The CDN should be awesome at serving static content and dealing with a ton of requests. It should scale well.
I was just at a conference last week where the guys from Push.IO recommend this strategy for clients to appear to receive live sporting updates during a game.