Book Image

Hands-On Software Architecture with Golang

By : Jyotiswarup Raiturkar
Book Image

Hands-On Software Architecture with Golang

By: Jyotiswarup Raiturkar

Overview of this book

Building software requires careful planning and architectural considerations; Golang was developed with a fresh perspective on building next-generation applications on the cloud with distributed and concurrent computing concerns. Hands-On Software Architecture with Golang starts with a brief introduction to architectural elements, Go, and a case study to demonstrate architectural principles. You'll then move on to look at code-level aspects such as modularity, class design, and constructs specific to Golang and implementation of design patterns. As you make your way through the chapters, you'll explore the core objectives of architecture such as effectively managing complexity, scalability, and reliability of software systems. You'll also work through creating distributed systems and their communication before moving on to modeling and scaling of data. In the concluding chapters, you'll learn to deploy architectures and plan the migration of applications from other languages. By the end of this book, you will have gained insight into various design and architectural patterns, which will enable you to create robust, scalable architecture using Golang.
Table of Contents (14 chapters)

To get the most out of this book

You will need to install all the tools that are required to run Go programs on your computer; this includes the following:

  • Go (preferably v 0.9).
  • An editor. Nothing fancy needed; Sublime Text will do just fine.
  • Also, a few chapters deal with Cassandra, Kafka, Redis, and NSQ. All of these can be installed on a regular laptop. On a Mac, all of them are available via Homebrew. The latest stable version should be fine for all of them.

As you read a chapter, be sure to consider what you are learning and try to play around with the code. These moments will help you distill and crystallize the concepts you encounter.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Software-Architecture-with-Golang. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/9781788622592_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Then you can enable it for remote invocation using the rpc package."

A block of code is set as follows:

type Args struct {
A, B int
}

type MuliplyService struct{}

func (t *Arith) Do(args *Args, reply *int) error {
*reply = args.A * args.B
return nil
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

type Args struct {
A, B int
}

type MuliplyService struct{}


func (t *Arith) Do(args *Args, reply *int) error {
*reply = args.A * args.B
return nil
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."

Warnings or important notes appear like this.
Tips and tricks appear like this.