Transcript
Page 1: How We Bacame a 'Go' Company

How We Became A 'Go' Company

Page 2: How We Bacame a 'Go' Company

● Highly-threaded scalable server software,

● Recalling C++ as the choice to go,

– Alternatives: java, c#, c

● So … C was chosen

– With proper enterprise support (using XML)

Previous Decade

Page 3: How We Bacame a 'Go' Company

● creating tons of threads (couple of hundreds)

● memory management hell,

● thread hell,

● codebase grew uncontrolled much of the time,

● (too) much of the time was spent on fixing segmentation faults (mostly memory management issues)

Two Years Ago

Page 4: How We Bacame a 'Go' Company

We Needed A Hero ...

Page 5: How We Bacame a 'Go' Company
Page 6: How We Bacame a 'Go' Company

● Personally toyed with the language a bit before 1.0 release

● Fast, concurred and minimalistic,

● Based on a true story:

me: “hey, what if we try this 'Go' thing?”

boss: “okay, let's make a prototype”

… two weeks later …

me: “here's the prototype”

boss:

Go Language

Page 7: How We Bacame a 'Go' Company

● Working prototype had 26% less code, fully garbage collected

– some performance penalty (binary network protocol, reflection),

– smooth learning curve, small specs, C-family language

● Next-generation server software 100% written in Go

– debugger-less programming,

– no memory issues at all,

– resulting in 42% less code,

– most of the time, things just work ...

Go Language

Page 8: How We Bacame a 'Go' Company

Go Language

Okular NetworkManager

Gateway

sock

etsocket

socket

Okular NetworkManager

Gateway

ZMQ message bus (other components)

Unix socket-based IPC

ZeroMQ-based IPC

Page 9: How We Bacame a 'Go' Company

● Some projects have short life-span

● web framework paradise (goweb, web-go, martini, revel, negroni),

● lesssion learned: choose dependencies very carefully

● Language changes can break dependencies

– Go 1.3 CGO changes totally broke Gtk+ 3 bindings

External dependencies

Page 10: How We Bacame a 'Go' Company

● Go 1.3 won't allow referring to an incomplete C type from one package to another

– Package a: func CallC() *C.some_struct

– Package b: res := a.CallC()

● Solution: encapsulate C types inside a struct

● Fixing the problem:

– hot-fixing in our fork,

– cooperating with project maintainers

Things Can Also Go Bad

Page 11: How We Bacame a 'Go' Company

● Often discussed topic,

● Community moves towards godep,

● Tons of other solutions(https://code.google.com/p/go-wiki/wiki/PackageManagementTools)

● We use git subtree:

– early solution to vendor locking,

– easy to pull latest code

Dependency Management

Page 12: How We Bacame a 'Go' Company

● Binaries without external dependencies work on every compatible system

● In reality, one build for one system

● Tests simply run after build and before packaging (w/o extra web services)

– fails are still properly reported

Deploying

Page 13: How We Bacame a 'Go' Company

● don't regret nothing

● most of the software is now written in Go (including the whole server software and various web back-ends),

● our python/nodejs devs love Go – prefer Go for some projects

The End

Page 14: How We Bacame a 'Go' Company

Visionect

• Developing electronic paper products since 2007• 20 employees focusing on epaper development• 11 international awards

Page 15: How We Bacame a 'Go' Company

Signage solutions developed by Visionect have been working for more than 2 years, and stretch

from ice-cold Alpine ski resorts to scorching hot Australian roads.

Visionect is the only company in the world with extensive

outdoor electronic paper experience.

Visionect d.o.o.www.visionect.com

Luka Napotnikluka.napotnik@visione

ct.com


Recommended