Prerequisites
Take a look at GopherCon 2019 to understand some interesting topics.
GopherCon 2019: Elena Morozova - How Uber Goes
Recently, videos of GopherCon 2019 have been uploaded one after another, so please remember to check them out. Let's learn about the latest shares this year. Today, I'll share a topic that I think is very good, which is How Uber Goes. Uber engineers shared some common problems they encountered after introducing Golang in 2015:
- Creating a large number of new services.
- Frequently switching between different service development. (Context Switching)
- Delivering globalized services.
The solutions are through the following three methods:
- Dependency Injection
- Consistent Code Structure
- Monorepo
Because of these problems, Uber internally first developed a Dependency Injection Library - fx ( https://github.com/uber-go/fx ) to facilitate the creation of different new services, making it easier to develop different new services through fx. Next, it mentions how to design a consistent architecture for the architecture used by each different service, making the code between different services easier to maintain. Finally, through Monorepo (that is, all the code is in a large repository, rather than in individual projects), it also becomes more convenient to change package versions (you can update everyone with one commit).
Refer:
https://godoc.org/go.uber.org/fx
https://eng.uber.com/tag/uberfx/
Top comments (0)