Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying System Programming Essentials with Go
  • Table Of Contents Toc
  • Feedback & Rating feedback
System Programming Essentials with Go

System Programming Essentials with Go

By : Alex Rios
5 (5)
close
close
System Programming Essentials with Go

System Programming Essentials with Go

5 (5)
By: Alex Rios

Overview of this book

Alex Rios, a seasoned Go developer and active community builder, shares his 15 years of expertise in designing large-scale systems through this book. It masterfully cuts through complexity, enabling you to build efficient and secure applications with Go's streamlined syntax and powerful concurrency features. In this book, you’ll learn how Go, unlike traditional system programming languages (C/C++), lets you focus on the problem by prioritizing readability and elevating developer experience with features like automatic garbage collection and built-in concurrency primitives, which remove the burden of low-level memory management and intricate synchronization. Through hands-on projects, you'll master core concepts like file I/O, process management, and inter-process communication to automate tasks and interact with your system efficiently. You'll delve into network programming in Go, equipping yourself with the skills to build robust, distributed applications. This book goes beyond the basics by exploring modern practices like logging and tracing for comprehensive application monitoring, and advance to distributed system design using Go to prepare you to tackle complex architectures. By the end of this book, you'll emerge as a confident Go system programmer, ready to craft high-performance, secure applications for the modern world.
Table of Contents (24 chapters)
close
close
Free Chapter
1
Part 1: Introduction
4
Part 2: Interaction with the OS
10
Part 3: Performance
13
Part 4: Connected Apps
17
Part 5: Going Beyond

What this book covers

Chapter 1, Why Go?, provides an overview of Go’s suitability for building efficient and high-performance system software, providing you with the necessary knowledge and skills to leverage Go’s capabilities for system-level development. The chapter covers Go’s concurrency model, networking and I/O, low-level control, system calls, cross-platform support, and tooling, offering practical insights and examples for building robust system programs.

Chapter 2, Refreshing Concurrency and Parallelism, provides an overview of the core aspects of Goroutines, data races, channels, and their interplay in the Go programming language. Understanding these principles is critical for implementing efficient concurrency, managing shared resources, and ensuring effective inter-goroutine communication.

Chapter 3, Understanding System Calls, provides an overview of system calls and their practical applications. You will learn how to create symbolic links, unlink files, and manipulate filename paths. Also, you will better understand package OS and syscall in Go and learn how to develop and test a CLI program.

Chapter 4, File and Directory Operations, provides an overview of handling filesystems in Go, focusing on detecting unsafe permissions, calculating directory sizes, and identifying duplicate files.

Chapter 5, Working with System Events, provides comprehensive insights into building advanced and efficient system tools using Go, focusing on task scheduling, file monitoring, process management, and distributed locking.

Chapter 6, Understanding Pipes in Inter-Process Communication, provides an exploration of the concept of pipes in Inter-Process Communication (IPC). It provides comprehensive information about anonymous pipes, named pipes (mkfifo), and how pipes interact with other programs.

Chapter 7, Unix Sockets, provides an understanding of how UNIX sockets function, their types, and their role in IPC on UNIX and UNIX-like operating systems such as Linux.

Chapter 8, Memory Management, focuses on the mechanisms and strategies underpinning garbage collection. We’ll explore the evolution of Go’s garbage collection, the distinctions between stack and heap memory allocations, and advanced techniques for efficient memory management.

Chapter 9, Analyzing Performance, covers key optimization techniques for Go applications, including escape analysis, benchmarking, CPU profiling, and memory profiling. It explains how to improve memory usage with escape analysis, measure and compare code performance through benchmarking, identify hotspots with CPU profiling, and detect memory leaks using memory profiling.

Chapter 10, Networking, delves into the fascinating world of Go network programming. Networking is essential to system programming, and Go provides powerful primitives for handling network communications. You will gain the expertise needed to create robust networked applications by exploring TCP, HTTP, and additional relevant protocols.

Chapter 11, Telemetry, dives into how you can leverage industry tools to implement effective telemetry practices. From logs to traces and metrics, you’ll explore the tools and guidelines necessary to monitor your application efficiently.

Chapter 12, Distributing Your Apps, explores the key concepts and practical applications of distributing applications using Go modules, continuous integration, and release strategies.

Chapter 13, Capstone Project - Distributed Cache, guides you through the Capstone Project. This project will build a distributed cache system in Go with features such as Memcached or Redis. It will cover sharding strategies, eviction policies, consistency models, and technology choices, all while navigating the trade-offs that come with each decision.

Chapter 14, Effective Coding Practices, explores the principles and techniques of efficient resource management in Go programming, specifically focusing on avoiding common pitfalls that can lead to performance issues and hinder overall efficiency. It dives into the intricacies of optimizing resource usage using the Go standard library, providing strategies for developers seeking to enhance the effectiveness of their Go applications.

Chapter 15, Stay Sharp with System Programming, provides a continuous learning path to Go-based system programming based on real-world case studies. By gaining insight into how Go is utilized in actual applications, you can apply these lessons to their projects.

Appendix, Hardware Automation, explores how to utilize various tools to automate mundane tasks with USB drives and Bluetooth devices and monitor peripheral events. By understanding how to automate these processes, you will save valuable time and increase productivity in your daily lives.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY