I have a distributed application that consists in a main CMS server where "human" users can upload videos, pictures (media content, basically) and a bunch of "players" that play those videos or pictures at certain times.
Right now, each and every player connects via HTTP/SFTP to the CMS to grab the content it needs to play (erm... and plays it... if nothing is broken). It won't connect to the CMS again if the player has already downloaded the video it needs to play. I mean... is not that the CMS is streaming the videos or anything fancy like that... the player says "Oh, I need to play the video Jenna_Jameson_meets_the_plumber.avi (to say something) in 5 minutes. Do I have it already?" If yes, just play it when it should. Otherwise, connect to the CMS, download it and play it when it should. The players act more like a "cache" for the media to display.
Now, there's a chance that a big number of those players are in the same private LAN, connected among themselves with a fast Ethernet connection (Much faster than the cheapy-weepy DSL connection that they may have with the CMS) So I was considering to implement something so the Players request the content from their neighbors before going to the CMS (both Players and CMS are coded in Python and use Ubuntu as O.S.) but then I thought that maybe there's something like that in place (and I that I could do it using pre-existing tools which I trust way more than anything I could implement myself). Does any of you know something that may work the way I want? One of the issues is that I'm not even too sure how to call that kind of application.
I've taken a look to NFS file systems, but then (if I understood correctly) I would need to mount one NFS directory per "other" player, and every time I need one of those educational documentaries I want to play, I would need to traverse all those NFS directories, check if the video is in any of them and if not, go grab it from the CMS... That sounds a bit slow, right? Also, I don't know how to handle very well that the computers in the LAN may not be my players. I don't know how could I handle with a distributed filesystem the discovery of "my" players.
If anyone could point me in the right direction, I'd appreciate it. Thank you in advance.