tekhedd / Interspecific

This repository moved to https://gitlab.com/derbyinsight/Interspecific
https://gitlab.com/derbyinsight/Interspecific
Other
1 stars 0 forks source link

Async Support / threading rewrite #3

Open tekhedd opened 8 years ago

tekhedd commented 8 years ago

It would make sense to use async I/O for the RESTResource methods in most cases, with a timeout.

This would reduce server load and improve performance in worst-case scenarios. Slow or hung network connections would not eat threads, and hung-forever HTTP threads would at least eventually be abandoned (if not aborted, because we don't have that option.)

Might want to create a private TaskScheduler so we'll have our own threadpool, and won't eat the global thread pool in the worst case failure mode. Or maybe we can just use the right parameters to StartNew.

tekhedd commented 7 years ago

Note: the addition of timeouts to tekhedd.SocketHttpListener makes lost threads less of a problem. Use same timeout configuration for the Listener and our response-handler callbacks?