Remodeling Cash App Payments

Jesse Wilson
Nov 16, 2018 · 6 min read
Image for post
Image for post

Normalized Data is Beautiful

Image for post
Image for post
3 customers + 3 payments
Image for post
Image for post
SELECT
p.id,
p.amount
FROM
payments p,
cards c
WHERE
p.sender_card_id = c.id AND
c.vault_token = 'b191a4884d216ea4';

Partitioned Data is Scalable

Image for post
Image for post
3 customers + 6 movements
Image for post
Image for post
Image for post
Image for post
Movements (blue), Payments (pink) QPS
Image for post
Image for post
Movements (blue), Payments (pink) QPS

Distributed Systems Are Asynchronous

Image for post
Image for post
Change the sender movement, sync the change, and acknowledge sync success.
Image for post
Image for post
The sender released the lock so the recipient must acquire it.

Ready for Vitess

Square Corner Blog

Buying and selling sound like simple things - and they…

Thanks to Jon Tirsen

Jesse Wilson

Written by

Android and jokes.

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Jesse Wilson

Written by

Android and jokes.

Square Corner Blog

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store