Brett, any plans to make an article of this talk?
This feels like such a key strategy to getting stuff done on
datastore, it should be part of the sdk.
On Jun 7, 11:44 pm, Brett Slatkin <
brett-appeng...@google.com> wrote:
> I was using an integer hash to reduce the key size. You don't need to hash
> the whole thing. Bigtable will split tablets based on a string prefix, so
> all that matters is the data distribution beyond that prefix. So
> "foo-<hash>" is just as effective as "<hash of foo + number>", or even
> better since it's shorter.
>
> 2010/6/7 Jaroslav Záruba <
jaroslav.zar...@gmail.com>
>
>
>
> > Thank you, Brett.
>
> > Would it be wrong to hash whole work_index instead of only hashing its
> > second half? sum_name, knuth_hash(index)
> > By md5-ing only the sequence number I get work_index of 'mySumName' + 32B.
> > If I hashed mySumName together with the seq.number the key would be only
> > 32B. (Still quite huge though.)
> > Given how frequent a vote entity is I would like to have the keys as short
> > as possible.
>
> > Regards
> > J. Záruba
>
> > On Mon, Jun 7, 2010 at 11:21 PM, Brett Slatkin <
brett-appeng...@google.com
> > > wrote:
>
> >> Hey all,
>
> >> The int(time.time()/30) part of the task name is to prevent queue stalls.
> >> When memcache gets evicted the work index counter will be reset to zero.
> >> That means new fork-join work items may insert tasks that are named the same
> >> as tasks that were already inserted. By including a time window of ~30
> >> seconds in the task name, we ensure that this problem can only last for
> >> about thirty seconds. This is also why you should raise an exception when
> >> you see a TombstonedTaskError exception.
>
> >> Worst-case scenario if the clocks are wonky is that two tasks are run to
> >> do the fan-in work instead of just one, which is an acceptable trade-off in
> >> many cases and a fundamental possibility when using the task queue API. This
> >> can be mitigated using pigeon-hole acknowledgment entities, like I use in my
> >> materialized view example.
>
> >> Hope that helps,
>
> >> -Brett
>
> >>>
google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib
e...@googlegroups.com>
> >>> .
> >>
google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib
e...@googlegroups.com>
> >> .
> >
google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib
e...@googlegroups.com>
> > .