~/talk

Taming WebSocket with Scarlet

linkedin:zhxnlai

Scarlet is an extensible Kotlin library that turns Android WebSocket integration into a declarative interface and cuts boilerplate down to 10 lines of code. It uses an OkHttp plugin for transport, supports Moshi/Protobuf serialization and RxJava Flowable or coroutines, and embeds a backoff strategy plus lifecycle-aware connect/disconnect. Tinder moves from 2s polling that yields 90% empty responses to persistent push, and Scarlet’s immutable state machine makes retries, tests and protocol extensions (SSE, Socket.IO, MQTT in v2) predictable.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 7:00Why switch to WebSocket
  3. 13:28Challenges with WebSocket
  4. 20:05Introducing Scarlet library
  5. 24:05Scarlet’s modular design
  6. 33:48Scarlet’s predictable code
  7. 38:30Scarlet’s future and V2
  8. 42:48Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.