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

Fault tolerance


Systems that are fault-tolerant have the ability to survive a malfunctioning component. This is done by either correcting the error in the component, or by replacing the defective one with a new instance. Think of fault tolerance as an airplane with the ability to land using only one engine—the passengers are our users.

Typically, we hear about fault tolerance in the context of large scale server environments. It's a viable concept in frontend development too, given sufficient complexity. In this section, we'll start off by thinking about how to classify components into critical versus noncritical components. Then we'll move on to detecting errors, and how to go about handling the error so that the application can continue to function.

Classifying critical behavior

Just like there're critical sections of code that can't be interrupted, by another thread for example, there're components that can't fail gracefully in our application. Some components just have to work, no matter...