Buddycloud Media Server Architecture

After some conversations with my mentor (dodo), we finally have a bigger picture of how should work the media server communication flow, here is a short description of the "posting" media functionality:
Client discovers the channels media server;Since it is a XMPP Component, it should be "discoverable";Negotiate media url; Client receives a link for public channels and a cookie for private ones;Upload data, PUT or POST request to the media server http static file server.Here is an architecture overview diagram:Where:Media Server:HTTP FIle Server: static file server, where clients will be able to GET and PUT (or POST) files;XMPP Component: component that will evaluate user's permissions and also generate valid URLs for the client download or upload files through the HTTP File Server.Storage:Medatada: stores files metadata, like checksum, upload date, etc;Binary Files: stores the files themselves (and also their previews).That means, that both Media Server and Client should talk two "languages", HTTP and XMPP. But this would change (or not) after Denis, the other buddycloud's GSoC student, finishes his project.