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
46
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
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
37
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
17
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
21
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
150
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
58
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
110
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
130
Writing slow regexp is easier than you think (and want it to be)
mrzasa
0
290
[PL] (SegFault) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
46
Other Decks in Programming
See All in Programming
「コンパイル時のユニットテスト」導入するとユニットテストを 書かなくてよくなるのか?
tomohisa
9
2.2k
受託開発でGitLab CI を活用していく
xiombatsg
1
130
Migrating to Signals: A Practical Workshop
manfredsteyer
PRO
0
280
決断するための勇気、そのためのBacklog / Courage to make decisions, Backlog for that.
seike460
PRO
4
1.9k
Laravel標準バリデーションでできること
hmb_ok
2
360
The Future of C++ Interoperability: Insights from Porting a Game to Swift
teamhimeh
0
270
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
DDD, necessary but insufficient: physical design principles for microservices
cer
PRO
0
2.2k
とにかくHTTP3をライトニングに話す / Anyway, I'll talk to Lightning about HTTP3.
seike460
PRO
0
120
Learning PHP and Static Analysis with PHP Parser
inouehi
1
250
Parallel Socket Communication in Swift
s_shimotori
0
250
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
530
Featured
See All Featured
A Tale of Four Properties
chriscoyier
150
22k
Typedesign – Prime Four
hannesfritz
36
2k
We Have a Design System, Now What?
morganepeng
42
6.7k
RailsConf 2023
tenderlove
0
510
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
Done Done
chrislema
178
15k
Infographics Made Easy
chrislema
237
18k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Producing Creativity
orderedlist
PRO
335
39k
How to Ace a Technical Interview
jacobian
272
22k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
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