[zeromq-dev] ZeroMQ File Server
Thomas S Hatch
thatch45 at gmail.com
Sat May 14 17:12:27 CEST 2011
On Sat, May 14, 2011 at 8:32 AM, Paul Colomiets <paul at colomiets.name> wrote:
>
>
> On Sat, May 14, 2011 at 6:40 AM, Thomas S Hatch <thatch45 at gmail.com>wrote:
>
>> I have just posed a small, quick article on the back end required for a
>> VERY simple file server in ZeroMQ, for those of you interested:
>>
>> http://red45.wordpress.com/2011/05/13/zeromq-file-server/
>>
>> I am, of course, and as usual, open to suggestions!
>>
>
> Adding to Martin's and Pieter's suggestions:
> * you use isfile() which does stat() call anyway, so use getsize() instead
> and allocate buffer all at once (as Martin said file is held in memory
> anyway)
> * you *must* check the path against limited set of directories to send
> from, even if you will run server in fully controlled environment (and use
> realpath() for checking)
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
Great! This is what I was hoping to hear! If the entire file is getting read
into ram anyway, how would I go about making a file server that would send
the files in chunks and not read the whole thing into ram? I think that you
can see me intention here, but I gues I am still not entirely sure how to do
it yet.
And yes Pieter, I am very much interested in seeing your information on how
to best make a zeroMQ file server!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110514/187ee4e9/attachment.htm>
More information about the zeromq-dev
mailing list