Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Software Architecture with Golang

You're reading from   Hands-On Software Architecture with Golang Design and architect highly scalable and robust applications using Go

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781788622592
Length 500 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Jyotiswarup Raiturkar Jyotiswarup Raiturkar
Author Profile Icon Jyotiswarup Raiturkar
Jyotiswarup Raiturkar
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Building Big with Go FREE CHAPTER 2. Packaging Code 3. Design Patterns 4. Scaling Applications 5. Going Distributed 6. Messaging 7. Building APIs 8. Modeling Data 9. Anti-Fragile Systems 10. Case Study – Travel Website 11. Planning for Deployment 12. Migrating Applications 13. Other Books You May Enjoy

What this book covers

Chapter 1, Building Big with Go, takes a broad view of what considerations are needed when setting out to build mission-critical software. It gives an overview of microservices and how Go is a good fit for this architectural paradigm. We end the chapter with a quick tour of Go, for the sake of those who are new to the language.

Chapter 2, Packaging Code, delves into ways of organizing code at various levels in Go. It looks at project organization, packages, object orientation, and structuring tests. Many first timers get the encapsulation wrong, leading to unmanageable code or cyclic dependencies later on. This chapter provides pointers on how to avoid these and structure code for feature velocity.

Chapter 3, Design Patterns, takes us through various design patterns, such as the creational, structural, and behavioral design patterns, looking at descriptions of each pattern and examining the Go code for each implementation. We also look at the general principles of class (struct/interface) design.

Chapter 4, Scaling Applications, explores what scalability means, and how to quantify systems in terms of scalability. We describe how to scale algorithms and data structures, and how to identify bottlenecks and alleviate them. Then we'll look at ways of running multiple application instances and what mechanisms work best for different use cases.

Chapter 5, Going Distributed, looks at building distributed systems in Go, as your application is not going to run on a single machine. The chapter starts by listing common fallacies when it comes to distributed systems. It goes into detail on the common problems, such as consensus and consistency, and the patterns and protocols for solving them. We then go deep into various distributed architectures.

Chapter 6, Messaging, covers some messaging theory and then dives into Apache Kafka and NSQ—a brokerless messaging platform. Messaging systems are described in detail, and illustrated with code. This chapter also describes various messaging patterns, such as request-reply, fan-out, and pipes-and-filters.

Chapter 7, Building APIs, shows how to build REST and GraphQL services in Go. APIs are the lingua franca of the microservices world. At the end, the chapter takes a deep dive into Go-Kit, a collection of packages that together give a slightly opinionated framework for quickly building a service-oriented architecture.

Chapter 8, Modeling Data, starts off by introducing the entity-relationship way of modeling data. It then describes various persistence stores (such as relational databases, key-value stores, and column-oriented stores). This chapter takes a deep dive into MySQL, Redis, and Cassandra, the most commonly used storage technologies. This chapter outlines the architecture of the stores and showcases the Go code for interacting with them.

Chapter 9, Anti-Fragile Systems, explores various facets of building resilient systems, from ruggedizing individual services to achieving high availability. Each of these facets need to work together to enable systems that thrive under stress. We describe common patterns such as Hystrix and explain how to implement them in Go. The chapter also briefly covers disaster recovery and business continuity.

Chapter 10, Case Study – Travel Website, details some high-level architecture, low-level design, and key code constructs. Having a sense of the various building blocks, we will build an e-commerce app – a travel website, to be exact. Essentially, we will use everything we will have learned so far to build a non-trivial system.

Chapter 11, Planning for Deployment, discusses deployment considerations for Go programs. These includes things such as Continuous Integration and Continuous Deployment (CICD) pipelines, as well as application monitoring using tools such as New Relic. We build a robust CICD pipeline for a sample program using Jenkins and tools such as fmt and lint to ensure code quality before the push to production.

Chapter 12, Migrating Applications, describes a migration strategy that systematically moves relevant/critical parts of your applications to Go and showcases the business value of doing so at every stage. In this final chapter of the book, I also describe my experience with hiring and staffing a team for Go development—a common concern for many companies.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime