Book Image

JavaScript at Scale

By : Adam Boduch
Book Image

JavaScript at Scale

By: Adam Boduch

Overview of this book

Table of Contents (17 chapters)
JavaScript at Scale
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Failing fast


Systems or components that fail-fast, stop running when they fail. This may not sound like a desirable design trait, but consider the alternative: a system or a component that fails, but then continues to run anyway. These components could be running in an erroneous state, whereas, that's not possible if the system or component halts.

There are times where we'll want to recover a failed component, and we'll get into that topic later on in the chapter. In this section, we'll go over some of the criteria used in determining whether a JavaScript component should fail fast, and what the consequences are for the user. Sometimes, even our fail-fast mechanisms fail us, which we also need to consider.

Using quality constraints

When our components fail-fast, it's usually due to a known error state. On the other hand, something completely unexpected could happen. In either case, it's likely to leave our component in a bad state, and we don't want the application to carry on like everything...