I have a short (ten line?) script that is polling my gae app
(taskr.appspot.com) and deleting dead data. I appear to have confused
the data viewer in the gae admin interface and it is throwing 500
errors.
I'm just curious if i am doing anything bad here?
brett
--
Brett Morgan http://brett.morgan.googlepages.com/
I should clarify this - if you want to assign meaning to the key, you
should pick the key yourself. For example, a username might make for a
good key; or you can just not care what the key is.
I don't think models count against your quota - provided there's no
objects in the datastore with that model.
Why bother renaming it though? Just use the same model. You /will/ get
keys out of sequence later, no matter what, so might as well deal with
it now.
Counters are inherently hard to do on a distributed system. To be able
to scale and to handle failure, keys need to be random.
There are ways of getting a sequence for created items (see the google
io talks), but the problem is that you introduce a serious bottleneck
in doing so.
Why do you need a sequence for the keys? Auditability for completeness?
--
Brett Morgan http://brett.morgan.googlepages.com/
Do we have a issue for this yet?
> Also
> an option to reset the surrogate key base number to 1 would be nice,
> Bryan is correct that such a reset feature is not essential but
> classic SQL databases support the reset concept so it must be a
> reasonable idea. When regenerating test or demo datasets it is useful
> if entities have familiar ID values.
Keeping people in familiar territory is not a reasonable goal. It is
mutually incompatible with GAE's goal of scaling to millions of users.
Using sequences, and other global state, are the first things you need
to toss out the window to hit scale.