Network Programming with Go Cover

Network Programming with Go

Code Secure and Reliable Network Services from Scratch
by Adam Woodbeck
March 2021, 392 pp.
ISBN-13: 
9781718500884

Download Chapter 2: RESOURCE LOCATION AND TRAFFIC ROUTING

You can find the book's source code and examples on GitHub.

Build simple, reliable, network software

Combining the best parts of many other programming languages, Go is fast, scalable, and designed for high-performance networking and multiprocessing. In other words, it’s perfect for network programming.

Network Programming with Go will help you leverage Go to write secure, readable, production-ready network code. In the early chapters, you’ll learn the basics of networking and traffic routing. Then you’ll put that knowledge to use as the book guides you through writing programs that communicate using TCP, UDP, and Unix sockets to ensure reliable data transmission.

As you progress, you’ll explore higher-level network protocols like HTTP and HTTP/2 and build applications that securely interact with servers, clients, and APIs over a network using TLS.

You'll also learn:

  • Internet Protocol basics, such as the structure of IPv4 and IPv6, multicasting, DNS, and network address translation
  • Methods of ensuring reliability in socket-level communications
  • Ways to use handlers, middleware, and multiplexers to build capable HTTP applications with minimal code
  • Tools for incorporating authentication and encryption into your applications using TLS
  • Methods to serialize data for storage or transmission in Go-friendly formats like JSON, Gob, XML, and protocol buffers
  • Ways of instrumenting your code to provide metrics about requests, errors, and more
  • Approaches for setting up your application to run in the cloud (and reasons why you might want to)

Network Programming with Go is all you’ll need to take advantage of Go’s built-in concurrency, rapid compiling, and rich standard library.

Covers Go 1.15 (Backward compatible with Go 1.12 and higher)

Author Bio 

Adam Woodbeck is a senior software engineer at Barracuda Networks, where he implemented a distributed cloud environment in Go to supplant the previous cloud infrastructure, profoundly increasing its scalability and performance. He’s since served as the architect for many network-based services in Go.

Table of contents 

Part I: Network Architecture
Chapter 1: An Overview of Networked Systems
Chapter 2: Resource Location and Traffic Routing

Part II: Socket-Level Programming
Chapter 3: Reliable TCP Data Streams
Chapter 4: Sending TCP Data
Chapter 5: Unreliable UDP Communication
Chapter 6: Ensuring UDP Reliability
Chapter 7: Unix Domain Sockets

Part III: Application-level Programming
Chapter 8: Writing HTTP Clients
Chapter 9: Building HTTP Services
Chapter 10: Caddy: A Contemporary Web Server
Chapter 11: Securing Communications with TLS

Part IV: Service Architecture
Chapter 12: Data Serialization
Chapter 13: Logging and Metrics
Chapter 14: Moving to the Cloud

View the Copyright Page
View the detailed Table of Contents
View the Index

Reviews 

I Programmer added to Book Watch

Watch this Go Time Podcast interview with author Adam Woodbeck