Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #26938
| From | Arved Sandstrom <asandstrom2@eastlink.ca> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: email from catch or exception |
| References | <d330148b-653c-4327-81a4-151de67a9e06@googlegroups.com> <l8aric$hig$1@dont-email.me> <52a8fe6f$0$300$14726298@news.sunsite.dk> <OPGqu.658558$276.305809@fx07.iad> <52accf58$0$303$14726298@news.sunsite.dk> |
| Message-ID | <pVoru.622166$uR1.268248@fx19.iad> (permalink) |
| Organization | Public Usenet Newsgroup Access |
| Date | 2013-12-15 17:10 -0400 |
On 12/14/2013 05:36 PM, Arne Vajhøj wrote: > On 12/13/2013 11:44 AM, Arved Sandstrom wrote: >> On 12/11/2013 08:08 PM, Arne Vajhøj wrote: >>> On 12/11/2013 6:13 PM, Eric Sosman wrote: >>>> On 12/11/2013 5:55 PM, RVic wrote: >>>>> Is anyone aware of a public domain package that can email you on an >>>>> error, include the stack trace or log, whenever an exception occurs? >>>> >>>> I think you'd have to modify the JVM itself to do this. But >>>> you wouldn't want to: If you got an E-mail for every exception >>>> thrown, you'd drown in E-mail. >>>> >>>> Presumably, what you really want is E-mail about "important" >>>> exceptions, and the hard part is clarifying what "important" means. >>>> Could you describe your use case in more detail? >>> >>> In theory exceptions should be for exceptional cases meaning >>> no drowning in emails. >>> >>> I have seen many apps where your concerns are valid though. >>> >>> Arne >>> >> It's true that exceptions are for exceptional cases. The Java tutorial >> says that: >> >> "An exception is an event, which occurs during the execution of a >> program, that disrupts the normal flow of the program's instructions." >> >> However, as you yourself admit, Arne, there are many apps where there >> are frequent exceptions. And no small number of these apps are actually >> well-designed. >> >> As an example (and this is based on a setup I am familiar with), >> consider an ESB app that mediates between 2 systems: A and B. System A >> is a source of data for system B, but both are unaware of each other, >> and the data must be transformed before it goes into B. The hitch is, >> the ESB app has no ability to do more than very simple validation, and >> System A has a fair bit of bad data, because of human data entry and >> configuration reasons [1]. Hence, System B must validate (because it >> knows what it can accept), and this works OK. >> >> The validation errors must come back to the ESB app, since the ESB app >> is the controlling intelligence. They come back as SOAP faults (Java >> runtime exceptions), which is appropriate. >> >> Furthermore, the ESB app polls System A, and communicates with System B >> using SOAP, every few minutes (this interval being configurable but >> dictated by business requirements). >> >> So the first few months we were getting a few dozen SOAP faults every >> few minutes, so say about 500-1000 every hour, or 10-20 thousand a day. >> >> Thing is, 99 percent of those 10-20 thousand SOAP faults were for the >> same few dozen bad data entries in System A. Sending an email for each >> of those would have overwhelmed the human recipients. We recognized that >> a separate ESB job that ran every 24 hours (and effectively called the >> same intermediary logic) would capture all the problems, and it could >> send out a *single* email that provided a summary of the bad data in >> system A (and why it was bad). >> >> Point being, email notification on errors (as with logging errors to >> file etc) are almost always going to a human being [2]. As such, the >> urgency of an error dictates whether a notification should be sent at >> all, how often an email should be sent, who gets it (human or system), >> the nature of the email content (summary or single event), etc etc. >> >> To wit, for a large percentage of apps I think an "email per exception" >> strategy will lead to drowning in emails. And you can Splunk or >> grep|uniq|cut|cat|paste all that to your hearts's content...essentially >> wasting your time to do what the reporting systems could have done in >> the first place. > > Well - I am not convinced that the exception is the right choice > when the data quality is as it is resulting in 10-20 thousand > exceptions per day. It is however the right choice for SOAP. Altering the body to introduce error result codes introduces extra coupling between systems; SOAP faults (which translate into Java runtime exceptions) are the standard way of handling data validation errors, among other things. That one system has poor data doesn't change this. > But that type of scenario is seen frequently. You betcha. :-) > But given the question, then I am not expecting the original > poster to be working on that type of application. > > Arne I'm not convinced that he is or isn't, Arne. The OP seemed to be ostensibly OK with handling high volumes of emails...although that may be seriously optimistic on his part. AHS -- When a true genius appears, you can know him by this sign: that all the dunces are in a confederacy against him. -- Jonathan Swift
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 14:55 -0800
Re: email from catch or exception Knute Johnson <september@knutejohnson.com> - 2013-12-11 15:12 -0800
Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 18:13 -0500
Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:08 -0500
Re: email from catch or exception Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-12-13 12:44 -0400
Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-14 16:36 -0500
Re: email from catch or exception Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-12-15 17:10 -0400
Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 15:23 -0800
Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 21:09 -0500
Re: email from catch or exception Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-12-11 23:34 -0500
Re: email from catch or exception leif.roar@invalid.com (Leif Roar Moldskred) - 2013-12-12 00:41 -0600
Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 15:26 -0800
Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:06 -0500
Re: email from catch or exception RVic <rvince99@hotmail.com> - 2013-12-11 16:28 -0800
Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:50 -0500
Re: email from catch or exception Arne Vajhøj <arne@vajhoej.dk> - 2013-12-11 19:52 -0500
csiph-web