github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2013/go-sreops.slide (about) 1 Go Language for Ops and Site Reliability Engineering 2 3 Gustavo Franco 4 Site Reliability Engineer, Google 5 http://developers.google.com 6 7 * Operations vs Site Reliability Engineering 8 9 Operations 10 11 - Interrupt driven 12 - Repetitive 13 - Hard to scale 14 15 Site Reliability Engineering 16 17 - Project oriented 18 - Values automation 19 - Focus on scale 20 21 * Go Programming Language 22 23 "Go is an open source programming environment that makes it easy to build simple, 24 reliable, and efficient software." -- golang.org 25 26 * Hello OSCON 27 28 .play go-sreops/hello.go 29 30 $ go run hello.go -help 31 Usage of /tmp/go-build212699297/command-line-arguments/_obj/a.out: 32 -message="Hello, OSCON!": what to say 33 exit status 2 34 35 * Programming for SRE and Ops - State of the Union 36 37 - "I will just write a small throw away script for that" 38 39 - "I don't want to learn a new language" 40 41 - "Language X is awesome and solves everything" 42 43 * Programming for SRE and Ops - Where do we go? 44 45 - One liners are here to stay 46 47 - Throw away scripts too so let's make them better 48 49 - Think of languages you can read as a toolkit 50 51 - Get very good at writing in just a few of them 52 53 * Agenda 54 55 - Why Go for Ops and SRE? 56 57 - Go features 58 59 - Go in production at Google 60 61 - Go in production outside Google 62 63 - Q&A 64 65 * Why Go for Ops and SRE? Simple, reliable and efficient 66 67 - Open Source 68 69 - One binary to rule them all 70 71 - No need for a Makefile, import defined dependencies 72 73 - Very fast compilation 74 75 * Why Go for Ops and SRE? Simple, reliable and efficient 76 77 - Garbage collection 78 79 - Readability is easy to achieve via gofmt 80 81 - RE2 regular expressions 82 83 - Testing, benchmarking and profiling built-in 84 85 * Why Go for Ops and SRE? Standard library examples 86 87 .link http://golang.org/pkg/fmt fmt 88 89 .link http://golang.org/pkg/io/ioutil io/ioutil 90 91 .link http://golang.org/pkg/net/http net/http 92 93 .link http://golang.org/pkg/os/exec os/exec 94 95 .link http://golang.org/pkg/path/filepath path/filepath 96 97 .link http://golang.org/pkg/regexp regexp 98 99 .link http://golang.org/pkg/strings strings 100 101 .link http://golang.org/pkg/text/tabwriter text/tabwriter 102 103 .link http://golang.org/pkg/time time 104 105 [[godoc.org]] to your needs beyond the standard library 106 107 * Why Go for Ops and SRE? Concurrency via Goroutines 108 109 .play go-sreops/goroutines.go 110 111 * Why Go for Ops and SRE? Concurrency and Channels 112 113 .play go-sreops/goroutines-channels.go /START/,/STOP/ 114 115 * Go features 116 117 - Hashes or dicts? Maps 118 119 - Arrays? Yes, but you will probably want to use Slices instead 120 121 - Modules are called Packages 122 123 - Structs 124 125 - Methods 126 127 - Pointers without arithmetic operations 128 129 Go grows with you - see interfaces and reflection 130 131 * Go in production at Google 132 133 dl.google.com - OSCON talk by Brad Fitzpatrick Friday, 10:00am 134 135 .link http://code.google.com/p/vitess Vitess 136 137 vtocc: front-end to MySQL that improves scalability 138 139 .link http://code.google.com/p/emtail Emtail 140 141 Whitebox monitoring data from logs to a timeseries database 142 143 .link http://code.google.com/p/go-commander Go Commander 144 145 Command line library for Go 146 147 Machine lifecycle management 148 149 via App Engine 150 151 * Go in production outside Google 152 153 .link http://labix.org/pipe Pipe 154 155 Unix-like pipelines for Go 156 157 .link http://www.gocircuit.org Gocircuit 158 159 Inter host Goroutines 160 161 .link http://juju.ubuntu.com Juju 162 163 Service orchestration management tool 164 165 .link http://www.docker.io Docker 166 167 Containers management tool 168 169 .link http://www.packer.io Packer 170 171 Tool for creating identical machine images for multiple platforms 172 173 * Q&A 174 175 Take the tour - [[tour.golang.org]]