Mastering Concurrency in Go Mastering Concurrency in Go

Mastering Concurrency in Go

    • 5.0 • 1 Rating
    • $30.99
    • $30.99

Publisher Description

A practical approach covering everything you need to know to get up and running with Go, starting with the basics and imparting increasingly more detail as the examples and topics become more complicated. The book utilizes a casual, conversational style, rife with actual code and historical anecdotes for perspective, as well as usable and extensible example applications. This book is intended for systems developers and programmers with some experience in either Go and/or concurrent programming who wish to become fluent in building high-performance applications that scale by leveraging single-core, multicore, or distributed concurrency.

GENRE
Computers & Internet
RELEASED
2014
July 23
LANGUAGE
EN
English
LENGTH
328
Pages
PUBLISHER
Packt Publishing
SELLER
Ingram DV LLC
SIZE
5.1
MB

Customer Reviews

frellus ,

Excellent book for Advanced Go Development

It's really hard to write a book about an evolving programming language, such as Go. Tools and libraries are constantly changing, and best practices are being developed as the community grows. As far as books to cover Go *beyond* a basic introduction, there are very few for sure, but this one you'll want to own.

Nathan focused on one of Go's most powerful features - concurrency: go routines and channels. I found the book overall highly informative and well written. It took me a few passes of the book to fully extract all the points, and I think that others coming from languages which don't lend themselves well to parallelism - such as Python, Perl and others - will have a similar experience. Programming concurrently requires you to think about problems in a very different way, and this book does an excellent job of building up the concepts and methods which are going to be important to a successful developer.

What does it cover, at a high level?
- goroutines
- channels (buffered, unbuffered)
- cross-channel communication techniques and synchronization methods
- comparison of Go synchronization to CSP (Communicating Sequential Processes) and actor models (ex. Erlang)
- design patterns for concurrency
- deadlocks and race conditions and how to avoid (and detect) them

What I highly appreciated about the book in particular:
- lots of visual examples to drive concepts of how concurrent go routines work
- touches on a *lot* of useful third-party tools and libraries for the examples (Gorilla, Heka, Memcached, MongoDB, Redis, CouchDB, Cassandra, Couchbase, fsnotify and many, many others - even Google App Engine)
- analyzation techniques and touches interesting tools/apps for Go (ex. pprof, GNUplot, Heka)

What I'd like to see / improve about the book:
- *all* the code examples to be able to re-produce any part of the work in the book (ex. I cannot find the GNUplot scripts anywhere..)
- an acronym or definitions section for easy reference (ex. CSP, C10K, "actor", etc.)
- the author should be more vocal in the community.. talks, blogs and/or online presence in general

A basic summary of the book is as follows:
Chapter 1 - An Introduction to Concurrency in Go
+ introduces goroutines and channels
+ compares how Go handles concurrency compared to other languages
Chapter 2 - Understanding the Concurrency Model
+ talks about resource allocation, channels and ‘channels of channels’
+ explains how Go manages concurrency internally with excellent visualization of concurrent routines working together
Chapter 3 - Developing a Concurrent Strategy
+ discusses how to plan out solving application problems with concurrency
+ introduces some third-party tools
Chapter 4 - Data Integrity in an Application
+ looks at issues with concurrency and data structures and how Go handles state
+ discusses how to synchronize data between different machines
Chapter 5 - Locks, Blocks, and Better Channels
+ blocking methods, building on the concepts from the prior chapters
+ discusses how you can avoid dead locks with Go
Chapter 6 - C10K - A Non-blocking Web Server in Go
+ concrete example of creating a web server with Go concurrency using everything learned in the prior chapters plus a database (MySQL)
Chapter 7 - Performance and Scalability
+ focuses on optimizing your concurrent Go code
+ builds on the web server created from Chapter 6
Chapter 8 - Concurrent Application Architecture
+ focuses on when and where to implement concurrent patterns
+ how to take advantage of advanced hardware and keeps data consistent
Chapter 9 - Logging and Testing Concurrency in Go
+ OS-specific methods for developing, tested and deploying your app
Chapter 10 - Advanced Concurrency and Best Practices
+ looks at complicated and advanced techniques for concurrency
+ discusses various testing and documentation methods

More Books by Nathan Kozyra

Mastering Go Web Services Mastering Go Web Services
2015
Go: Building Web Applications Go: Building Web Applications
2016
Go: Building Web Applications Go: Building Web Applications
2016
Learning Go Web Development Learning Go Web Development
2016
Learning Go Web Development Learning Go Web Development
2016