This week’s system design refresher:
Top 6 most popular API architecture styles (Youtube video)
Monorepo vs. Microrepo
Inside the HTTP Header
Developer Roadmaps
Bytebytego Collective
Top 6 most popular API architecture styles
Do you believe that Google, Meta, Uber, and Airbnb put almost all of their code in one repository?
This practice is called a monorepo.
Guest post by Xiong Wang.
Monorepo vs. Microrepo. Which is the best? Why do different companies choose different options?
Monorepo isn't new; Linux and Windows were both created using Monorepo. To improve scalability and build speed, Google developed its internal dedicated toolchain to scale it faster and strict coding quality standards to keep it consistent.
Amazon and Netflix are major ambassadors of the Microservice philosophy. This approach naturally separates the service code into separate repositories. It scales faster but can lead to governance pain points later on.
Within Monorepo, each service is a folder, and every folder has a BUILD config and OWNERS permission control. Every service member is responsible for their own folder.
On the other hand, in Microrepo, each service is responsible for its repository, with the build config and permissions typically set for the entire repository.
In Monorepo, dependencies are shared across the entire codebase regardless of your business, so when there's a version upgrade, every codebase upgrades their version.
In Microrepo, dependencies are controlled within each repository. Businesses choose when to upgrade their versions based on their own schedules.
Monorepo has a standard for check-ins. Google's code review process is famously known for setting a high bar, ensuring a coherent quality standard for Monorepo, regardless of the business.
Microrepo can either set their own standard or adopt a shared standard by incorporating best practices. It can scale faster for business, but the code quality might be a bit different.
Google engineers built Bazel, and Meta built Buck. There are other open-source tools available, including Nix, Lerna, and others.
Over the years, Microrepo has had more supported tools, including Maven and Gradle for Java, NPM for NodeJS, and CMake for C/C++, among others.
Over to you: Which option do you think is better? Which code repository strategy does your company use?
Important Things About HTTP Headers You May Not Know!
HTTP requests are like asking for something from a server, and HTTP responses are the server's replies. It's like sending a message and receiving a reply.
An HTTP request header is an extra piece of information you include when making a request, such as what kind of data you are sending or who you are. In response headers, the server provides information about the response it is sending you, such as what type of data you're receiving or if you have special instructions.
A header serves a vital role in enabling client-server communication when building RESTful applications. In order to send the right information with their requests and interpret the server's responses correctly, you need to understand these headers.
Over to you: the header “referer” is a typo. Do you know what the correct name is?
Developer Roadmaps
I recently found out about this interesting GitHub repository. It contains roadmaps, guides, and educational content that are crafted to assist developers find their path in the tech world.
Check it out here.
Join the ByteByteGo Talent Collective
If you’re looking for a new gig, join the collective for customized job offerings from selected companies. Public or anonymous options are available. Leave anytime.
If you’re hiring, join the ByteByteGo Talent Collective to start getting bi-monthly drops of world-class hand-curated engineers who are open to new opportunities.
What tool do you use for diagraming?
I reckon it was the transition to microservices that caused a real surge in microrepos around 2013/14-ish. The trend is changing and businesses started noticing that this pattern is no silver bullet. Most of the microservices implementations I've witnessed were in fact distributed monoliths where memory calls were replaced with network RPC. I don't want to say microservices are bad, just that I foresee more microliths emerging which might refine the broader code versioning strategy and lead to monorepos becoming increasingly popular.
https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90