Go Programming Blueprints - Second Edition

Build real-world, production-ready solutions in Go using cutting-edge technology and techniques
Preview in Mapt

Go Programming Blueprints - Second Edition

Mat Ryer

4 customer reviews
Build real-world, production-ready solutions in Go using cutting-edge technology and techniques
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Go Programming Blueprints - Second Edition Book Cover
Go Programming Blueprints - Second Edition
$ 39.99
$ 28.00
WordPress 4.0 Site Blueprints - Second Edition Book Cover
WordPress 4.0 Site Blueprints - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $40.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781786468949
Paperback394 pages

Book Description

Go is the language of the Internet age, and the latest version of Go comes with major architectural changes. Implementation of the language, runtime, and libraries has changed significantly. The compiler and runtime are now written entirely in Go. The garbage collector is now concurrent and provides dramatically lower pause times by running in parallel with other Go routines when possible.

This book will show you how to leverage all the latest features and much more. This book shows you how to build powerful systems and drops you into real-world situations. Scale, performance, and high availability lie at the heart of our projects, and the lessons learned throughout this book will arm you with everything you need to build world-class solutions. Each project could form the basis of a start-up, which means they are directly applicable to modern software markets.

Table of Contents

Chapter 1: Chat Application with Web Sockets
A simple web server
Modeling a chat room and clients on the server
Building an HTML and JavaScript chat client
Tracing code to get a look under the hood
Summary
Chapter 2: Adding User Accounts
Handlers all the way down
Making a pretty social sign-in page
Endpoints with dynamic paths
Getting started with OAuth2
Tell the authorization providers about your app
Implementing external logging in
Summary
Chapter 3: Three Ways to Implement Profile Pictures
Avatars from the OAuth2 server
Implementing Gravatar
Uploading an avatar picture
Combining all three implementations
Summary
Chapter 4: Command-Line Tools to Find Domain Names
Pipe design for command-line tools
Five simple programs
Composing all five programs
Summary
Chapter 5: Building Distributed Systems and Working with Flexible Data
The system design
Installing the environment
Reading votes from Twitter
Counting votes
Running our solution
Summary
Chapter 6: Exposing Data and Functionality through a RESTful Data Web Service API
RESTful API design
Sharing data between handlers
Wrapping handler functions
Injecting dependencies
Responding
Understanding the request
Serving our API with one function
Handling endpoints
A web client that consumes the API
Running the solution
Summary
Chapter 7: Random Recommendations Web Service
The project overview
Representing data in code
Generating random recommendations
Summary
Chapter 8: Filesystem Backup
Solution design
The backup package
The user command-line tool
The daemon backup tool
Testing our solution
Summary
Chapter 9: Building a Q&A Application for Google App Engine
The Google App Engine SDK for Go
Google Cloud Datastore
Entities and data access
Google App Engine users
Transactions in Google Cloud Datastore
Querying in Google Cloud Datastore
Votes
Casting a vote
Exposing data operations over HTTP
Running apps with multiple modules
Deploying apps with multiple modules
Summary
Chapter 10: Micro-services in Go with the Go kit Framework
Introducing gRPC
Protocol buffers
Building the service
Modeling method calls with requests and responses
An HTTP server in Go kit
A gRPC server in Go kit
Creating a server command
Building a gRPC client
Rate limiting with service middleware
Summary
Chapter 11: Deploying Go Applications Using Docker
Using Docker locally
Deploying Docker images
Deploying to Digital Ocean
Summary

What You Will Learn

  • Build quirky and fun projects from scratch while exploring patterns, practices, and techniques, as well as a range of different technologies
  • Create websites and data services capable of massive scale using Go's net/http package, exploring RESTful patterns as well as low-latency WebSocket APIs
  • Interact with a variety of remote web services to consume capabilities ranging from authentication and authorization to a fully functioning thesaurus
  • Develop high-quality command-line tools that utilize the powerful shell capabilities and perform well using Go's in-built concurrency mechanisms
  • Build microservices for larger organizations using the Go Kit library
  • Implement a modern document database as well as high-throughput messaging queue technology to put together an architecture that is truly ready to scale
  • Write concurrent programs and gracefully manage the execution of them and communication by smartly using channels
  • Get a feel for app deployment using Docker and Google App Engine

Authors

Table of Contents

Chapter 1: Chat Application with Web Sockets
A simple web server
Modeling a chat room and clients on the server
Building an HTML and JavaScript chat client
Tracing code to get a look under the hood
Summary
Chapter 2: Adding User Accounts
Handlers all the way down
Making a pretty social sign-in page
Endpoints with dynamic paths
Getting started with OAuth2
Tell the authorization providers about your app
Implementing external logging in
Summary
Chapter 3: Three Ways to Implement Profile Pictures
Avatars from the OAuth2 server
Implementing Gravatar
Uploading an avatar picture
Combining all three implementations
Summary
Chapter 4: Command-Line Tools to Find Domain Names
Pipe design for command-line tools
Five simple programs
Composing all five programs
Summary
Chapter 5: Building Distributed Systems and Working with Flexible Data
The system design
Installing the environment
Reading votes from Twitter
Counting votes
Running our solution
Summary
Chapter 6: Exposing Data and Functionality through a RESTful Data Web Service API
RESTful API design
Sharing data between handlers
Wrapping handler functions
Injecting dependencies
Responding
Understanding the request
Serving our API with one function
Handling endpoints
A web client that consumes the API
Running the solution
Summary
Chapter 7: Random Recommendations Web Service
The project overview
Representing data in code
Generating random recommendations
Summary
Chapter 8: Filesystem Backup
Solution design
The backup package
The user command-line tool
The daemon backup tool
Testing our solution
Summary
Chapter 9: Building a Q&A Application for Google App Engine
The Google App Engine SDK for Go
Google Cloud Datastore
Entities and data access
Google App Engine users
Transactions in Google Cloud Datastore
Querying in Google Cloud Datastore
Votes
Casting a vote
Exposing data operations over HTTP
Running apps with multiple modules
Deploying apps with multiple modules
Summary
Chapter 10: Micro-services in Go with the Go kit Framework
Introducing gRPC
Protocol buffers
Building the service
Modeling method calls with requests and responses
An HTTP server in Go kit
A gRPC server in Go kit
Creating a server command
Building a gRPC client
Rate limiting with service middleware
Summary
Chapter 11: Deploying Go Applications Using Docker
Using Docker locally
Deploying Docker images
Deploying to Digital Ocean
Summary

Book Details

ISBN 139781786468949
Paperback394 pages
Read More
From 4 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Python Machine Learning Book Cover
Python Machine Learning
$ 35.99
$ 25.20
Go Programming Blueprints Book Cover
Go Programming Blueprints
$ 29.99
$ 21.00
Learning Docker Book Cover
Learning Docker
$ 39.99
$ 8.00
Mastering Docker Book Cover
Mastering Docker
$ 39.99
$ 28.00
Mastering Concurrency in Go Book Cover
Mastering Concurrency in Go
$ 30.99
$ 21.70