How Uber "Go"es

How Uber "Go"es

Maintaining a large codebase with maximum readability and minimal overhead is hard. This is the story of how Go language went from a few enthusiastic Gophers to the most popular language for microservices at Uber. Learn where we failed, and how that led us to solutions that we think are pretty darn neat!

Elena Morozova

July 25, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

141 slides
  1. •

  2. •

  3. •

  4. •

  5. •

  6. •

  7. •

  8. •

  9. •

  10. •

  11. level := os.Getenv("LOG_LEVEL") if level == "" { level =

    "info" } logger := log.New(os.Stdout, level, ...)
  12. logger level := os.Getenv("LOG_LEVEL") if level == "" { level

    = "info" } logger := log.New(os.Stdout, level, ...)
  13. logger config etc server ... tracer := tracing.New(logger, config) //

    * *jaegertracing.io server := lib.NewServer(lib.WithTracer(tracer))
  14. logger config etc server ... logger config etc server ...

    ... logger config etc server tracer
  15. ...

  16. ...

  17. ...

  18. ...

  19. ...

  20. ...

  21. ...

  22. ...

  23. ...

  24. ...

  25. ...

  26. ...

  27. package uberfx var Module = fx.Options( configfx, loggerfx, tracingfx, ...

    ) package main func main() { fx.New( uberfx.Module, ... ).Run() } github.com/uber-go/fx
  28. •

  29. •

  30. Repositories . . . Controllers List Users Request SELECT *

    FROM mysql; SELECT * FROM cassandra;
  31. Repositories . . . Controllers List Users Request SELECT *

    FROM mysql; SELECT * FROM cassandra;
  32. ├── app ├── controller ├── entity ├── gateway ├── gen

    │ └── [generated goodies] ├── handler └── repository $ glue new service
  33. • • ├── app ├── controller ├── entity ├── gateway

    ├── gen │ └── [generated goodies] ├── handler └── repository
  34. •

  35. ...

  36. ...

  37. ...

  38. ...

  39. ...

  40. ...

  41. ...

  42. ...

  43. ...

  44. ...

  45. ...

  46. •

  47. •

  48. •

Other Decks in Programming