I’ve been playing around with a project that’s a proxy and cache
server for a Debian apt repository. (apt-proxy in ruby basically) I’ve
got a simple example working using Webrick, but have one annoying
problem I’d like to solve.
When an apt client requests a package file from the proxy, the client
receives no feedback until the proxy has completely downloaded the
file from the backend repository. I’d like to start sending the file
to the client while the backend download is ongoing. I’m hoping this
would also have the side benefit of not having to load the entire
package file into interpreter memory.
The amazing thing is the the original Debian apt-proxy code does this
in a shell-script. I could adopt the apt-proxy methods and use
system calls to perform this, but I was hoping for a more rubyesque