
This video will give you an overview about the course.
In this video, we will get a brief introduction to concurrency and parallelism.
• Discuss what sequential programming is and its problems
• Learn how concurrency can be used as a solution
• Learn about parallelism and how it is useful
In this video, we will learn how concurrency improves scalability.
• Discuss sequential scaling problems
• Learn how things can be improved using Concurrency
In this video, we examine the performance benefits of concurrency.
• Discuss CPU underutilization and latency issues
• Learn how concurrency enables parallelism and more efficient CPU utilization
In this video, we look at the reliability implications of concurrency.
• Discuss error handling and retrying in sequential programs
• Learn how concurrent architecture can be easily integrated with error handling
In this video, we examine how concurrent Go code can be maintained easily.
• Discuss how code becomes unmaintainable
• Learn how concurrent architecture and Go enable maintainable software
Presents a quick review of the Go language.
• Build a Hello World program
• Build a Lucasoid recursive function
Shows how to use the go keyword to create concurrent processes.
• Try to make a concurrent Hello World program
• Fix the Hello World program
• Make the Lucasoid program concurrent
Examines and demonstrates how to share memory between Goroutines.
• Goroutines are desyncronized and can’t communicate
• Pass a pointer to a WaitGroup and use it to sync
Sharing memory can be dangerous, but we need to communicate.
• Create channels to communicate with Goroutines
• Use the Select statement on many channels
Sometimes we need to queue work without waiting for it to be done.
• Explain the concept of a buffered channel
• Use buffered channels to rapidly get many websites
• Demonstrate how the number of worker Goroutines determines efficiency
It can be hard to synchronize Goroutines when using Non-Blocking channels.
• Build a simulated concurrent application
• Synchronize its workers using the close operation on nonblocking channels
Concurrency is expensive and difficult in many languages, but not in Go.
• Explain why M:N concurrency makes it cheap
• Explain why the standard library and language make it easy
Take a look into the theory behind Data Parallelism
• Learn that each piece of problem can be processed seperately
• Devise a stepwise implementation plan to see its effectiveness
Introduce a problem and discuss its data-parallel qualities.
• Introduce the barycenter problem
• Discuss why it is data parallel
• Decide on an algorithm to use for solving it
Implement a non-concurrent solution to the data parallel barycenter problem.
• Create a program to generate random bodies
• Load those bodies from a file into memory
• Find the barycenter of those loaded bodies
Modify the non-concurrent program to be concurrent and much faster
• Determine which parts can be made concurrent
• Concurrent-ize the loading and parsing
• Concurrent-ize the actual computation
Understand how much faster the concurrent version is and why.
• Determine how much performance was gained
• Determine where the overhead came from
• Remember to always measure your optimizations
Determine the definition of I/O concurrency and how it applies to programming.
• Define I/O concurrency
• Go through applications examples
Design and build a client for Reddit and HackerNews.
• Design the Reddit/HackerNews client
• Program the Reddit/HackerNews client
The Reddit/HN client is slow; how can we make it faster?
• Look at slow points in the program
• Determining how to concurrentize this program
The Reddit/HN client is not concurrent. We will modify it to be concurrent.
• Building concurrent input routines
• Building concurrent output routines
• Connecting the concurrent routines
Testing is hard, but less hard with I/O concurrency.
• Discussing how I/O concurrency makes it easier to test
• Discussing examples of easier testing
Define the term task parallelism and discuss applications.
• Define task parallelism
• Talk about applications
Motivate the use of task parallelism.
• Discuss the Apache webserver design
• Examine the SlowLoris vulnerability
• Talk about how task concurrency mitigates this issue
Design a Reddit and HackerNews search engine.
• Discuss the requirements for a search engine
• Determine how to implement at web server in Go
• Determine how to integrate the Hacker News and Reddit client
Build a search engine for static content.
• Create a searching function
• Create a function to list stories
• Hook them up to net/http and run them
Hooking up the search engine to the Reddit and HackerNews client.
• Paste in the existing Reddit and HackerNews client code
• Hook up the Reddit and HackerNews client to the web server
Discuss the advantages and disadvantages of task parallel design.
• Revisit the advantages of task parallelism
• Examine the disadvantages of task parallelism
• Correlate these into a cohesive engineering tradeoff
Defining the term concurrent architecture.
• Determine what concurrent architecture is
• Discuss the benefits briefly
Determine how data parallelism fits into concurrent architecture.
• Review data parallelism
• Examine how it fits into a concurrent program
Determine how I/O concurrency fits into a concurrent architecture.
• Overview why I/O concurrency is central
• Walk through an example of I/O concurrency in a concurrent program
• Examine why a non-I/O-concurrent program would fail
Determine how task parallelism fits into a concurrent architecture.
• Overview how I/O concurrency is important
• Examine situations where task parallelism is appropriate
Look at when concurrent architecture is and isn’t a good idea.
• Examine the advantages of concurrent architecture
• Examine the disadvantages of concurrent architecture
• Emphasize that concurrent architecture is an engineering tradeoff
Determine how to implement concurrent architecture.
• Examine opportunities for I/O concurrency
• Figure out how to incorporate task and data parallelism
• Connect concurrent sub-units with channels and flow control
This course presents you a hands-on look at creating concurrent and parallel programs using the Go programming language. From a blazing-fast garbage-collected memory model to effortless, lightweight Goroutines to speedy communication using in-memory channels, Go makes powerful concurrency primitives available which are unparalleled in other languages. This course provides you with both the theoretical and practical knowledge you will need to apply them to your own software.
This course covers the basics of concurrency and parallelism in Go, along with in-depth looks at the three types of concurrent and parallel program models and an introduction to concurrent architecture. This course will show you the multitude of tools available in Go for implementing concurrent systems, including goroutines, blocking channels, buffered channels, and non-blocking in-memory communication.You will build multiple concurrent applications and examine the benefits and drawbacks of the various concurrency options available.
By the end of the course, you will be able to rapidly and confidently identify concurrent and parallel problems and apply the Go language concurrency constructs to solve them.
About the Author
Leo Tindall is a software developer and hacker from San Diego whose interests include scalability, parallel software, and machine learning.