Earlier quoted context omitted.
> Unfortunately, 10 digits won't fit in 32 bits and 5 * 400 MB for storing number is not a very happy situation and it is NOT readily searchable. Why is 7 bytes (2b prefs + 5b number) x 400M = ~2.4GB of RAM not good enough?
Exactly. My response to the headline was "Um... using ten lines of C and $44 worth of RAM?"
How we store 400M phone numbers with fast lookup
11–20 of 59 posts
Re: How we store 400M phone numbers with fast lookup
#12We are using a constant database for a similar use-case (MNP database), albeit much smaller, around 15 million phone numbers. It requires almost no RAM and you update the database as a whole with no downtime. [1] https://en.wikipedia.org/wiki/Cdb_(software)
Re: How we store 400M phone numbers with fast lookup
#13Earlier quoted context omitted.
> Unfortunately, 10 digits won't fit in 32 bits and 5 * 400 MB for storing number is not a very happy situation and it is NOT readily searchable. Why is 7 bytes (2b prefs + 5b number) x 400M = ~2.4GB of RAM not good enough?
Now do fast lookups. It needs an index, which is what their post is about.
Then you can do fast lookups...
Re: How we store 400M phone numbers with fast lookup
#14Re: How we store 400M phone numbers with fast lookup
#15Re: How we store 400M phone numbers with fast lookup
#16Earlier quoted context omitted.
> Unfortunately, 10 digits won't fit in 32 bits and 5 * 400 MB for storing number is not a very happy situation and it is NOT readily searchable. Why is 7 bytes (2b prefs + 5b number) x 400M = ~2.4GB of RAM not good enough?
Exactly. My response to the headline was "Um... using ten lines of C and $44 worth of RAM?"
Re: How we store 400M phone numbers with fast lookup
#17It comes down to this: while the Indian phone system could in theory allow 10 billion phone numbers, there are not in fact 10 billion legally-allocatable phone numbers and the rules in place likely effectively reduce the legally-allocatable number to somewhere between 1-3 billion numbers. Dividing based on those rules may both reduce the problem to something requiring less engineering time and simiplify possible marketing-related factors (e.g. selling access/systems targeted only to specific area codes).
Re: How we store 400M phone numbers with fast lookup
#18Re: How we store 400M phone numbers with fast lookup
#19Re: How we store 400M phone numbers with fast lookup
#20Earlier quoted context omitted.
Exactly. My response to the headline was "Um... using ten lines of C and $44 worth of RAM?"
Because the interesting part of the effort is doing it fast in anticipation of translating the optimization tricks to cases where you can't just go buy more RAM anymore. A lot of problems can be "solved" with current hardware because accesses or comparisons or whatnot become ridiculously cheap but that's not what computer science is about.
Querying a DNC list is not a problem in which you will ever not be able to buy more RAM, it's trivially parallel, if for some reason DNC lists ever outpace Moore's law, just buy another system.
To be fair to the authors at least they didn't do something ridiculous like build a 100 note cassandra cluster.