databases are consistent, so it’s hard to make them distributed (the features that make them consistent make them less partition-tolerant or less available.)
the same time) Availability: (a guarantee that every request receives a response about whether it was successful or failed) Partition tolerance: (the system continues to operate despite arbitrary message loss) http://en.wikipedia.org/wiki/CAP_theorem Saturday, October 22, 11 PICK TWO
11 If people go to Facebook and it’s missing a different half of their updates every time they visit, and sometimes it’s completely down, they won’t be back. If it’s missing the most recent one, they won’t notice. Use something “eventually consistent.”
shall remain unnamed had their database leak a while ago, including password hashes. Somebody took the liberty of cracking a bunch of these. Let’s see what the most common three-character combinations in them are.
[]; var length = password.length; var trigram_count = length - 3; for (var i = 0; i < trigram_count; i++) { var slice = password.slice(i, i+3); var gram = {'keys':[slice]}; gram[slice] = 1; trigrams.push(gram); } return trigrams; } Saturday, October 22, 11 We want to break each password into a list of trigrams.