At Tokbox, we believe in providing a high quality video experience by constantly upgrading our server infrastructure. In that interest, Tokbox built it’s lightweight, scalable, raw socket based messaging framework called Rumor.
One might wonder why OpenTok needs its own messaging infrastructure, being a video streaming API. The concept of an OpenTok session is similar to that of people in a room (session) talking to each other (publisher and subscribers). When someone new enters the room, those already there acknowledge their presence. Similarly, when a new client comes into an OpenTok session, the current participants are unaware of that client’s presence until they’re notified by the server that someone else has joined. Along the same lines, any actions performed by that client (such as publishing their camera) need to be relayed via the server to all the other participants on that session. Not only is it important to be assured everyone gets these messages, but it also needs to happen in a timely manner. This is where our scalable messaging architecture, Rumor, comes into place.
Several partners have been asking us about the options around getting access to media streams as they come and go from an iOS device. While more robust media access features are further off, I wanted to take some time to explore the options an iOS developer can play with today.
The UIKit view hierarchy integrates with a fairly simple animation and compositing API. Every instance of UIView is backed by an animation layer (CALayer), which can be accessed (and manipulated) without much complexity. A neat thing about CALayer is that you render its contents at any time using the
renderInContext: method. Most often, your render target is the window, which is managed by the UIKit view hierarchy, so none of this knowledge is particularly compelling. Unless of course, you wanted to render the contents of the animation layer to a bitmap in memory to perform, say, facial recognition with the iOS 5 CIDetector.
We’ve been working on this project for a few months and are pretty excited to showcase how it’s made and what it can be made to do. I’d like to share some stories that happened along the way.