From: Tom Sawyer Date: 2002-09-12T02:51:02+09:00 Subject: Re: Proxy Server quick guess: read file only in chunks, pass off each chuck to another thread (don't ask me much about this, i'm not sure. check out mutexes) this other thread of course then passes it on to the user. like i said my first thoughts. cheers transami On Wed, 2002-09-11 at 11:36, Alan Chen wrote: > 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 > solution. > > Any ideas? > > - alan > > -- > Alan Chen > Digikata LLC > http://digikata.com > -- tom sawyer, aka transami transami@transami.net