Index
A
- AB, Apache
- actor model
- and CSP, difference between / Go and the actor model
- Add() function / Handling errors and logging
- Add() method / A patient goroutine
- addToScrapedText function / Building a web spider using goroutines and channels
- Apache server
- disadvantages / Failing of servers at 10,000 concurrent connections
- Apache Zookeeper
- URL / Circuit
- App Engine
- using / Using the App Engine
- benefits / Using the App Engine
- URL / Using the App Engine
- appengine/aetest
- about / Using Google App Engine
- appengine/log
- about / Using Google App Engine
- appengine/mail
- about / Using Google App Engine
- appengine/memcache
- about / Using Google App Engine
- appengine/search
- about / Using Google App Engine
- appengine/urlfetch
- about / Using Google App Engine
- appengine/user
- about / Using Google App Engine
- appengine/xmpp
- about / Using Google App Engine
- applicationStatus variable / Building a web spider using goroutines and channels
- assembly
- used, in Go / Getting even lower – assembly in Go
- asynchronous goroutine
- versus synchronous goroutine / Synchronous versus asynchronous goroutines
- atomic consistency / mutual exclusion / Atomic consistency / mutual exclusion
B
- backup function / Backing up our files
- backup process, concurrent application
- behavior-driven development (BDD) / Ginkgo and Gomega
- best practices, Go
- utilizing / Utilizing best practices
- code, structuring / Structuring your code
- code, documenting / Documenting your code
- code availability, via go get / Making your code available via go get
- bidirectional channel
- Blocking method 1
- serial channel, listening / Blocking method 1 – a listening, waiting channel
- Blocking method 2
- select statement, using / Blocking method 2 – the select statement in a loop
- Blocking method 3
- network connections / Blocking method 3 – network connections and reads
- reads / Blocking method 3 – network connections and reads
- blocking methods
- in Go / Understanding blocking methods in Go
- Blocking method 1 / Blocking method 1 – a listening, waiting channel
- Blocking method 2 / Blocking method 2 – the select statement in a loop
- blocking web server
- benchmarking against / Benchmarking against a blocking web server
- Body variable
- broadcast function / Type 2 – mesh
- buffered channel / Buffered or unbuffered channels
- bus topology
- about / Other topologies
- advantage / Other topologies
- disadvantages / Other topologies
C
- C
- implementing / Getting low – implementing C
- C10K
- attacking, concurrent connections used / Using concurrency to attack C10K
- C10K problem
- handling / Attacking the C10K problem
- servers, failing at concurrent connections / Failing of servers at 10,000 concurrent connections
- concurrency used, to attack C10K / Using concurrency to attack C10K
- another approach / Taking another approach
- C10K web server
- building / Building our C10K web server
- blocking web server, benchmarking against / Benchmarking against a blocking web server
- requests, handling / Handling requests
- requests, routing / Routing requests
- call graph
- about / Getting deeper into pprof
- Cassandra
- CDNs (Content Delivery Networks) / Building our C10K web server
- cgo
- memory space / Touching memory in cgo
- structure / The structure of cgo
- channels
- implementing / Implementing channels
- letter capitalization / Channel-based sorting at the letter capitalization factory
- goroutines, cleaning / Cleaning up our goroutines
- unbuffered channel / Buffered or unbuffered channels
- buffered channel / Buffered or unbuffered channels
- select statement, using / Using the select statement
- used, for building web spider / Building a web spider using goroutines and channels
- data types, sending via / Sending more data types via channels
- function channel, creating / Creating a function channel
- interface channel, using / Using an interface channel
- structs, using / Using structs, interfaces, and more complex channels
- interfaces, using / Using structs, interfaces, and more complex channels
- complex channels, using / Using structs, interfaces, and more complex channels
- creating, of channels / Creating channels of channels
- best practices / Going beyond the basics with channels
- timing out with / Timing out with channels
- checkServerStatus() method
- about / Building workers
- client
- about / The net package – a chat server with interfaced channels
- examining / Examining our client
- Client struct / Detecting file changes
- close() method / Cleaning up goroutines
- closure
- working / Closures and goroutines
- code
- structuring / Structuring your code
- documenting / Documenting your code
- code availability
- via go get / Making your code available via go get
- command-line file revision process, concurrent application
- about / Reverting a file's history – command line
- Go, using in daemons / Using Go in daemons and as a service
- Communicating Sequential Processes (CSP) / Buffered or unbuffered channels
- complex channels
- complex concurrency
- efficiency, applying in / Applying efficiency in complex concurrency
- concurrency
- visualizing / Visualizing concurrency
- using / Using concurrency
- impacting, on I/O pprof / Parallelism's and concurrency's impact on I/O pprof
- concurrent application
- designing / Designing our concurrent application
- file listener / Designing our concurrent application
- web-CLI interface / Designing our concurrent application
- backup process / Designing our concurrent application
- requisites, identifying / Identifying our requirements
- NoSQL, using / Using NoSQL as a data store in Go
- filesystem changes, monitoring / Monitoring filesystem changes
- log files, managing / Managing logfiles
- configuration files, handling / Handling configuration files
- file changes, detecting / Detecting file changes
- files, backing up / Backing up our files
- web interface, designing / Designing our web interface
- command-line file revision process / Reverting a file's history – command line
- ommand-line file revision process / Reverting a file's history – command line
- server health, checking / Checking the health of our server
- concurrent code
- stack traces, catching with / Catching stack traces with concurrent code
- concurrent connections
- servers, failing at / Failing of servers at 10,000 concurrent connections
- used, to attack C10K / Using concurrency to attack C10K
- concurrent operations
- synchronizing / Synchronizing our concurrent operations
- concurrent pattern
- visualizing / Visualizing a concurrent pattern
- concurrent patterns
- used, for building load balancer / Building a load balancer with concurrent patterns
- configuration files, concurrent application
- handling / Handling configuration files
- conn.Read() function / The net package – a chat server with interfaced channels
- connection
- mitigating / Timing out and moving on
- consistency
- need for / Importance of consistency
- consistency models
- about / Some common consistency models
- DSM / Distributed shared memory
- first-in-first-out (PRAM) / First-in-first-out – PRAM
- master-slave model / Looking at the master-slave model
- producer-consumer problem / The producer-consumer problem
- leader/follower model / Looking at the leader-follower model
- atomic consistency / mutual exclusion / Atomic consistency / mutual exclusion
- release consistency model / Release consistency
- coroutines
- versus goroutines / Understanding goroutines versus coroutines
- about / Understanding goroutines versus coroutines
- Couchbase
- about / Couchbase
- features / Couchbase
- data store, setting up / Setting up our data store
- CouchDB
- cpart.c
- about / The other way around
- cpuprofile flag / Pprof – yet another awesome tool
- CSP
- about / A little bit about CSP
- dining philosophers problem / The dining philosophers problem
- and actor model, difference between / Go and the actor model
- currentTime variable / Getting deeper with mutexes and sync
- customRouter
- serveStatic()$$ read function / Routing requests
D
- /dynamic/[request][number] / Building our C10K web server
- daemontools / Using Go in daemons and as a service
- data
- locking, sync package used / Using sync and mutexes to lock data
- locking, mutex used / Using sync and mutexes to lock data
- data types
- sending, via channels / Sending more data types via channels
- deadlocks
- handling / Handling deadlocks and errors
- debugging
- LiteIDE, used for / Using the LiteIDE for richer and easier debugging
- defer control mechanism
- implementing / Implementing the defer control mechanism
- Go's scheduler, using / Using Go's scheduler
- system variables, using / Using system variables
- DELAY_INCREMENT value
- about / Building workers
- DELETE syntax / CouchDB
- Dial function / Blocking method 3 – network connections and reads
- dining philosophers problem / The dining philosophers problem
- direct messages
- handling / Handling direct messages
- Distributed Go
- about / Distributed Go
- topology types / Types of topologies
- distributed Go
- about / Distributed Go
- Done() command / An RSS reader with self diagnostics
- draw2d
- driver libraries, MySQL
- Go-MySQL-Driver / Connecting to MySQL
- MyMySQL / Connecting to MySQL
- DSM / Distributed shared memory
E
- efficiency
- applying, in complex concurrency / Applying efficiency in complex concurrency
- endpoint patterns
- entrypoint/register/{name} / Endpoints
- entrypoint/schedule/{name}/{time} / Endpoints
- entrypoint/viewusers / Endpoints
- error handling
- about / Handling errors and logging
- errors, sending to screen / Sending errors to screen
- errors, logging to file / Logging errors to file
- errors, logging to memory / Logging errors to memory
- errors
- handling / Handling deadlocks and errors
- sending, to screen / Sending errors to screen
- logging, to file / Logging errors to file
- logging, to memory / Logging errors to memory
- evalMessageRecipient function / Handling direct messages
- evaluateStatus function / Building a web spider using goroutines and channels
- Execute() method / Parsing our template
- external dependencies
- MySQL, connecting / Connecting to MySQL
F
- file
- errors, logging to / Logging errors to file
- file changes, concurrent application
- detecting / Detecting file changes
- sending, to clients / Sending changes to clients
- records, checking against Couchbase / Checking records against Couchbase
- file listener, concurrent application
- files
- working with / Working with files
- files, concurrent application
- backing up / Backing up our files
- filesystem changes, concurrent application
- monitoring / Monitoring filesystem changes
- first-in-first-out (PRAM) / First-in-first-out – PRAM
- fsnotify / Monitoring filesystem changes
- functionality, Go
- panicking / Panicking
- recovering / Recovering
- function channel
- creating / Creating a function channel
G
- --gif flag / Pprof – yet another awesome tool
- --gv flag / Pprof – yet another awesome tool
- garbage collection
- used, in Go / Garbage collection in Go
- gcfg
- generateHash() function / Reverting a file's history – command line
- getArticle function / Exploring our web server
- getFileDetails() method / Recovering
- getLetters function / Using the select statement
- Get method / Imposing a timeout
- GET syntax / CouchDB
- Ginkgo
- about / Ginkgo and Gomega
- URL / Ginkgo and Gomega
- gnuplot
- Go
- polymorphism, demonstrating in / Demonstrating simple polymorphism in Go
- assembly, using / Getting even lower – assembly in Go
- drawback / Getting even lower – assembly in Go
- blocking methods, using / Understanding blocking methods in Go
- maps, using / Using structs, interfaces, and more complex channels
- structs, using / Using structs, interfaces, and more complex channels
- Pprof tool / Pprof – yet another awesome tool
- performance / High performance in Go
- pprof tool / Getting deeper into pprof
- parallelism impact, on I/O pprof / Parallelism's and concurrency's impact on I/O pprof
- concurrency impact, on I/O pprof / Parallelism's and concurrency's impact on I/O pprof
- garbage collection, using / Garbage collection in Go
- NoSQL, using / Using NoSQL as a data store in Go
- stack traces, catching with concurrent code / Catching stack traces with concurrent code
- used, with unit testing / Using Go with unit testing
- Check / GoCheck
- Ginkgo / Ginkgo and Gomega
- mega / Ginkgo and Gomega
- go$ngine
- Go' circuit
- Go's scheduler
- using / Using Go's scheduler
- Go-MySQL-Driver
- URL / Connecting to MySQL
- Go-SDL
- GoCheck
- godoc
- using / Documenting your code
- godoc command / Documenting your code
- GoFlow
- go get command / Designing the web server plan, RSS in action
- GOMAXPROCS
- about / Managing threads
- Gomega
- about / Ginkgo and Gomega
- gomemcache interface
- URL / Using memcached
- Google App Engine
- using / Using Google App Engine
- packages / Using Google App Engine
- gopart.go
- about / The other way around
- GOPATH
- about / Designing the web server plan
- Gorilla toolkit
- URL / Web server
- about / The Gorilla toolkit
- goroutine logs
- starting / Breaking out goroutine logs
- goroutines
- about / Introducing goroutines, Understanding goroutines versus coroutines
- WaitGroup struct, implementing / A patient goroutine
- versus coroutines / Understanding goroutines versus coroutines
- cleaning / Cleaning up our goroutines, Cleaning up goroutines
- creating / Closures and goroutines
- used, for building web spider / Building a web spider using goroutines and channels
- working / Understanding the working of goroutines
- cost / The cost of goroutines
- Blocking method 3 / Blocking method 3 – network connections and reads
- control, implementing with tomb / Implementing more granular control over goroutines with tomb
- go run command / Nitro profiler
- GoSched() function / Using Go's scheduler
- gosvg
- about / Designing the web server plan
- grabFeed() method / An RSS reader with self diagnostics
- graphics-go
- Graphviz
H
- happenedRlock() method / Getting deeper with mutexes and sync
- healthCheck function
- Heka
- Hoare
- about / A little bit about CSP
- URL / A little bit about CSP
- http.FileServer method / Handling requests
- http.ServeFile function / Serving pages
- HTTP header syntax
- http template package / Using templates
I
- I/O pprof
- concurrency, impacting on / Parallelism's and concurrency's impact on I/O pprof
- parallelism, impacting on / Parallelism's and concurrency's impact on I/O pprof
- immutability
- about / A note on immutability
- indeterminate channel type
- Initiate() function / Handling direct messages
- InService property / Building a load balancer with concurrent patterns
- interface channel
- using / Using an interface channel
- interfaces
- interval function / Getting deeper with mutexes and sync
- InUseBytes() method / Garbage collection in Go
- InUseObjects() method / Garbage collection in Go
- itemsHandler function / An RSS reader with self diagnostics
- ItemWrapper struct / Designing our web interface
J
- JMeter
L
- lastChecked variable / Designing our web interface
- leader/follower model / Looking at the leader-follower model
- letter capitalization, channels
- libraries, Go
- about / Some helpful libraries
- Nitro profiler / Nitro profiler
- Heka / Heka
- GoFlow / GoFlow
- lines.SetRotateDaily() / Using the log4go package for robust logging
- listen() function / Designing our web interface
- Listen() method / Handling direct messages
- listening loop, producer messages
- about / Implementing nil channel blocks
- LiteIDE
- load balancer
- building, with concurrent patterns / Building a load balancer with concurrent patterns
- load balancing / Building workers
- Lock() function / A multiuser Appointments Calendar
- Lock() method / Getting deeper with mutexes and sync
- locks
- performing, on RWMutex / Getting deeper with mutexes and sync
- log.SetRotateSize() / Using the log4go package for robust logging
- log4go application / Managing logfiles
- URL / Managing logfiles
- log4go package
- used, for robust logging / Using the log4go package for robust logging
- URL / Using the log4go package for robust logging
- log files, concurrent application
- managing / Managing logfiles
- logging
- about / Handling errors and logging
- goroutine logs, starting / Breaking out goroutine logs
- LiteIDE, used for debugging / Using the LiteIDE for richer and easier debugging
- benefit / Logging our panics
M
- main() function / An RSS reader with self diagnostics, Pprof – yet another awesome tool, Designing our web interface
- main() method / Handling direct messages
- makefile
- about / The other way around
- maps
- used, in Go / Using structs, interfaces, and more complex channels
- master-slave model / Looking at the master-slave model
- memcached
- using / Using memcached
- Go' circuit / Circuit
- memory
- errors, logging to / Logging errors to memory
- memory leak
- creating / Getting deeper into pprof
- memory preservation
- in Go / Memory preservation
- mesh topology / Type 2 – mesh
- Message struct / Sending changes to clients, Designing our web interface
- mgo
- URL / MongoDB
- MongoDB
- MPI
- about / Message Passing Interface
- URL / Message Passing Interface
- MPICH
- multiple cores
- multithreading / Multithreading and leveraging multiple cores
- leveraging / Multithreading and leveraging multiple cores
- multiuser Appointments Calendar
- about / The project – multiuser appointment calendar
- concurrent pattern, visualizing / Visualizing a concurrent pattern
- server requirements, developing / Developing our server requirements
- endpoints / Endpoints
- structs / Custom structs
- example / A multiuser Appointments Calendar
- Mustache
- URL / Using templates
- advantage / Using templates
- mutex
- used, to lock data / Using sync and mutexes to lock data
- using / Getting deeper with mutexes and sync
- mutex variable / Using mutual exclusions
- mutual exclusions
- using / Using mutual exclusions
- MyMySQL
- URL / Connecting to MySQL
- MySQL
- connecting to / Connecting to MySQL
- driver libraries / Connecting to MySQL
N
- net.Listen() method / The net package – a chat server with interfaced channels
- net package
- about / The net package – a chat server with interfaced channels
- Server / The net package – a chat server with interfaced channels
- Client / The net package – a chat server with interfaced channels
- direct messages, handling / Handling direct messages
- network connections / Blocking method 3 – network connections and reads
- nextServerIndex variable
- nil channel blocks
- implementing / Implementing nil channel blocks
- nil channels, using / Using nil channels
- nil channels
- using / Using nil channels
- Nitro profiler
- about / Nitro profiler
- URL / Nitro profiler
- NoSQL
- using / Using NoSQL as a data store in Go
- URL / Using NoSQL as a data store in Go
- using, in Go / Using NoSQL as a data store in Go
- notFound() method / Using the log4go package for robust logging
- NumGcoCall() / Getting even lower – assembly in Go
O
- object orientation, Go
- about / Object orientation
- Open() method / Connecting to MySQL
- OpenMPI
- os.OpenFile() method / Logging errors to file
P
- --pdf flag / Pprof – yet another awesome tool
- panic() function / Panicking, Recovering
- panicking, Go / Panicking
- panics
- logging / Logging our panics
- parallelism
- impacting, on I/O pprof / Parallelism's and concurrency's impact on I/O pprof
- Pipelined RAM (PRAM)
- about / First-in-first-out – PRAM
- Platform-As-A-Service (paas) / Using Google App Engine
- polymorphism
- demonstrating, in Go / Demonstrating simple polymorphism in Go
- pprof tool / Getting deeper into pprof
- Pprof tool / Pprof – yet another awesome tool
- private
- about / A note on style
- producer-consumer problem / The producer-consumer problem
- profiling tools
- about / Pprof – yet another awesome tool
- pseudocode, actor model
- about / Go and the actor model
- pseudocode, CSP
- about / Go and the actor model
- public
- about / A note on style
- Publish and Subscribe model / The Publish and Subscribe model
- PUT syntax / CouchDB
Q
- Query command / Exploring our web server
- QueryRow() function / Exploring our web server
R
- --race flag / Pprof – yet another awesome tool
- -race flag / Identifying race conditions with race detection
- race conditions
- identifying, with race detection / Identifying race conditions with race detection
- mutual exclusions, using / Using mutual exclusions
- timeouts, exploring / Exploring timeouts
- race detection
- race conditions, identifying with / Identifying race conditions with race detection
- race flag / Using mutual exclusions
- Radix
- about / Redis
- re2 syntax
- URL / Handling direct messages
- reads / Blocking method 3 – network connections and reads
- readURLs function / Building a web spider using goroutines and channels
- receive-only channel
- recover() function / Panicking
- recovering, Go / Recovering
- Redigo
- about / Redis
- Redis
- regexp.QuoteMeta() method / Handling direct messages
- registerError() / Logging our panics
- release consistency model / Release consistency
- remote code execution option
- about / Remote code execution
- disadvantages / Remote code execution
- advantages / Remote code execution
- removeFile function / Sending changes to clients
- requests
- handling / Handling requests
- routing / Routing requests
- requisites, concurrent application
- identifying / Identifying our requirements
- restricted() function / Using the log4go package for robust logging
- Revel
- URL / Web server
- ReverseProxy method / Building a load balancer with concurrent patterns
- ReverseProxy struct / Building a load balancer with concurrent patterns
- ring topology / Other topologies
- robust logging
- log4go package, used for / Using the log4go package for robust logging
- roundRobin function
- RSS
- about / RSS in action
- timeout, imposing / Imposing a timeout
- RSS feed
- retrieving / An RSS reader with self diagnostics
- RSS feeds
- parsing / An RSS reader with self diagnostics
- RSS reader
- building / RSS in action
- runtime.Caller() function / Using the runtime package for granular stack traces
- runtime.LockOSThread() function / Getting even lower – assembly in Go
- runtime.Lookup function / Parallelism's and concurrency's impact on I/O pprof
- runtime.MemProfileRecord object / Garbage collection in Go
- runtime.NumGoroutine() function / Using the runtime package for granular stack traces
- runtime.Stack() function / Using the runtime package for granular stack traces
- runtime.WriteTo method / Parallelism's and concurrency's impact on I/O pprof
- runtime package
- used, for stack traces / Using the runtime package for granular stack traces
- URL / Using the runtime package for granular stack traces
- RWMutex struct
S
- --SVG flag / Pprof – yet another awesome tool
- /static/[request] / Building our C10K web server
- saveLogs() function / Using the runtime package for granular stack traces
- screen
- errors, sending to / Sending errors to screen
- SELECT command / Exploring our web server
- select statement
- send-only channel
- separate packages
- building / Keeping concurrency out of your packages
- serial channel
- listening / Blocking method 1 – a listening, waiting channel
- serialized data
- transmitting / Serialized data
- ServeHTTP method / Routing requests
- server / The net package – a chat server with interfaced channels
- creating / Building workers
- server health, concurrent application
- checking / Checking the health of our server
- server requirements
- developing / Developing our server requirements
- web server / Web server
- templates, using / Using templates
- time / Time
- servers
- failing, at concurrent connections / Failing of servers at 10,000 concurrent connections
- SetFormat option / Using the log4go package for robust logging
- setProxy function / Building a load balancer with concurrent patterns
- SetRotateLines() / Using the log4go package for robust logging
- SetRotate option / Using the log4go package for robust logging
- Sleep() method / Getting deeper with mutexes and sync
- Stack() method / Garbage collection in Go
- stack traces
- catching, with concurrent code / Catching stack traces with concurrent code
- runtime package, used for / Using the runtime package for granular stack traces
- star topology / Type 1 – star
- static pages
- serving / Serving pages
- template, parsing / Parsing our template
- external dependencies / External dependencies
- strings.TrimRight() method / The net package – a chat server with interfaced channels
- structs / Custom structs
- style
- about / A note on style
- SVG
- need for / Designing the web server plan
- sync.mutex struct
- synchronous goroutine
- versus asynchronous goroutine / Synchronous versus asynchronous goroutines
- sync package
- used, to lock data / Using sync and mutexes to lock data
- about / Getting deeper with mutexes and sync
- system variables
- using / Using system variables
T
- --text flag / Pprof – yet another awesome tool
- /template/[request] / Building our C10K web server
- template
- parsing / Parsing our template
- template.ParseFiles() method / Parsing our template
- templates
- using / Using templates
- text template package / Using templates
- threads
- managing / Managing threads
- Tiedot
- time.Ticker struct / Timing out with channels
- timeout
- imposing / Imposing a timeout
- timeouts
- exploring / Exploring timeouts
- time package
- about / Time
- tomb
- about / Implementing more granular control over goroutines with tomb
- used, to implement control over goroutines / Implementing more granular control over goroutines with tomb
- tomb.Tomb struct / Implementing more granular control over goroutines with tomb
- tomb package
- topN command / Pprof – yet another awesome tool
- topology types
- star topology / Type 1 – star
- mesh topology / Type 2 – mesh
- Publish and Subscribe model / The Publish and Subscribe model
- serialized data, transmitting / Serialized data
- remote code execution option / Remote code execution
- bus topology / Other topologies
- ring topology / Other topologies
- MPI / Message Passing Interface
- transaction() function / Using mutual exclusions
- transaction function / Using mutual exclusions
- Transport struct
- URL / Imposing a timeout
U
- unbuffered channel / Buffered or unbuffered channels
- unidirectional channel
- unit testing
- Go, using with / Using Go with unit testing
- unlocks
- performing, on RWMutex / Getting deeper with mutexes and sync
- unsafe package
- about / Getting deeper into pprof
- updateFile function / Sending changes to clients, Designing our web interface
- Upstart service, Ubuntu / Using Go in daemons and as a service
- URI variable / Implementing more granular control over goroutines with tomb
- URL struct / Implementing more granular control over goroutines with tomb
- url variable / An RSS reader with self diagnostics
V
- visualization example
- about / Taking another approach
W
- --web flag / Pprof – yet another awesome tool
- Waitgroup struct
- implementing / A patient goroutine
- web-CLI interface, concurrent application
- Web.Go
- URL / Web server
- web command / Pprof – yet another awesome tool
- web interface, concurrent application
- designing / Designing our web interface
- web server
- about / Web server
- history / Failing of servers at 10,000 concurrent connections
- exploring / Exploring our web server
- connection mitigation / Timing out and moving on
- web server plan
- designing / Designing the web server plan
- web spider
- building, goroutines used / Building a web spider using goroutines and channels
- building, channels used / Building a web spider using goroutines and channels
- workers
- about / Building workers
- building / Building workers