---
title: "Owain McGuire (@owain68) | Hashnode"
description: "Builds stuff. Read the latest articles by Owain McGuire on Hashnode."
url: "https://hashnode.com/@owain68"
---

@owain68

# Owain McGuire

@owain68 · Joined November 2020

Builds stuff

## Comments

[Vikas Solegaonkar there might be a little domain model here: user has a clientId (PK) user can create multiple counters (SK) user can admin a counter, e.g. suspend, delete, and set value (reset to zero). each counter has a userkey without the admin privileges, getCounter (reads current value need to set TTL so there is no caching), incCounter (returns the new value with a timestamp) users could be internal services: orders, customers, Add a billing mechanism for clients and their users and "this time next year we will be millionaires". https://www.youtube.com/watch?v=qp5hxHPlTq8](https://hashnode.com/posts/simple-atomic-counter-with-dynamodb-and-api-gateway/5fb7db99ba1e08716c77f6eb/comment/5fbe283dd9a105315340e572#reply-5fbe700408c16c34b89c41a4)

Reply · Article · Nov 25, 2020 · [Simple Atomic Counter with DynamoDB and API Gateway](https://hashnode.com/posts/simple-atomic-counter-with-dynamodb-and-api-gateway/5fb7db99ba1e08716c77f6eb)

[I did hunt around a while back to find this as a SaaS application. Couldn't find it. With an authorizer, you could launch! Under heavy workload on a specific counter, this is going to hotspot the item in DynamoDB. As it has to be atomic, there is no way to cache (check you haven't got any caching in API Gateway) and the usual Scatter-Gather pattern defeats the atomic nature too. Fun though.](https://hashnode.com/posts/simple-atomic-counter-with-dynamodb-and-api-gateway/5fb7db99ba1e08716c77f6eb/comment/5fbe283dd9a105315340e572)

Comment · Article · Nov 25, 2020 · [Simple Atomic Counter with DynamoDB and API Gateway](https://hashnode.com/posts/simple-atomic-counter-with-dynamodb-and-api-gateway/5fb7db99ba1e08716c77f6eb)
