Soldat Fans > Fan Apps

Fileserver Replacement in Python and C++

(1/2) > >>

Thomas:
I reimplemented Soldat's internal fileserver in Python.
It is more stable than Soldat's one and should be able to take a massive amount of requests.

What it does:

* Serves only files that Soldat's fileserver would serve aswell
* Caches all files in memory (for now) as soon as they're first requested
* Handles lots of connections parallely through its non-blocking design
* Can listen on multiple ports and interfaces
What it doesn't do:

* Doesn't work with IPv6 (not yet at least)
How to use it:
All setup happens in server.py which loads the FileServe module. Basically you just create an instance of FileServe, addPort()s on it and then run().
You have to disable Soldat’s fileserver. Just set Allow_Download=0 in the [Network] section of soldat.ini.

Some documentation:

--- Code: ---FileServe.addPort(port, ip=None): binds to port and optionally to ip instead of the default IP
FileServe.setDefaultIp(ip): sets the default IP to bind to
FileServe.run(): runs the server in an infinite loop
FileServe.setDataDir(dir): specify a directory where data files can be found (default: current working dir)
--- End code ---

Download from my server or from the attachment.

C++ version:
I also did an implementation in C++11 with Boost. The repo can be found at https://git.mnus.de/minus/soldat_fileserver, the latest code is attached.

Furai:
Good job, minus! :)

Thomas:
I wonder how how stable and fast it really is. Anyone mind making a load test? And maybe compare it to soldatserver :D

Thomas:
Excuse me for bumping my 4 year old topic with 2 year old update: I did an implementation of the protocol in C++ as well: https://git.mnus.de/minus/soldat_fileserver

jrgp:

--- Quote from: Thomas on November 25, 2015, 02:29:22 pm ---Excuse me for bumping my 4 year old topic with 2 year old update: I did an implementation of the protocol in C++ as well: https://git.mnus.de/minus/soldat_fileserver

--- End quote ---

Where are the tests?

Navigation

[0] Message Index

[#] Next page

Go to full version