[undertow-dev] Async PUT (fileresource) handler.
Stuart Douglas
sdouglas at redhat.com
Mon Mar 16 21:47:34 EDT 2015
----- Original Message -----
> From: "Bernd Eckenfels" <ecki at zusammenkunft.net>
> To: undertow-dev at lists.jboss.org
> Sent: Monday, 16 March, 2015 10:03:54 AM
> Subject: [undertow-dev] Async PUT (fileresource) handler.
>
> Hello,
>
> I have added a small special-purpose PUT handler to a project of mine.
> I am using however a blocking exchange to read the uploaded data and
> put it into a file. This seems to work, but I wonder if it would be
> worthwile to do this async (with channels).
>
> When I understand NIO FileChannels correctly they emulate the
> non-blocking behaviour with their own IO threads, so I guess it is not
> really better to use it this way (in terms of occupied threads).
I think you are correct, although I am not 100% sure.
>
> But I wonder if somebody did some experiments of has ready-made code
> for it?
>
> Just for the record, I am using new File(FileResourceManager.getBase(),
> canonicalize(exchange.getRelativePath()) to work around the missing
> write support in the FRM. Thats fine of the application is not too
> complex and needs no abstraction, but I can imagine it would be better
> to have that support (for things like WebDav handler).
I will look at adding this. It will probably be in the form of an optional interface (WritableResource) that Resource instances can implement. We definitely need to provide webdav support, so I will look at implementing this sooner rather than later.
Stuart
>
> Gruss
> Bernd
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
More information about the undertow-dev
mailing list