We may earn an affiliate commission when you visit our partners.
Deepak kumar Gunjetti

Questions that comes to all Developers is whether they are utilising the available Computing resource efficiently? 

Course Overview

The course could be divided into five parts.

  • Concurrency Primitives

  • Deep Dive into Concurrency Primitives

  • Concurrency Patterns

  • Context Package

  • Bonus Section - Interfaces

In the course we try to answer these questions.

Concurrency Primitives

Read more

Questions that comes to all Developers is whether they are utilising the available Computing resource efficiently? 

Course Overview

The course could be divided into five parts.

  • Concurrency Primitives

  • Deep Dive into Concurrency Primitives

  • Concurrency Patterns

  • Context Package

  • Bonus Section - Interfaces

In the course we try to answer these questions.

Concurrency Primitives

  • What are the limitations of Threads?

  • What are advantages of goroutines over OS threads?

  • How do we avoid race condition?

  • How Channels are used to communicate data?

  • How do we implement timeout and non-blocking communication?

  • When do we use mutex and channels?

  • How to synchronise execution of goroutines?

  • How to detect race condition in Go?

Deep Dives into Concurrency Primitives

  • How Go scheduler works?

  • How does context switching works?

  • How channel send and receive works underneath?

Concurrency Patterns

  • How to construct streaming pipelines with Goroutines and Channels?

  • How to Fan-out and Fan-in computationally intensive stages?

  • How do we avoid Goroutine Leaks?

Context Package

  • How we can propagate request scoped data and cancellation signal across API boundaries?

Coding Exercises

  • Each concept is followed by a Coding Exercise.

  • Exercises blueprint are shared on Github.

Sample Applications

We will build

  • Blueprint of web crawler.

  • Image processing pipeline.

  • HTTP Server Timeouts with Context Package.

Bonus Section - Interfaces

  • How to define common behaviour between different objects as abstract type?

  • How Interface provides an abstraction for higher level functions?

Enroll now

What's inside

Learning objectives

  • How to spin goroutines and communicate data between them.
  • How to avoid race conditions and deadlocks.
  • How to synchronize the execution of goroutines.
  • How go scheduler works.
  • How to build streaming pipelines with goroutines and channels.
  • How to propagate data across api boundary.

Syllabus

Introduction
Course Overview
Processes and Threads
Why Concurrency is hard
Read more
Goroutines
Deep Dive - Go Scheduler
Clone Coding Exercise Github Repository
Exercise-Hello
Exercise-ClientServer
WaitGroups
Exercise-WaitGroup
Goroutines & Closures
Exercise-Closure
Exercise-Closure02
Deep Dive - Go Scheduler - Context Switching due to synchronous system call
Deep Dive - Go Scheduler - Context Switching due to Asynchronous system call
Deep Dive - Go Scheduler - Work Stealing
Channels
Exercise - Channel Direction
Exercise - Channels
Range, Buffered Channels
Exercise - Range
Exercise - Buffered Channel
Channel Direction
Channel Ownership
Exercise - Channel Ownership
Deep Dive - Channels
Deep Dive - Channels - Send and Recieve
Deep Dive - Channels - Buffer full
Deep Dive - Channels - Buffer empty
Deep Dive - Channels - Unbuffer channel
Deep Dive - Channels - Summary
Select
Exercise - Select
Exercise - Timeout
Exercise - Non-blocking communication
Sync Package
Mutex
Exercise - Mutex
Atomic
Exercise - Atomic
Conditional Variable
Exercise - Conditional Variable - Signal
Exercise - Conditional Variable - Broadcast
Sync Once
Exercise - Sync Once
Sync Pool
Exercise - Sync Pool
Race Detector
Exercise - Race
Web Crawler
Web Crawler - Sequential
Web Crawler - Concurrent
Concurrency Patterns
Pipelines
Exercise - Pipelines
Fan-out & Fan-in
Exercise - Fan-out & Fan-in
Cancelling Goroutines
Exercise - Cancelling Goroutines
Image Processing Pipeline
Image Processing Sequential
Context Package
Context Package for Cancellation
Context Package as Data bag
Exercise - WithCancel
Exercise - WithDeadline
Exercise - WithTimeout
Exercise - WithValue
Context Package - Go Idioms
HTTP Server Timeouts with Context Package
Bonus Section: Interface
Interface
Interface-implicit
Interfaces from standard library
Exercise io.Writer interface
Exercise Stringer interface
Interface Satisfaction
Type Assertion
Exercise Type Assertion
Empty Interface

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Covers concurrency primitives, which are essential tools for building efficient and scalable applications, especially in networked and distributed systems
Explores Go scheduler context switching, which helps learners understand how goroutines are managed and optimized for performance
Includes coding exercises on Github, which provides learners with practical experience and reinforces their understanding of concurrency concepts
Examines race conditions and deadlocks, which are common pitfalls in concurrent programming, and teaches learners how to avoid them
Teaches the context package, which is used to propagate request-scoped data and cancellation signals across API boundaries, which is useful for building robust and maintainable applications
Uses Go, which is a modern language known for its concurrency features and performance, making it a valuable skill for developers

Save this course

Save Concurrency in Go (Golang) to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Concurrency in Go (Golang) with these activities:
Review Processes and Threads
Reinforce your understanding of fundamental concepts related to processes and threads, which are essential for grasping concurrency in Go.
Show steps
  • Review definitions of processes and threads.
  • Compare and contrast processes and threads.
  • Understand the overhead associated with each.
Read 'Go in Action' by William Kennedy
Use this book to get a more general understanding of Go, which will help you better understand the concurrency features.
View Go in Action on Amazon
Show steps
  • Obtain a copy of 'Go in Action'.
  • Read the chapters on concurrency and related topics.
  • Practice the code examples provided in the book.
Read 'Concurrency in Go' by Katherine Cox-Buday
Supplement your learning with a dedicated book on Go concurrency to gain a more in-depth understanding of the subject.
View Concurrency in Go on Amazon
Show steps
  • Obtain a copy of 'Concurrency in Go'.
  • Read the chapters relevant to the course syllabus.
  • Experiment with the code examples provided in the book.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Goroutines and Channels
Solidify your understanding of goroutines and channels by implementing small programs that utilize these concurrency primitives.
Browse courses on Goroutines
Show steps
  • Write a program that launches multiple goroutines.
  • Use channels to communicate data between goroutines.
  • Experiment with buffered and unbuffered channels.
Blog Post: Goroutine Leak Prevention
Deepen your understanding of goroutine leaks by researching and writing a blog post explaining how to prevent them.
Browse courses on Goroutines
Show steps
  • Research common causes of goroutine leaks.
  • Write a blog post explaining how to identify and prevent goroutine leaks.
  • Include code examples to illustrate your points.
Build a Concurrent Web Server
Apply your knowledge of concurrency in Go by building a simple web server that handles multiple requests concurrently.
Browse courses on Web Server
Show steps
  • Design the architecture of your web server.
  • Implement the server using goroutines and channels.
  • Test your server with multiple concurrent clients.
Contribute to a Go Project
Gain practical experience by contributing to an open-source Go project that utilizes concurrency.
Browse courses on Go
Show steps
  • Find an open-source Go project on GitHub.
  • Identify an issue related to concurrency.
  • Submit a pull request with your solution.

Career center

Learners who complete Concurrency in Go (Golang) will develop knowledge and skills that may be useful to these careers:
Backend Developer
Backend Developers are responsible for server-side logic, databases, and APIs. This course directly addresses the needs of a backend developer who is building high-performance concurrent systems. The course provides a strong understanding of concurrency primitives, such as goroutines and channels, allowing a backend developer to build efficient and scalable servers. The knowledge of synchronization, avoiding race conditions, and the use of the context package for managing request-scoped data and cancellations adds significant value. A backend developer should take this course to learn how to manage concurrency, understand the go scheduler, and build streaming pipelines.
Software Engineer
A Software Engineer often needs to write efficient and concurrent code, making this course highly relevant. This role involves designing, developing, and maintaining software applications. A key aspect of this is handling concurrent processes, which this course addresses directly by teaching how to use goroutines and channels to communicate data, avoid race conditions, and synchronize execution. A software engineer who understands these concepts can build more robust and performant applications. The course's exploration of concurrency primitives, scheduler mechanics and pipeline construction will help a software engineer write more efficient code. In particular, the course helps in the creation of streaming pipelines with goroutines and channels, as well as use of the context package.
Cloud Engineer
Cloud Engineers design, implement, and manage cloud infrastructure and services. This course is valuable to a cloud engineer role because they often need to work with concurrent systems. The course provides insight into how to leverage goroutines and channels for efficient parallel processing and data handling, allowing them to build modern, scalable cloud solutions. The course's coverage of the context package also prepares one to handle request-scoped data and cancellation signals. Understanding how the Go scheduler works helps tune performance. A cloud engineer should take this course, in order to master techniques of concurrent programming as well as pipeline construction.
Performance Engineer
Performance Engineers focus on optimizing the speed and efficiency of software applications. This course will help a performance engineer as it offers an in depth look into the mechanisms of concurrency. It covers primitives, the Go scheduler, and methods for synchronizing goroutines. The course teaches how to build pipelines with goroutines and channels, which is a key part of writing high performing systems. The knowledge of how to avoid race conditions and deadlocks helps improve stability. A performance engineer would be wise to take this course as it covers fundamental techniques they will need to know.
Systems Programmer
A Systems Programmer works on the core components of operating systems and low-level software. This course helps a Systems Programmer understand concurrency at a deeper level. This course will help a systems programmer as it delves into the Go scheduler, context switching, and communication primitives such as channels. The course also provides instruction on how to avoid race conditions and deadlocks as well as how to synchronize goroutines. Furthermore, building streaming pipelines and using the context package are skills which will help a systems programmer. Given these points, this course is highly relevant for a career as a systems programmer.
DevOps Engineer
A DevOps Engineer is responsible for automating and optimizing software development lifecycles, and this course can be very relevant. A devops engineer needs to be able to create efficient, performant, and scalable solutions, and concurrent systems are essential to this. The course provides hands-on knowledge of concurrency primitives, such as goroutines and channels, and their application in building pipelines. The course's exploration of the context package also helps in managing request-scoped data and cancellation signals, which many systems require. The course covers the mechanisms of the Go scheduler, and provides instruction in race detection. A DevOps engineer should take this course, to learn the nuts and bolts of concurrency.
API Developer
API Developers design and implement application programming interfaces, and a good understanding of concurrency is critical to this role. The course's focus on concurrency primitives such as goroutines and channels will provide an API developer with key skills for building high performance APIs. The lessons on the context package, which allow you to scope data and cancellation signals, will help create maintainable APIs. The course teaches how to avoid race conditions and deadlocks as well as how to synchronize goroutines. This course will help an API developer build well-performing systems.
Site Reliability Engineer
A Site Reliability Engineer ensures the reliability and scalability of systems and services, which often requires a deep understanding of concurrency. A Site Reliability Engineer will find that this course provides a very valuable skillset. The course's discussion of goroutines and channels helps in managing concurrent processes, while the context package enables them to handle request scoped data and cancellation signals. In addition, the course goes into depth on the Go scheduler, which will help the SRE to tune the performance of applications. An SRE will find the course beneficial in understanding how to scale applications, and maintain them.
Data Engineer
Data Engineers are responsible for building and maintaining data pipelines, a task where concurrency skills are useful. This course will help a data engineer to build more robust data processing systems. The course covers how to construct streaming pipelines with goroutines and channels which is exactly the sort of tool which a data engineer might use. It also gives a deep understanding of primitives and how to avoid race conditions. The context package section is also useful to manage data flow. A data engineer who should take this course because it will help them write code that scales.
Embedded Systems Engineer
Embedded Systems Engineers work on resource-constrained environments where concurrency is often critical. This course may be useful since it introduces key concurrency concepts, such as goroutines, channels, and synchronization, which are essential for efficient multitasking in embedded systems. The course's deep dive into the Go scheduler, context switching, and communication between goroutines helps in optimizing system performance. Although this course is not targeted specifically to embedded systems, the fundamentals of concurrency apply. An embedded systems engineer will find this course useful to learn concurrency techniques.
Network Programmer
Network Programmers work on software that manages network communication and concurrency. This course may be useful to a network programmer. The course covers how to spin goroutines and manage communication between them. It dives deep into the Go scheduler. It also teaches how to avoid race conditions and deadlocks. The course also covers the context package, a useful tool for managing network connections. Although this course isn't targeted specifically to network programming, the fundamental knowledge is highly relevant. A network programmer should take this course in order to improve their knowledge of concurrency.
Game Engine Developer
Game Engine Developers often need to handle concurrency to improve performance and responsiveness within games. This course may be helpful since it teaches about the Go scheduler, the nature of goroutines, and how to construct streaming pipelines. The course's exploration of concurrency primitives such as channels and mutexes, as well as the context package, may be valuable. Although games are typically not written in Go, the course teaches fundamental concurrency concepts which apply to game engines. A game engine developer may find this course gives them a solid theoretical foundation in concurrency.
Robotics Engineer
A Robotics Engineer working on software for robots may find this course useful. It may be helpful in situations which require concurrent processing of data streams. The course covers fundamental topics, such as goroutines, channels, and synchronization, that could be useful in this domain. The course's deep dive into the Go scheduler, context switching, and communication between goroutines may be relevant. Although this course does not specifically cover robotics, the techniques for using concurrency are valuable in that field. This course may be useful to a robotics engineer who needs to write concurrent code.
Research Scientist
A Research Scientist in computing may find that certain aspects of this course are relevant. A research scientist who is working on computationally intensive work will benefit from learning how to use goroutines and channels to parallelize computation. The course provides hands-on knowledge of concurrency primitives, such as goroutines and channels. It also discusses the context package and how to propagate data across API boundaries. Moreover, the course dives into the Go scheduler. Many of the techniques taught in the course can be helpful in implementing research ideas. A research scientist may benefit from the content of the course.
Mobile Application Developer
Mobile Application Developers build applications for mobile devices. While this course focuses on concurrency in Go, the principles of managing concurrent processes may be useful. The course covers how to spin goroutines and manage communication, how to avoid race conditions and deadlocks, and how to synchronize execution. It also explores how to build streaming pipelines, and use the context package. While mobile apps are typically written in another language, a mobile application developer who understands the theory of concurrency may find it useful in their work. Thus this course may be useful in a mobile application developer's work.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Concurrency in Go (Golang).
Provides a comprehensive guide to concurrency in Go, covering topics such as goroutines, channels, and synchronization primitives. It serves as an excellent companion to the course, offering deeper insights and practical examples. The book is commonly used by Go developers to understand and implement concurrent systems. It expands on the course material by providing real-world use cases and advanced concurrency patterns.
Provides a practical introduction to the Go programming language, including its concurrency features. It's helpful for solidifying your understanding of Go syntax and best practices. While not solely focused on concurrency, it provides a solid foundation for understanding the language features used in concurrent programming. This book is valuable as additional reading to reinforce the fundamentals of Go.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser