Book Image

Learning Go Web Development

By : Nathan Kozyra
Book Image

Learning Go Web Development

By: Nathan Kozyra

Overview of this book

<p>Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. It is a statically typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library.</p> <p>Learning Go Web Development is a start-to-finish walkthrough of the topics most critical to anyone building a new web application. Whether it’s keeping your application secure, connecting to your database, enabling token-based authentication, or utilizing logic-less templates, this book has you covered. You’ll begin by learning about routing requests and implementing SSL. Moving on, you’ll get to know about practices to keep users’ data safe. By the end of the book, you will be able to build robust, secure, and fully-featured applications for the web.</p>
Table of Contents (17 chapters)
Learning Go Web Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Chapter 8. Logging and Testing

In the previous chapter, we discussed delegating application responsibility to networked services accessible by API and intra-process communication and handled by a message queue.

This approach mimics an emerging trend of breaking large monolithic applications into smaller chunks; thus, allowing developers to leverage dissonant languages, frameworks, and designs.

We listed a few upsides and downsides of this approach; while most of the upsides dealt with keeping the development agile and lean while preventing catastrophic and cascading errors that might bring down an entire application, a large downside is the fragility of each individual component. For example, if our e-mail microservice had bad code as a part of a large application, the error would make itself known quickly because it would almost assuredly have a direct and detectable impact on another component. But by isolating processes as part of microservices, we also isolate their state and status.

This...