Direct sending of files from Server to Client?

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators


  • I always thought Darkplaces does this by default, until someone clarified me yesterday. I'm trying to setup a dedicated server which contains custom maps and player models that clients would need in order to connect. From what I knew, if the server is running a map which the client does not have, it would directly send that file to the client rather than pointing it to an external URL where the files are located (sv_curl_defaulturl).

    I don't have a problem with setting up a file server since I already run a website with Apache, but imo it would be important for servers to know how to DCC-send content when it's not found at the specified URL. Some players may wish to start a quick server with custom maps, but not put them on external file hosts and all. I know this would increase bandwitch and cause lag as the map is being sent, but if the owner is willing to pay this price to avoid dependencies to other hosts I think it would be important for this to be possible.

    Are there any plans to implement direct file sending in the server code, for servers that would want this feature? Perhaps I should put this on the dev tracker... I highly support this and personally find it an essential thing for any shooter that supports custom content.
    <Taoki> ... So maybe the new colored bars under the sbar weapons could indicate ammo level rather than accuracy stats.
    <Morphed> great now there is a place to show current phase of moon on hud
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest


  • In many ways its better for the game server to re-direct the client to d/l from another server. Consider the situation where you have 10 clients with fast connections fetching a 25meg pk3 at once, and a few client playing at the same time. you'd need one helluva connection to handle that without lagging the game server. the alternative it throttling the download and letting the ppl that download grow long white beard waiting for it to finish. Then you have the geografical 'issue' if you send the client to a d/l server this can in turn redirect to another better sever for this client. not that there are that many Nexuiz map/data reposes atm :P but its still a nice option for the future.

    That said, iirc there is a "built in file-download". I dont remember the specifics tough since i only used it briefly a rather long time ago.
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else


  • Yeah, it would of course be slower than a separate host. Should be unlikely for 10 clients to download at once though... as people slowly notice and join a new server there should rarely be more than 4-5 downloads, unless downloading would take a lot or 10 people jump in at once. Perhaps there could be a cvared limit, so if too many downloads are going on the server refuses a new player who needs to download stuff in order to connect, until a new slot is freed.

    I was thinking of it as a backup solution; The owner manually enables the cvar if they're willing to pay with bandwitch. Then, the server still looks for the files at sv_curl_defaulturl, but if they aren't found it sends them as a last resort. Would even be useful to secure the server if the file host goes down for a few minutes as the server runs.
    <Taoki> ... So maybe the new colored bars under the sbar weapons could indicate ammo level rather than accuracy stats.
    <Morphed> great now there is a place to show current phase of moon on hud
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest


  • Yeah, would be nice as an option for users hosting on their PCs for eg. LAN games, but would suck for dedicated servers. Bandwidth isn't exactly cheap for these.
    Image
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland


  • There already is direct sending support, and that is used for clients to download csprogs.dat when the server runs custom progs.

    The problem with this is that the data gets pushed over UDP and is limited by the amount of server frames and sv_maxrate. This is why csprogs downloads usually happen at 60 kb/s max. (default servers in 2.5.2 only get 30 kb/s). Another problem is that UDP is unreliable, so it is likely for people to get bad packets and corrupted pk3s.

    The answer to these problems would be to use TCP on another port with a different app (or at least threading in DP). But wait, that's what we already have! Really the HTTP downloads are a pretty good idea, it's just a little more effort to set up for a server admin.
    Before posting a reply, please read about the bikeshed
    User avatar
    merlijn
    Advanced member
     
    Posts: 84
    Joined: Tue Oct 21, 2008 10:18 am



Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest