Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fail-fast...

Status
Not open for further replies.

kanghao

IS-IT--Management
Jul 4, 2004
68
KR
I'm interested in the "fail-fast" principle.
does anybody have some articles or something?
 
sedj, fail-fast is all about getting an error the when error occurs. Trying to cause the program to crash or throw or do something immediatly when a problem is encountered. As opposed to letting the system keep going (potentially propagating the error) so that when it does fail, it's in a part of the code that is seperated from the actual error.

[plug=shameless]
[/plug]
 
A popular example is concurrent modification exception in collections, when it is modified, while an iterator is iterating.

Sometimes it might be ok to go on iterating, but it would be very hard to find the error, which could occur much later, and only in rare circumstances.

Fail-fast will allways throw an error, and help, to find the error early.

seeking a job as java-programmer in Berlin:
 
can you show me fail-fast or fail-slow examples?

 
There are examples in the link I posted.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Ahhh... I see. I think I already do that - didn't realise there was a flashy name for it :)

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top