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
mrzasa
March 14, 2015
Programming
0
49
Pagination in API
Slides for lightning talk given on wroc_love.rb 2015.
mrzasa
March 14, 2015
Tweet
Share
More Decks by mrzasa
See All by mrzasa
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
44
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
56
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
21
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
30
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
210
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
73
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
130
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
150
Writing slow regexp is easier than you think (and want it to be)
mrzasa
0
370
Other Decks in Programming
See All in Programming
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
受け取る人から提供する人になるということ
little_rubyist
0
230
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Remix on Hono on Cloudflare Workers
yusukebe
1
290
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Jakarta EE meets AI
ivargrimstad
0
560
役立つログに取り組もう
irof
28
9.6k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
How GitHub (no longer) Works
holman
310
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Become a Pro
speakerdeck
PRO
25
5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
A Tale of Four Properties
chriscoyier
156
23k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
How to train your dragon (web standard)
notwaldorf
88
5.7k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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