[undertow-dev] Async PUT (fileresource) handler.
Bernd Eckenfels
ecki at zusammenkunft.net
Sun Mar 15 19:03:54 EDT 2015
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).
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).
Gruss
Bernd
More information about the undertow-dev
mailing list