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

Chapter 10. Coping with Failure

At this point in the book, we would like to think that our architecture is sound. We've thought about scale, and made all the appropriate trade-offs, sacrificing performance for configurability, and so on. The one aspect of scalable JavaScript architectures we have yet to go into any depth on is the human factor. As smart as we are, we're the weakest link because we design the application and write the code—and we're really good at making subtle mistakes.

Until we're taken out of the software development equation completely, we have to design our components with failure in mind. This involves thinking about the failure modes—do we fail fast, or do we try to recover from the error? It involves thinking about the quality of our errors—some errors are easier to work with than others. But it's also about understanding our limitations; we can't feasibly detect and recover from every conceivable error.

As we scale our application, the approaches of how we deal with...