1

Background: I am hoping to make a spreadsheet program a bit like Google Docs. I am currently in the planning phase and have realised that if one cell is changed then that could potentially affect 1,000+ other cells in the spreadsheet. I realise making 1,000+ database calls would be very slow and is thus inappropriate.

My question: how does one keep formula and value like information in a database and quickly make changes. The best approach I can think of is to download all 1,000+ cells as one big JSON object and then do the same for upload? I just can't imagine this is what Google does as the download and save speeds are so fast.

Promising pages have included:

In addition to these so far I have looked at:

FYI: I am coding in the HTML5/LAMP stack but I am happy for solutions to come in any form as I can always "port" the ideas from anywhere. So far the most help I got was from:

I am not so idealistic as to expect anyone to give me a concrete code implementation but I do believe this problem is not unique and that someone on stackoverflow is clever enough to have worked out an efficient method for storing and retrieving spreadsheet like information within a web app environment. Please just point me in the right direct and I will do the research to create my own solution.

Community
  • 1
  • 1
Brett
  • 3,296
  • 5
  • 29
  • 45
  • My first thought would be to store changes to local storage and eventually synchronize, but I don't know if that would reduce calls to the DB. I suppose it depends on how you do it. Anyway, this question looks to me like it shouldn't be here. – Alejandro Iván Jan 16 '14 at 02:40
  • Thansk @AlejandroIván That is also what I am thinking but this would result in a large download and upload and thus slow. I also imagine calculating the values would be hard to do on the client side but I am open for suggestion as to where. – Brett Jan 16 '14 at 02:42
  • 1
    maybe using **stored procedures** in the DB could reduce the network load and number of calls. Basically make the DB do the math when you insert or modify any data, but I'm not an expert really. Good luck! – Alejandro Iván Jan 16 '14 at 22:21
  • thanks @AlejandroIván, I hope an expert is prepared to share their knowledge. – Brett Jan 17 '14 at 23:27

1 Answers1

0

Perhaps you can make use of Google Apps Script, in combination with ScriptDb.

References

Edit 16-05-2014

Don't use the ScriptDB anymore !! It will be shut down as of Nov 20, 2014,
see sunset schedule: Apps Script Sunset Schedule

Jacob Jan Tuinstra
  • 1,197
  • 3
  • 19
  • 50