On Sun, Dec 2, 2012 at 2:51 PM, Archos wrote:
Into a web application with different services (user register, login,
etc), how would you manage any possible error got in those services, i.e.
from a SQL query?
Handle errors in your web application the way you would handle errors in
any other application. If you have an error at a level at which you know
how to handle it, do so. If you have some context that can make it easier
for some level above you to handle it, add it. Otherwise pass it up the
I'm thinking that should be shutdown all those services from the first
error, finally it is sent a HTTP message to be showed by the web server. Am
I right or is it too strict?
If you've got a distributed system, I suggest that you do *not* want one
component to fail when another component fails, you should gracefully
degrade as much as possible, fail over to other backends, turn on any
pushback mechanisms you have, and log or export the episode so that your
monitoring can notice if the incident is widespread and needs a human to
intervene in order to repair it.