Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1LarzvW.
Paul Dix discusses experiences building InfluxDB, an open source distributed time series database, in Go. He talks about what drove the decision to use Go, what's been really great about developing in the language, and a few of the pains that they’ve had along the way. He also digs into what performance characteristics they’ve seen in Go 1.4 vs. Go 1.5, which has a new garbage collector. Filmed at qconsf.com.
Paul Dix is the CEO of InfluxDB. He is the editor for Addison Wesley's "Data and Analytics", the author of "Service Oriented Design with Ruby and Rails" and the founder of the NYC Machine Learning Meetup.
2. InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/influxdb-go
3. Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
7. Languages worked with Professionally in order
• VBScript
• Delphi
• C# and VB.NET
• Ruby & Javascript
• Java
• C (only a little)
• Ruby & Javascript
• Scala
• Go
8. Mix of static and dynamic, but
most time in dynamic languages
37. // Sort methods
func (a Values) Len() int { return len(a) }
func (a Values) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a Values) Less(i, j int) bool {
return a[i].Time().UnixNano() < a[j].Time().UnixNano()
}
38. Duplicate code for each data type
select percentile(90, value) from cpu
where time > now() - 1d
group by time(10m)
39. // Iterator represents an iterator over a series.
type Iterator interface {
SeekTo(seek int64) (key int64, value interface{})
Next() (key int64, value interface{})
Ascending() bool
} we have to cast this later
41. // FloatIterator represents an iterator over a series.
type FloatIterator interface {
SeekTo(seek int64) (key int64, value float64)
Next() (key int64, value float64)
Ascending() bool
}
42. Implement for every function
func MapMean(input *MapInput) interface{} {
if len(input.Items) == 0 {
return nil
}
out := &meanMapOutput{}
for _, item := range input.Items {
out.Count++
switch v := item.Value.(type) {
case float64:
out.Total += v
case int64:
out.Total += float64(v)
out.ResultType = Int64Type
}
}
return out
}
49. Go 1.5 issue forced us to revert
https://github.com/golang/go/issues/12233
50. Unit and integration tests won’t
save you.
if you operate at scale, only full blown scale tests will tell you anything and even
then you may not find it