golang

at

m.elcolombiano.com

Juan Felipe Alvarez Saldarriaga

@nebiros

Software engineer

at @ride

I'm in the iOS Team, YAY!, ;-)

What is m.elcolombiano.com?

  • A mobile website made in PHP.
  • Reads elcolombiano.com RSS feeds.
  • Last month they had like 2.791.914 page views.

How it works?

  • A background process run every X time.
  • This program get feeds from elcolombiano.com and process each one, also, it saves that information into a DB.
  • The program is made in PHP.

golang fits in here! 💪

Rewriting a PHP program into golang…

  • The PHP program is OOP.
  • All models and business logic is in PHP too.
  • Project structure is totally different.

SHOW ME THA CODE!

And… voilà! 

Some stupid numbers…

PHP

✔ ~/Drive/Projects/elcolombiano-mobile-ng/bin [master|✚ 3…1]
08:14 $ APPLICATION_ENV=development time php worker.php

real    54.74
user    0.45 
sys     0.19 

golang

✘-1 ~/Drive/Projects/GoLang/src/github.com/nebiros/sindyk-feeds-reader [master|…2]
08:33 $ time go run main/sindyk-feeds-reader.go -dbname elcolombiano-mobile_development

real	0m8.783s
user	0m2.597s
sys	0m0.838s

Simple is better…

  • Dig into other golang projects at github.
  • Start moving small chunks of code into golang.
  • Stop thinking in OOP.
  • Look first in the standard library.
  • Avoid too much dependencies.

Thank you!

Juan Felipe Alvarez Saldarriaga

@nebiros

hola@juan.im

golang at m.elcolombiano.com

By Juan Felipe Alvarez Saldarriaga

golang at m.elcolombiano.com

How I introduce myself into golang solving a real world application problem.

  • 2,153