Sending Files?

crzyone9584
edited January 2012 in Photon Server
I've been looking through the Socket Server document and havent found anything yet. I was wondering if its possible to send files to the client through the server so I can use the same server/client as an updater also.

Comments

  • There are no commands to send files and using Photon would be a very bad idea for multiple reasons:

    1. Its a massive overhead to fragment, send and combine the whole packages, eating a lot of server time in the process and bandwidth (-> latency, costs on your server backend). Also you might need to implement part of that yourself, I'm unsure if photon accepts massive size byte[] for sending
    2. They couldn't do it while playing anyway so there is no meaningful reason to do it on the 'game server', cause while they download updates they would likely be in a special room or whatever focused at that, not offering anything else, to minimize the 'drag down' on the server.
    3. Its always slower to massively slower than simply make your client download updates through TCP from a webhost thats opted at serving files. And as mentioned before, the costs for the wasted cpu time and traffic on a dedicated / cloud server are massive in such a case compared to the ~$0 on a webhost. Even using a second cloud server only acting as webhost would be more cost efficient as it wouldn't have the overhead and could serve the data in a optimized way.
  • Dreamora is right: downloading files is not the best use for Photon. You can do this easier with HTTP/TCP. Photon's main purpose is realtime communication.
    Aside from the reasons above: It's also easier to get an infrastructure for file distribution and download. Look up Content Distribution Network.
  • Thanks for the info guys. I'll figure something out for the updater.