4. Survey the Audience
● Who a hip language, Ruby / Javascript
● Who uses Java / C#
● Has anyone played with GO?
5. Whats this talk about
● Instant Messenger Server in GO
● Why we chose go
● Basics about go
● How to get started with GO
6.
7. Who am I ?
Small consulting firm Hyperworks
*Built Bloomberg.com
*Real time ad servers
*Ecommerce sites (gucci,reebok etc)
*Thomson Reuters Messenger Client/Server
8. What we’re we using
● Instant Messaging Server / Client
● Backend 100% GO
● 300k user base of financial traders!
● 20 Megabits of sustained traffic
21. Code samples
c := make(chan int) // Allocate a channel.
// Start the sort in a goroutine; when it completes, signal on the channel.
go func() {
list.Sort()
c <- 1 // Send a signal; value does not matter.
}()
doSomethingForAWhile()
<-c // Wait for sort to finish; discard sent value.
23. Example interface code
type Stringer interface {
String() string
}
var value interface{} // Value provided by caller.
switch str := value.(type) {
case string:
return str
case Stringer:
return str.String()
}
24.
25. Things not so good
● Windows support
● Small number of libraries
● Community still small but growing
26. How to get started
● http://play.golang.org/
● http://golang.org/doc/