Gmail is built on the idea that email can be more intuitive, efficient, and useful. And maybe even fun. After all, Gmail has: Lots of space Over 7542.217837 megabytes (and counting) of free storage.

Gmail shows this when you enter the GMail.

Does it show real data or is it fake or prediction?

How to implement that feature in a web-app?

link|improve this question

Google expects that the vast, vast majority of their users will use only a tiny fraction of that. They obviously do not have a billion gigabytes required to deliver on that promise, nor will they ever need to. – meagar Jan 18 '11 at 19:38
1  
@meagar: I'm not sure, but I think they do have the billion gigabytes required. Imagine the amount of storage space all our searches costs only. – nightcracker Jan 18 '11 at 19:40
8  
@meagar we obviously need to test this out. – Rocket Jan 18 '11 at 19:42
1  
@Rocket I'm sure they could expand their capacity to accommodate some significant percentage of that if they have to, my point is the number is pure advertising and not connected to any physical limitation they currently have. – meagar Jan 18 '11 at 19:44
1  
The number is predicted, it counts up in constant intervals. Your second question of "How to implement that feature in web-app?" is way too vague. – SpikeX Jan 18 '11 at 19:58
show 3 more comments
feedback

migrated from stackoverflow.com Jan 18 '11 at 19:43

This question came from our site for professional and enthusiast programmers.

closed as off topic by studiohack, heavyd, Doug Harris, Diago Jan 18 '11 at 20:10

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

3 Answers

up vote 6 down vote accepted

According to the javascript code they do some prediction with interpolation:

function updateQuota() {
   if (!quota_elem) {
       return;
   }
   var now = (new Date()).getTime();
   var i;
   for (i = 0; i < CP.length; i++) {
       if (now < CP[i][0]) {
           break;
       }
   }
   if (i == 0) {
       setTimeout(updateQuota, 1000);
   } else if (i == CP.length) {
       quota_elem.innerHTML = CP[i - 1][1];
   } else {
       var ts = CP[i - 1][0];
       var bs = CP[i - 1][1];
       quota_elem.innerHTML = format(((now-ts) / (CP[i][0]-ts) * (CP[i][1]-bs)) + bs);
       setTimeout(updateQuota, 1000);
   }

}

where

CP = [[1199433600000, 6283], [1224486000000, 7254], [2144908800000, 10996], [2147328000000, 43008], [46893711600000, 1.7976931348623157e+308]]

So they expect to have 10996 Mb in 2037, 43008 Mb in 2038 and zillions in 2137 :)

link|improve this answer
feedback

Google know that they had 6283 MB of storage per user 2008-01-04. They also know that they had 7254 per user at 2008-10-20. They assume that they will have 10996 MB of storage per user at 2037-12-20.

Then they use this formula to calculate the storage:

prevms = milliseconds from 1970, 01, 01 to the previous point (ATM it is 2008-10-20, which is 1224486000000 milliseconds from 1970, 01, 01

prevmb = the space at the previous point, 7254 at this moment

currentms = milliseconds from 1970, 01, 01 to the storage estimate date (ATM it is 2037-12-20, which is 2144908800000 milliseconds from 1970, 01, 01

currentmb = the estimated space at that time, 10966 at this moment

now = milliseconds from 1970, 01, 01 we are at now

This is the formula:

((now-prevms) / currentms - prevms) * (currentmb-prevmb) + prevmb)
link|improve this answer
feedback

it is only an estimate.

You can write your own javascript which, as gmail's does, increases the counter by 40 bytes per second.

You can also use that space as your personal drive.

http://www.sizlopedia.com/2007/08/11/utilities-to-use-gmail-space-as-google-drive/

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.