July 2015
Intermediate to advanced
380 pages
10h 15m
English
The next problem to solve is how to store the statistics. There is an advantage to having the statistics in memory, because it’s much faster than storing them. In fact, there are large data storage systems that do this very thing, but in our case, we want a smaller server that can store some of the data to a hard drive.
For this exercise, you’ll add two commands for storing to and loading statistics from a hard drive:
store If there’s a URL, store it to a hard drive.
load If there are two URLs, load the statistic from the hard drive based on the first URL, and then put it into the second URL that’s in memory.
This may seem simple, but you’ll have a few battles when implementing this feature: ...
Read now
Unlock full access