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
52
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
59
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
32
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
230
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
81
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
150
[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
400
Other Decks in Programming
See All in Programming
Honoをフロントエンドで使う 3つのやり方
yusukebe
5
2.2k
Honoとフロントエンドの 型安全性について
yodaka
4
250
GAEログのコスト削減
mot_techtalk
0
110
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
200
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
Ruby on cygwin 2025-02
fd0
0
140
技術を根付かせる / How to make technology take root
kubode
1
240
Rails アプリ地図考 Flush Cut
makicamel
1
110
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
210
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
時計仕掛けのCompose
mkeeda
1
280
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
Featured
See All Featured
KATA
mclloyd
29
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Bash Introduction
62gerente
610
210k
Site-Speed That Sticks
csswizardry
3
370
Facilitating Awesome Meetings
lara
51
6.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Practical Orchestrator
shlominoach
186
10k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Designing for Performance
lara
604
68k
A Tale of Four Properties
chriscoyier
158
23k
We Have a Design System, Now What?
morganepeng
51
7.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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