Directed graph
A graph where each edge has a direction: A → B doesn't imply B → A. If each edge also has a number, like a distance, it's weighted. If you can reach any vertex from any other, it's connected.
Example
Following someone on a social network is directed: you follow an account with 1 million followers and it doesn't follow you.
Test yourself: Directed graph
Graphs
In a directed graph, if there's an edge from A to B, there's also one from B to A.
They're independent: you follow an account, but that account doesn't have to follow you. There can be 1, 2 or neither.
0/1
▶ PlayLessons that use it
What an IP is
Every machine has an address
Static and dynamic IP
Does it change or not?
Clusters
Many machines, one system
Storage types
Where data lives
Stacks
Last in, first out
Graphs
Points and connections
Graph operations
Adding and removing vertices and edges
Walking a graph
BFS and DFS, now with cycles
Databases
Where data is kept
NoSQL databases
Beyond tables
Distributed transactions
Everyone commits or nobody does
Service bus (ESB)
One hub to integrate everything
Real time: long polling, WebSockets and SSE
Letting the server speak first
Designing WhatsApp
2 billion messages a day
Designing Twitter
1 billion tweets a day
