1

I am developing a django-nonrel project and deploying it on Google app engine.

One function is to store many long lists of numbers, e.g., stock prices over time. The length of the list may be around 3000. Possible operations on the list are appending new numbers, deleting oldest numbers, and occasionally retrieving all the numbers (for plotting).

What is the efficient way to store such list in my situation? File seems the best way to me. But Google App Engine disallow creating a file for writing.

To my knowledge, Django-nonrel has ListField. But I guessed that a ListField of length 3000 is not efficient.

wattostudios
  • 8,666
  • 13
  • 43
  • 57
river6
  • 63
  • 6

1 Answers1

2

ListField is fine.

The maximum entity size is 1MB, that includes your ListField, plus other attributes on the entity. 3000 numbers should be fine.

dragonx
  • 14,963
  • 27
  • 44
  • Okay I will try ListField. Is there any other option? – river6 Nov 25 '12 at 06:15
  • You can store lists as a file in the blobstore. Or you can find other creative ways to store the list in the datastore, like storing an entity for each stock price. The latter would let you have near infinite lists, but would be much more expensive because you'll end up using many, many more datastore operations. ListField is likely the best route though. – dragonx Nov 26 '12 at 17:10