/2 First gen: the organic evolution. Uber's architecture in 2014 would have two key services: dispatch and API. A dispatch service connects a rider with a driver, while an API service stores the long-term data of users and trips.
/3 Second gen: the all-encompassing gateway. Uber adopted a microservice architecture very early on. By 2019, Uber's products were powered by 2,200+ microservices as a result of this architectural decision.
/4 Third gen: self-service, decentralized, and layered. As of early 2018, Uber had completely new business lines and numerous new applications. Freight, ATG, Elevate, groceries, and more are among the growing business lines. With a new set of goals comes the third generation.
/5 Subscribe to our weekly newsletter to learn something new every week:
An HTTP server cannot automatically initiate a connection to a browser. As a result, the web browser is the initiator. What should we do next to get real-time updates from the HTTP server?
/2 Both the web browser and the HTTP server could be responsible for this task.
/3 🔹Web browsers do the heavy lifting: short polling or long polling. With short polling, the browser will retry until it gets the latest data. With long polling, the HTTP server doesn’t return results until new data has arrived.
An example of a debit card payment is shown in the diagram below. 👇
/2
🔸 Each transaction in the business system is transformed into at least two journal lines in the ledger system. This is called 𝐝𝐨𝐮𝐛𝐥𝐞-𝐞𝐧𝐭𝐫𝐲 accounting, where every transaction must have a 𝐬𝐨𝐮𝐫𝐜𝐞 account and a 𝐭𝐚𝐫𝐠𝐞𝐭 account.
/3
🔸 Each journal line is booked to an account.
🔸 Each account belongs to one of the three components in the balance sheet:
💡Asset = Liability + Equity
Let’s look at the issuing bank’s ledger as an example:
Below is a diagram showing the evolution of architecture and processes since the 1980s.
Organizations can build and run scalable applications on public, private, and hybrid clouds using cloud-native technologies.
/2 This means the applications are designed to leverage cloud features, so they are resilient to load and easy to scale.
Cloud-native includes 4 aspects:
🔹 1. Development process
This has progressed from waterfall to agile to DevOps.
/3 🔹 2. Application architecture
The architecture has gone from monolithic to microservices. Each service is designed to be small, adaptive to the limited resources in cloud containers.
/1 What tech stack is commonly used for microservices?
Below you will find a diagram showing the microservice tech stack, both for the development phase and for production.
/2 ▶️ 𝐏𝐫𝐞-𝐏𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
🔹 Define API - This establishes a contract between frontend and backend. We can use Postman or OpenAPI for this.
/3 🔹 Development - Node.js or react is popular for frontend development, and java/python/go for backend development. Also, we need to change the configurations in the API gateway according to API definitions.
/1 My 12 bullet points TLDR on technical content from Elon Musk on a Space with @realGeorgeHotz, on the complexity of the Twitter stack, scale, metrics, ads, etc.
/2 1. Code complexity: 20 million lines of Scala code in Twitter codebase.
2. $1 billion in server costs per year.
3. A metric that matters most to Twitter: unregretted user minutes.
4. Like count is updated every second for celebrities.
/3 5. To cut the burn rate, Twitter headcounts reduced from 8k to 2k in the last 6 weeks.
6. Got scammed by the SMS telecommunications providers. $16 million SMS costs excluding North America. 300+ SMS providers allow bots to run 2FA repeatedly.
/1 Data is cached everywhere, from the front end to the back end!
This diagram illustrates where we cache data in a typical architecture.
/2 There are 𝐦𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐥𝐚𝐲𝐞𝐫𝐬 along the flow.
🔹 1. Client apps: HTTP responses can be cached by the browser. We request data over HTTP for the first time; we request data again, and the client app tries to retrieve the data from the browser cache first.
/3
🔹 2. CDN: CDN caches static web resources. The clients can retrieve data from a CDN node nearby.
🔹 3. Load Balancer: The load Balancer can cache resources as well.