I haven't had time to really dive in, so I'm a bit cloudy on what an "asynchronous response" is and what the use cases are. Is it simply a way to handle more concurrent requests with less resources?
Our apps do a lot of file uploads (images). Is that something that could benefit?
Basically in this case it means that the request is handing off execution to other requests when it's doing something that requires waiting for an external service. That service could be a database call, a HTTP request or even file IO.
You hit the head on the nail with " Is it simply a way to handle more concurrent requests with less resources?" It makes much more efficient use of server resources than a normal blocking application.
Probably the most common use case is wrapping your database/API calls so they're performed asynchronously. That way time normally spent waiting for the database can be used to start serving other requests...
I've heard of people setting up asynchronous file uploads with Node.js, but I'm not sure how to do it in this context. The simplest way to approach it may be to make a separate Rack endpoint/application that deals with the upload. That way you would minimize your overhead...
3 comments
[ 0.26 ms ] story [ 13.8 ms ] threadOur apps do a lot of file uploads (images). Is that something that could benefit?
You hit the head on the nail with " Is it simply a way to handle more concurrent requests with less resources?" It makes much more efficient use of server resources than a normal blocking application.
Probably the most common use case is wrapping your database/API calls so they're performed asynchronously. That way time normally spent waiting for the database can be used to start serving other requests...
I've heard of people setting up asynchronous file uploads with Node.js, but I'm not sure how to do it in this context. The simplest way to approach it may be to make a separate Rack endpoint/application that deals with the upload. That way you would minimize your overhead...