Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pagination in API
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mrzasa
March 14, 2015
Programming
58
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pagination in API
Slides for lightning talk given on wroc_love.rb 2015.
mrzasa
March 14, 2015
More Decks by mrzasa
See All by mrzasa
Magica Journey through Regex Engine Internals - T3chFest 2025
mrzasa
0
98
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
120
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
92
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
44
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
60
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
290
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
140
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
200
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
170
Other Decks in Programming
See All in Programming
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
560
メールのエイリアス機能を履き違えない
isshinfunada
0
250
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
250
React本体のコードリーディング
high_g_engineer
1
150
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
450
今さら聞けない .NET CLI
htkym
0
210
Oxlintはいいぞ(続)
yug1224
1
360
Building a Meta Ray-Ban display app
akkeylab
0
170
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
Go 1.27 における memory allocation の高速化
andpad
0
300
typoなんかねぇよ
raspython3
0
330
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
Building Adaptive Systems
keathley
44
3.2k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Typedesign – Prime Four
hannesfritz
42
3.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
660
Fireside Chat
paigeccino
42
4k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
Pagination in API Maciej Rząsa (@mjrzasa) PGS Software (Rzeszów)
Big JSON in API (~10MB) • Synchronizing data for offline
use • “Send me everything newer than I have” • Timeouts on heroku • Memory issues on the android client • Solution: pagination
Regular pagination GET /items?page=1×tamp=t0 Deleting first two items t0 t0
Regular pagination GET /items?page=2×tamp=t0 t0 t0
Since-to pagination GET /items?since=t0&to=t1 t0 t1 5 items
Since-to pagination GET /items?since=t1&to=t2 t1 t2 10 items
Timestamp with page size GET /items?timestamp=t0&page_size=5 t0 t1 GET /items?timestamp=t1&page_size=5
Timestamp with page size GET /items?timestamp=t0&page_size=5 GET /items?timestamp=t1&page_size=5