Kingsley Reuben
Kingsley Reuben

Reputation: 145

Asynchronous File Upload Servlet

Is it recommended to use asynchronous or NIO servlet for file upload? If so, a good sample code to start will do a great help for me.

I'd like to know which version of Tomcat supports Async / NIO servlet too.

Upvotes: 3

Views: 1745

Answers (1)

Stu Thompson
Stu Thompson

Reputation: 38878

No...

...use the standard blocking IO stuff.

NIO does not automagically translate to 'faster' than old school blocking IO. In fact, many people have reported degraded performance with asynchronous NIO implementations for years, on top of the code being considerably more complex to code, understand, maintain and debug.

If that doesn't scare you off, remember two important engineering concepts:

Upvotes: 5

Related Questions