CocoaSPDY: SPDY For iOS and OS X
Article Summary
Twitter just made mobile apps 30% faster with a single line of code. Here's how they did it and why they're giving it away for free.
Twitter Engineering open sourced CocoaSPDY, bringing the SPDY protocol (HTTP's experimental successor) to iOS and OS X apps. The framework integrates with existing apps via a single line of code, leveraging Apple's NSURLProtocol interface.
Key Takeaways
- 30% latency reduction for API requests over SPDY versus HTTP in production
- One-line integration using NSURLConnection or NSURLSession protocols
- Performance gains increase as network conditions worsen (cellular long tail)
- Written in Objective-C with zero external dependencies, Apache 2.0 licensed
Critical Insight
Twitter achieved 30% faster API requests on mobile by implementing SPDY, with the biggest wins coming from poor network conditions.