Mastering Concurrency in Go
By Nathan Kozyra
Publisher: Packt Publishing
Final Release Date: July 2014
Pages: 328

In Detail

This book will take you through the history of concurrency, how Go utilizes it, how Go differs from other languages, and the features and structures of Go's concurrency core. Each step of the way, the book will present real, usable examples with detailed descriptions of the methodologies used. By the end, you will feel comfortable designing a safe, data-consistent, high-performance concurrent application in Go.

The focus of this book is on showing you how Go can be used to program high-performance, robust concurrent programs with Go's unique form of multithreading, which employs goroutines that communicate and synchronize across channels. Designed for any curious developer or systems administrator with an interest in fast, non-blocking, and resource-thrifty systems applications, this book is an invaluable resource to help you understand Go's powerful concurrency focus.

Approach

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.

Who this book is for

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.

Product Details
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyMastering Concurrency in Go
 
5.0

(based on 1 review)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 1 customer

Displaying review 1

Back to top

 
5.0

Learning Concurrency in Go is Essential

By frellus

from Santa Clara, CA

About Me Developer

Verified Reviewer

Pros

  • Accurate
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate

    Comments about oreilly Mastering Concurrency in Go:

    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

    Displaying review 1

    Back to top

     
    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Ebook: $30.99
    Formats:  ePub, Mobi, PDF