I am creating a (quite) simple python web application on GAE. The net application essentially, request user input, do fundamental calculation, then spew out some question from the 3 module according to previous calculation, do fundamental calculation, spew out more details towards the user.
Now, the issue is
- The information that should be fetched is situated through the constant data (eg, several small area of the whole data)
- The entire whole information is about 100kb, needed data per user is all about 10 kb.
- The information is constant, and might be modified (by me).
- I wish to conserve cpu cycle. :-)
To date, I have have been hard coding the information in python string literal separated with a few if-elif-else as python module, but it's soo ugly (the information is formatted in HTML and most one line per data). I possibly could store it within the database however it may needed the greater cpu cycle and I'm not sure a good way to keep constant (non user flexible) around the datastore. Putting it inside a file, formatted in XML or something like that could require much more cpu energy on parsing. What exactly is the easiest method to store constant data?
Keep data as constants inside your source code, or like a computer file that you simply open in your application and browse the appropriate data from.
Ah... whatever. I personally use database for your. Used cache. And considering denormalizing it even more.