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
Caching data in a connected world - VADG
Search
Iván Martín
March 23, 2017
Programming
160
0
Share
Caching data in a connected world - VADG
Iván Martín
March 23, 2017
Other Decks in Programming
See All in Programming
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
t *testing.T は どこからやってくるの?
otakakot
1
660
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
410
Agentic Elixir
whatyouhide
0
100
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
180
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
150
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
250
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
120
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
580
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
New Earth Scene 8
popppiees
3
2.1k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
490
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Transcript
Caching data in a connected world Iván José Martín García
Github: seik Twitter: @seikv
Problema
Problema
Problema
Problema Vivimos en un mundo conectado.
Dependencias
RxJava
<Observable> •Clase principal en la programación reactiva. • Trabaja sobre
un “flujo de datos”. • .subscribeOn() • .observeOn() • Transformaciones.
Realm • Persistir datos de una forma simple. • Muy
fácil de implementar/mantener. • Rápido, muy rápido.
Realm A tener en cuenta
Realm Evaluación perezosa.
Realm Not thread safe.
Realm Object (Necesarios getters y setters)
Guardar datos 1. Obtenemos una instancia de Realm 2. Ejecutamos
una transacción donde guardamos nuestros datos. 3. Cerramos la instancia de realm si no la vamos a usar más.
Obtener datos 1. Obtenemos una instancia de Realm 2. Ejecutamos
una query. 3. Cerramos la instancia de realm si no la vamos a usar más.
Remote API Representación Local Repository
Local 1. Query. 2. Devolvemos el usuario como observable, si
no existe devolvemos un observable vacío.
Remote Llamamos al servicio y por cada item ejecutamos nuestra
función de guardado.
Repository 1. Nos suscribimos en el main thread. 2. Observamos
los cambios en el main thread.
Repository 1. Nos suscribimos en background. 2. Observamos los cambios
en el main thread.
Repository Concatenamos ambos Observables
Representación Manejamos los datos y mostramos un aviso si no
se ha podido mostrar información actualizada.
Representación Nos desuscribimos.
Demo
Demo
Demo https://github.com/Seik/vadg-caching-data
¡Muchas gracias!