Grokking the Modern Frontend System Design Interview
0% completed
Optimistic Updates and Rollback
On the slow mobile profile, one "Add to cart" request takes about 230 ms: a 150 ms round trip plus about 80 ms of server work, which are the assumptions this course has used so far. A shopper filling a weekly basket taps "Add" perhaps 15 times, so a design that waits for the server before changing the button makes the shopper wait about 3.5 seconds in total, 230 ms at a time.
Suppose, as a second assumption, that 1 in 500 of these requests fails. The other 499 times, the server does exactly what the page expected
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%