The Slotted Counter Pattern
planetscale.com
The Slotted Counter Pattern
1–10 of 34 posts
Re: The Slotted Counter Pattern
#2Re: The Slotted Counter Pattern
#3Re: The Slotted Counter Pattern
#4Re: The Slotted Counter Pattern
#5Makes sense, but I can't help but feel it's a solution at the wrong abstraction level. It's a shame the DB can't figure this out for you.
Re: The Slotted Counter Pattern
#6Makes sense, but I can't help but feel it's a solution at the wrong abstraction level. It's a shame the DB can't figure this out for you.
Yeah, it seems like it would be possible for the DB engine to aggregate all these increments into one update. If you have two increments by one each in the queue, why not make it a single increment by two? I'm not sure though how much computing power it would need to figure that out...
Re: The Slotted Counter Pattern
#7Re: The Slotted Counter Pattern
#8Wouldn't querying the count be slow using a WHERE clause?
Re: The Slotted Counter Pattern
#9https://download.huihoo.com/google/gdgdevkit/DVD1/developers...
Also in Brett Slatkin's "Building Scalable Web Apps with App Engine" (2008)
Re: The Slotted Counter Pattern
#10Basically same as "Sharding counters" (2008) https://download.huihoo.com/google/gdgdevkit/DVD1/developers... Also in Brett Slatkin's "Building Scalable Web Apps with App Engine" (2008) https://youtu.be/Oh9_t5W6MTE?t=1181