auto-scalable rest apis with yawp! and google cloud
TRANSCRIPT
Auto-Scalable REST APIs
with YAWP! and Google Cloud
Hello!• Full-stack developer since 1998
• Operations manager Dextra
• Creator of YAWP! Framework
• Google Cloud GDE
@feroult
You’ve got an idea!
It is an Mobile APP?
You just build it.
Beautiful, Shinning App
Your users LOVE IT
Now you just need to scale, and…
Let the money FLOW
But WAIT
You’ve got your backend from your buddy developer
Things start to get
Auto-Scalable APIs
A simple problem
The model
Post Like*
COUNT
not that simple
select post, sum(count) from likes group by post
A little bit of theory
Stateless
Sharding
Asynchronous
Automated
Stateless
No client affinity
Sharding
Sharding the database
• High-throughput for writes and reads
• Distributed instances
• Shard Key
• Replication
• No data joins across tables
The hard work
Sharding the database
POST /likes
Routing
Shard Key
replication
bye bye joins
shard groups
Eventual consistency
Eventual consistencyGET /likes?post=1
hot instances
eventual replication
Strong consistency
Strong consistency
GET /likes?post=1
hot instances
wait transactions
Asynchronous
Async flow your data to different outlets
Automated
Tools and Platforms
Stateless
Sharding
Asynchronous
Automated
YAWP! and Google Cloud
Google Cloud Platform
YAWP! Adds UP
not that simple
Pipes
Fork-Join Queues
Asynchronous pipelines
Like Post Author
POST /likes GET /posts GET /authors
Asynchronous pipelines
POST /likes
accumulators
Like Post
GET /posts
sequencing
Final Thoughts
Thanks!• Demo code
github.com/feroult/like-demo
• YAWP!yawp.io @feroult