Hi Dain,
Thanks for the detailed explanations. This is definitely
a good feature to have
Regards
Manu
On 2/4/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote:
On Feb 3, 2007, at 1:00 AM, Manu George wrote:
> Yes Excellent Explanation!! I am able to understand David's
> mail completely now :).
> It is a good idea. I have a few claarifications/questions
>
> What will be effect of creating temporary files on the server side on
> performance? I am thinking of a large no of requests to an EJB with
> multiple InputStreams as parameters. Will this result in a lot of disk
> I/O slowing down the server?
In that case, yes of course it will slow down the server. This a
connivence feature that should be used with care. If you have
thousands of connections per second all uploading large files, I
doubt this will work for you. But if this is used in an area of an
application that few users will access it shouldn't be a problem.
Also, it the files are small, there is no need to write them to disk
and in that case you will just need enough memory.
As always, it comes down to expected usage patterns and how your
application is architected.
> Also for large InputStreams the method invocations may take some time
> to complete.
> Will we be doing something to have better performance in these cases
> eg providing the ability to hook in a compressor/decompressor. I don't
> know how valuable it will be because of the cpu cycles
> compression/decompression may consume
Sounds like a good option to have. Actually, you may wan to gzip the
entire protocol. This is a simple tradeoff between cpu and
bandwidth. One option that works well is to pass all data over HTTP
and then use a load balancer that can compress/encrypt the stream.
Then all the work takes place in hardware specially designed to
handle that load.
> Finally Are there any additional security considerations of passing
> InputStreams across the wire unencrypted compared to passing objects ?
No. The both have the same inherent issue. The data would be
unencrypted. If the data needs to be encrypted you must encrypt it
regardless of the format the data is passed over the wire.
> Also what are the usecases where it is better to pass inputstreams?
I want to use the ejb protocol for remote deployment of
applications. In that case, I need to stream the archive to a the
server. Other then that, I would guess there are a few other rare
situations where you want to stream to the server.
-dain