March 2020
Intermediate to advanced
328 pages
7h 58m
English
To deal with the large scale of Sneakers23’s online operation, we’ll need to run multiple servers at once. Running multiple servers can be difficult when in-memory data structures are used because updates are not automatically sent across the cluster. However, the scalability is certainly worth it. We have already discussed how Phoenix deals with this by broadcasting messages to all connected nodes, and we’ll use a similar solution to broadcast our Inventory changes across the cluster. Let’s start by demonstrating the particular problem we’re facing.
Running multiple servers exposes a problem. The current Inventory.Server process only knows about its own transactions. This means that if an item ...
Read now
Unlock full access