Closed zostay closed 9 years ago
I have decided to keep the Promise in the application. I have added an admonition to Layer 2 that the application return control back to the server as soon as possible on each request. I might still renege on this or even regret it, but it feels like the right way to go.
One issue I have with making the application keeper of the Promise is that the application is not guaranteed to be synchronous and might do something stupid:
This potentially locks the server/middleware when it might otherwise expect an immediate return. Also, there is an argument to made for allowing the server the opportunity to perform synchronous work within a single thread rather than having to use 2 threads.
So, consider the utility of just making the application return whenever it feels like, but let the server worry about how to deal with a long-running application.