Nathan Kozyra is a veteran programmer and manager of development teams. Experienced in C++, Perl, and Python, he quickly latched on to Google's Go language and its elegance following its initial release. He is presently the CTO at Pointslocal, and previously spent more than a decade developing publishing tools and solutions for various stalwarts in the newspaper and Internet industries.
Mastering Concurrency in Goby Nathan Kozyra
The Internet and systems programming have experienced rapid growth spurts over the last few decades. As a result, programming methodologies and models have trailed behind hardware in maturity, until a swarm of new languages brought a focus on high performance and scalability through the utilization of concurrency. Google's Go brings a familiar yet simple syntax and
The Internet and systems programming have experienced rapid growth spurts over the last few decades. As a result, programming methodologies and models have trailed behind hardware in maturity, until a swarm of new languages brought a focus on high performance and scalability through the utilization of concurrency. Google's Go brings a familiar yet simple syntax and approach to a very fast, compiled language. It is a general purpose programming language used predominantly in production environments for programming and developing networks and web scale systems. Concurrent programming is a form of computing whereby independently executing computations are designed to interact with each other and can be run on one processor or in parallel on multi-core processors. Concurrency is the major integrated feature of Go and the fundamental programming method which all Go programmers need to understand how to implement.
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 for understanding Go's powerful concurrency focus.
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 of the book, 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.
- Packt Publishing
- Publication date:
- Product dimensions:
- 7.50(w) x 9.25(h) x 0.69(d)
Meet the Author
Most Helpful Customer Reviews
See all customer reviews
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