1 option
practical concurrency and parallelism for Go applications Distributed computing with Go / V. N. Nikhil Anurag.
- Format:
- Book
- Author/Creator:
- Anurag, V. N. Nikhil, author.
- Language:
- English
- Subjects (All):
- Go (Computer program language).
- Physical Description:
- 1 online resource (229 pages) : illustrations
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham, [England] ; Mumbai, [India] : Packt Publishing, 2018.
- Biography/History:
- Nikhil Anurag V. N. : V. N. Nikhil Anurag is a Go developer currently working in Berlin. He speaks at conferences about how to use Go in domains such as Concurrency, file systems, and distributed systems. He is also trying to bridge the gap between the rich literature on concurrency and the practice of programming goroutines and channels. He did his Bachelor's in Electronics and Instrumentation Engineering from JNTU, India and Master of Science in Control System from University of Sheffield, UK.
- Summary:
- To learn all of Go, a developer has to be conversant with Go concurrency and parallelism in theory and practice. Distributed Computing with Go takes the reader from concurrency using Goroutines and Channels to the full range of web and cloud environments where Go applications are usually deployed. Concurrency achieves scalability and.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Table of Contents
- Preface
- Chapter 1: Developer Environment for Go
- GOROOT
- GOPATH
- src/
- pkg/
- bin/
- Package management
- go get
- glide
- go dep
- Structuring a project
- Working with book's code
- Containers
- Docker
- Docker versus Virtual Machine (VM)
- Understanding Docker
- Testing Docker setup
- Dockerfile
- main.go
- Testing in Go
- variadic.go
- variadic_test.go
- Running tests in variadic_test.go
- addInt.go
- addInt_test.go
- Running tests in addInt_test.go
- nil_test.go
- Running tests in nil_test.go
- Summary
- Chapter 2: Understanding Goroutines
- Concurrency and parallelism
- Concurrency
- Code overview
- Serial task execution
- Serial task execution with goroutines
- Concurrent task execution
- Parallelism
- Go's runtime scheduler
- Goroutine
- OS thread or machine
- Context or processor
- Scheduling with G, M, and P
- Gotchas when using goroutines
- Single goroutine halting the complete program
- Goroutines aren't predictable
- Chapter 3: Channels and Messages
- Controlling parallelism
- Distributed work without channels
- Distributed work with channels
- What is a channel?
- Solving the cashier problem with goroutines
- Channels and data communication
- Messages and events
- Types of channels
- The unbuffered channel
- The buffered channel
- The unidirectional buffer
- Closing channels
- Multiplexing channels
- Chapter 4: The RESTful Web
- HTTP and sessions
- A brief history of HTTP
- HTTP sessions
- The REST protocol
- The server and client architecture
- The standard data format
- Resources
- Reusing the HTTP protocol
- GET
- POST
- PUT and PATCH
- DELETE
- Upgradable components
- Fundamentals of a REST server
- A simple web server.
- Designing a REST API
- The data format
- The book resource
- GET /api/books
- GET /api/books/<
- id>
- POST /api/books
- PUT /api/books/<
- DELETE /api/books/<
- Unsuccessful requests
- Design decisions
- The REST server for books API
- books-handler/common.go
- books-handler/actions.go
- books-handler/handler.go
- How to make REST calls
- cURL
- PUT
- Postman
- net/http
- Chapter 5 : Introducing Goophr
- What is Goophr?
- Design overview
- OpenAPI specification
- Goophr Concierge API definition
- Goophr Librarian API definition
- Project structure
- Chapter 6 : Goophr Concierge
- Revisiting the API definition
- Document feeder - the REST API endpoint
- Query handler - the REST API endpoint
- Conventions
- Code conventions
- Diagram conventions
- Logical flow diagrams
- The doc processor
- The doc store
- The index processor
- The line store
- The consolidated flow diagram
- Queue workers
- Single stores
- Buffered channels
- The Concierge source code
- Running tests
- The Concierge server
- Chapter 7 : Goophr Librarian
- The standard indexing model
- An example - books with an index of words
- The inverted indexing model
- An example - the inverted index for words in books
- Ranking
- The document indexer - the REST API endpoint
- The query resolver - the REST API endpoint
- Librarian source code
- common/helpers.go
- api/index.go
- api/query.go
- Testing Librarian
- Testing feeder.go using /api/index
- Testing /api/query
- Chapter 8 : Deploying Goophr
- Updating Goophr Concierge
- Handle multiple Librarians
- Aggregated search results
- Orchestrating with docker-compose.
- Environment variables and API ports
- The file server
- The Goophr source code
- librarian/main.go
- concierge/main.go
- concierge/api/query.go
- simple-server/Dockerfile
- simple-server/main.go
- docker-compose.yaml
- .env
- Running Goophr with docker-compose
- Adding documents to Goophr
- Searching for keywords with Goophr
- Search - "apple
- Search - "cake
- Search - "apple", "cake
- Individual logs with docker-compose
- Authorization on a web server
- secure/secure.go
- secure/secure_test.go
- Test results
- Chapter 9 : Foundations of Web Scale Architecture
- Scaling a web application
- The single server instance
- Separate layers for the web and database
- Multiple server instances
- The load balancer
- Multi-availability zones
- The database
- SQL versus NoSQL
- Which type of database should we use?
- Database replication
- Master-replica replication
- Master-master replication
- Failover cluster replication
- Monolith versus microservices
- Mediator design pattern
- Deployment options
- Maintainability of multiple instances
- Other Books You May Enjoy
- Index.
- Notes:
- "Expert Insight"--Cover.
- Includes index.
- Description based on online resource; title from PDF title page (EBC, viewed March 22, 2018).
- ISBN:
- 9781787127708
- 1787127702
- OCLC:
- 1463580538
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.