01OCPP · WebSocketA charger says “Preparing”.
Every charger on the platform streams OCPP events over a WebSocket. That one message can start a card hold, a session, a bill and a push notification, so it has to arrive exactly once in spirit, even when the network says otherwise.
02Kafka · Avro · at-least-onceKafka carries it to everyone who cares.
Session processing, payments, analytics and notifications all read the same stream. Redelivered meter values once gave a NaN cost and false low-balance stops. I added the guard that ignores duplicates, so replays are harmless.
03Holds · capture · recoveryMoney has to end in the right state.
I own POS terminal and Maya card payments end to end. Pre-auth, poll every 3 s for up to 48 s, start, capture or void. If a poll times out while the terminal succeeded, a leader-only recovery job finds it and nobody is left with a hold and no session.
04After hours · on-chainThen I take the same ideas on-chain.
Hooks, HTLCs, attestations and keepers: the same problems of ordering and final state, on Base, Polygon and NEAR. Six hackathon prizes so far, all team builds, including $5,000 at Unite DeFi.