Taming WebSocket with Scarlet
summary
Tinder’s Scarlet is an extensible Kotlin library (Retrofit-inspired) that turns a WebSocket API into a declarative interface so a GDAX subscribe/receive flow emits tickers as a Flowable with about ten lines of code. It plugs into any WebSocket factory (example: OKHttp), uses Moshi adapters or Jackson/Gson for serialization, converts streams to RxJava or coroutines, and coordinates lifecycle plus exponential backoff retry strategies. Scarlet runs a state machine, ships from Tinder to thousands of devices, and reports eight months in production with zero issues while swapping protocols or parsers in one line.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:08Why WebSocket matters
- 7:59WebSocket challenges on Android
- 13:11Introducing Scarlet library
- 16:55Real-world Bitcoin demo
- 21:46Scarlet plugins explained
- 26:36Scarlet in production at Tinder
- 29:54State machine in Scarlet
- 32:33Scarlet v2 and future plans
- 36:16Summary and Q&A
related talks
43mTaming WebSocket with Scarlet
43mTaming Websocket with Scarlet
40mMobiconf 2018: Zhixuan Lai
14mReal-Time Communication in Android
40mLibraries I wish I knew about when I started
39mWe need to talk about Websockets
42mRSocket - Future Reactive Application Protocol
31mFlux: Utilize unidirectional data flow ...
