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
48
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
32
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
220
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
77
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
140
[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
390
Other Decks in Programming
See All in Programming
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
110
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
200
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
160
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
130
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
320
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
200
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.1k
CloudflareStack でRAGに入門
asahiiwm
0
140
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
500
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
630
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
200
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.2k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
340
Raft: Consensus for Rubyists
vanstee
137
6.7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Writing Fast Ruby
sferik
628
61k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
The Cult of Friendly URLs
andyhume
78
6.1k
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