Hi everyone,
here's my problem :
still in my video server, i'm using the FtpServer component to download a set of images, taken from a camera, through one
simple RETR call.
I guess 'simple' on the client-side only ;)
On the OnGetProcessing event, i retrieve from a DB (the connection
has already been made) all the images needed (range of images provided in the filename which is formatted) and push them into the Client.Datastream.
for the algorithm, i have no problem.
but what happens if several ftp client asks at the same time for a big amount of images (average : 1 image = 21Ko) let's say 1200 images ?
If you're creating a 25MB stream for a client, something's wrong. A client shouldn't have to wait that long for the transfer to start, and certainly shouldn't queue up behind a bunch of others doing the same thing.
Have you thought about writing a TMemoryStream descendant that can take a list of files and only read from them on request? It could either buffer each file individually, with appropriate calculations for position and so on based on file number, or buffer the virtual stream - which is much more interesting to implement :P
The elegance of this solution is that the FTP server component doesn't need to know that anything different is going on.
Is Each OnGetProcessingEvent fired one after anoher ? which would then result in a queueing of each request...
Yes, they all happen in the same thread, so must be sequential.
-- Corey Murtagh The Electric Monk "Quidquid latine dictum sit, altum viditur."
-- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be