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
40
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
53
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
26
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
71
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
130
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
140
Writing slow regexp is easier than you think (and want it to be)
mrzasa
0
360
Other Decks in Programming
See All in Programming
CSC509 Lecture 04
javiergs
PRO
0
150
Competitionsだけじゃない! Kaggle Notebooks Grandmasterのすすめ
corochann
2
590
CSC509 Lecture 02
javiergs
PRO
0
160
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
170
MLOps in Mercari Group’s Trust and Safety ML Team
cjhj
1
120
[PHPカンファレンス沖縄2024]「無理なくできるだけ安全に」テストもないレガシーコードをリファクタリングするテクニック
ikezoemakoto
3
130
Why I Choose NetBeans for Jakarta EE
ivargrimstad
0
290
メルカリ ハロ アプリの技術スタック
atsumo
2
820
Serverless renderování Webových komponent
rarous
PRO
0
110
"Swarming" をコンセプトに掲げるアジャイルチームのベストプラクティス
boykush
2
260
レイトレ合宿10 レンダラー紹介 / Renderer Introduction, Ray Tracing Camp 10
shocker_0x15
0
470
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
470
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Teambox: Starting and Learning
jrom
132
8.7k
Facilitating Awesome Meetings
lara
49
6k
A better future with KSS
kneath
237
17k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
4
120
Speed Design
sergeychernyshev
22
490
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9k
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