LibCoder

Concurrency in Go: Tools and Techniques for Developers

1C Agda Go
Concurrency in Go: Tools and Techniques for Developers
Дата выхода: 2017
Издательство: O’Reilly Media, Inc.
Количество страниц: 238
Размер файла: 1,7 МБ
Тип файла: PDF
Добавил: LibCoder
Оглавление
 Copyright....4 Table of Contents....7 Preface....9 Who Should Read This Book....10 Navigating This Book....10 Online Resources....11 Conventions Used in This Book....12 Using Code Examples....12 O’Reilly Safari....12 How to Contact Us....13 Acknowledgments....13 Chapter 1. An Introduction to Concurrency....15 Moore’s Law, Web Scale, and the Mess We’re In....16 Why Is Concurrency Hard?....18 Race Conditions....18 Atomicity....20 Memory Access Synchronization....22 Deadlocks, Livelocks, and Starvation....24 Determining Concurrency Safety....32 Simplicity in the Face of Complexity....34 Chapter 2. Modeling Your Code: Communicating Sequential Processes....37 The Difference Between Concurrency and Parallelism....37 What Is CSP?....40 How This Helps You....43 Go’s Philosophy on Concurrency....45 Chapter 3. Go’s Concurrency Building Blocks....51 Goroutines....51 The sync Package....61 WaitGroup....61 Mutex and RWMutex....63 Cond....66 Once....71 Pool....73 Channels....78 The select Statement....92 The GOMAXPROCS Lever....97 Conclusion....97 Chapter 4. Concurrency Patterns in Go....99 Confinement....99 The for-select Loop....103 Preventing Goroutine Leaks....104 The or-channel....108 Error Handling....111 Pipelines....114 Best Practices for Constructing Pipelines....118 Some Handy Generators....123 Fan-Out, Fan-In....128 The or-done-channel....133 The tee-channel....134 The bridge-channel....136 Queuing....138 The context Package....145 Summary....159 Chapter 5. Concurrency at Scale....161 Error Propagation....161 Timeouts and Cancellation....169 Heartbeats....175 Replicated Requests....186 Rate Limiting....188 Healing Unhealthy Goroutines....202 Summary....208 Chapter 6. Goroutines and the Go Runtime....211 Work Stealing....211 Stealing Tasks or Continuations?....218 Presenting All of This to the Developer....226 Conclusion....226 Appendix A. Appendix....227 Anatomy of a Goroutine Error....227 Race Detection....228 pprof....230 Index....233 About the Author....238 Colophon....238

Описание

Ниже — практический обзор по теме «concurrency».

Concurrency can be notoriously difficult to get right, but fortunately, the Go open source programming language makes working with concurrency tractable and even easy. If you're a developer familiar with Go, this practical book demonstrates best practices and patterns to help you incorporate concurrency into your systems.

You'll understand how Go chooses to model concurrency, what issues arise from this model, and how you can compose primitives within this model to solve problems. Author Katherine Cox-Buday takes you step-by-step through the process. Learn the skills and tooling you need to confidently write and implement concurrent systems of any size.

Understand how Go addresses fundamental problems that make concurrency difficult to do correctlyLearn the key differences between concurrency and parallelismDig into the syntax of Go's memory synchronization primitivesForm patterns with these primitives to write maintainable concurrent codeCompose patterns into a series of practices that enable you to write large, distributed systems that scaleLearn the sophistication behind goroutines and how Go's runtime stitches everything together

На этом основные моменты по теме закрыты.

concurrency this patterns into systems model write that

Частые вопросы

Можно ли скачать «Concurrency in Go: Tools and Techniques for Developers» бесплатно?

Да, «Concurrency in Go: Tools and Techniques for Developers» доступна для бесплатного скачивания на нашем сайте в формате PDF. Ссылка на файл находится на этой странице.

В каком формате и какого размера файл?

Книга предоставляется в формате PDF, размер файла 1,7 МБ.

Кто автор и когда вышла книга?

автор — Cox-Buday Katherine, издательство O’Reilly Media, Inc., год выпуска 2017, 238 страниц.

О чём книга «Concurrency in Go: Tools and Techniques for Developers»?

Concurrency can be notoriously difficult to get right, but fortunately, the Go open source programming language makes working with concurrency tractable and even easy.

Похожие материалы