Great solution ! Thanks for taking the time to share it :D Don't worry about necroing the thread, it's great to get several different perspectives, as I know a similar job will come around again when we can travel more freely!
How would you trigger the "Big Screen" image check? CRON? OR just "listen" for an image upload?
If I'm limited to just HTTP (so no websockets, server push schemes, or custom protocols) then I would just have the "Big Screen" regularly poll (aka cron) for a new image (maybe 10 seconds?).
If we can use websockets or similar, then that opens the door for fun things of the server notifying screens that new images are available (but then the screen would still make the "request" to get that new image so that it always goes through the same consistent process)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry to necro; but I couldn't resist throwing my 2 cents at it!
I would add a table to track the "big screen" 's current image (a row for each "big screen", with a foreign key to the images table you have above):
Then there's just a few operations to implement:
CurrentImageID
is less than the largest ID in the Images tableCurrentImageID
points to, and incrementCurrentImageID
to the next oneCurrentImageID
CurrentImageID
to the most recent image.Great solution ! Thanks for taking the time to share it :D Don't worry about necroing the thread, it's great to get several different perspectives, as I know a similar job will come around again when we can travel more freely!
How would you trigger the "Big Screen" image check? CRON? OR just "listen" for an image upload?
If I'm limited to just HTTP (so no websockets, server push schemes, or custom protocols) then I would just have the "Big Screen" regularly poll (aka cron) for a new image (maybe 10 seconds?).
If we can use websockets or similar, then that opens the door for fun things of the server notifying screens that new images are available (but then the screen would still make the "request" to get that new image so that it always goes through the same consistent process)