Jetty News and Case Studies
This case study looks at Cinémathèque from PowerSource Software Pty Ltd. It is a digital interactive entertainment system that embeds Jetty as the backend server for the set top box browser.
PowerSource Software is a boutique software developer based in Sydney, Australia. The company has particular expertise in several interesting real-time areas: conventional wagering and gaming systems (totalisator systems for on and off-track betting, lotteries and wide-area keno systems), community gaming systems (trade promotions, competitions and opinion polls via mobile devices using SMS), and IPTV and video on demand (VOD).
PowerSource became active in IPTV and VOD because the company was looking for new ways to capitalise on its core expertise - high speed transaction processing. As luck would have it, the majority of the company's betting systems ran on real-time platforms supplied by Concurrent Computer Corporation, and Concurrent had started to utilise their hardware and real-time operating systems in the development of their MediaHawk video servers. At roughly the same time, the first deployable IP-based set top boxes also appeared. However, commercialisation of these IPTV-related technologies was being stymied by the absence of an affordable way of gluing these sophisticated components together into a customer-based money making enterprise. So PowerSource developed Cinémathèque.
Cinémathèque is a comprehensive solution for service providers offering interactive digital entertainment including IPTV and VOD, for wide area residential, residential multi-dwelling, and hospitality environments. It provides a tightly integrated suite of monitoring, control and support facilities that maximise the features and facilities available to subscribers while minimising the operational burden of the service provider.
In an IPTV-VOD system, a high speed two-way network connects the video servers and management system at the head-end to set top boxes in subscribers' premises. Perhaps the biggest difference between IPTV systems and traditional hybrid-fibre-coax (HFC) pay TV deployments is the speed of the network, and especially the speed of the back channel.
When a viewer selects an on-demand program the set top box sends in a play-out request which needs to be authorised before the video server will start streaming the content. At any time the viewer can stop, pause, rewind or fast-forward the video. It is important to note that the content is streamed across the network and played out in real-time. It is not stored or buffered in the set top box for later play-out - there are no disks in IP set top boxes. All subscriber interactions with the set top box - including play-out control - are transmitted across the network in real-time to the servers at the head-end.
Of course, people will only pay to watch if there is something worthwhile to watch and it's available to them at a convenient time. In this regard, digital video on demand differentiates itself from older hotel movie systems which provide a very narrow range of content, and from traditional subscription TV which offers only "near" video on demand services in which programs start at pre-designated times. The versatility of a digital video on demand system allows a hotel, or a residential IPTV service provider, to offer not only the latest Hollywood movies, but also classics, cult films, documentaries and the crème de la crème of TV. In other words, subscribers can watch what they want, when they want.
It happens that content owners, and the Hollywood studios in particular, go to great lengths to ensure that their valuable property is presented in an appropriate manner. For this reason, most content is delivered to the set top box as a 4 Mbit per second MPEG2 Transport Stream. This bit-rate provides the viewer with a near-DVD quality viewing experience on a standard television. While this generally guarantees that a movie will be seen in the best light, it also makes simultaneously delivering a large number of streams quite challenging. Clearly, there is a big difference between streaming numerous film clips at 64 or 128 Kbps over the net compared to pumping hundreds, if not thousands, of 4 Mbps streams simultaneously. This is especially true considering how easily human eyes and ears can detect jitter in the video and audio resulting from lost frames or uneven play-out. This is the realm of "big-iron" video servers like Concurrent's MediaHawks.
An IP set top box has three principal software components: an operating system, a highly customised web browser and a media player. Many of the better IP set top boxes run Linux - which is either booted out of non-volatile memory or over the network - together with a small footprint version of the Mozilla browser. The browser is heavily customised to cater for the aspect ratio, resolution and colour palette of a standard television. It is also adapted to make it easy to use in the "lean back" environment in which people watch television.
Experience shows that in the lean back environment of the TV room, less hand-eye coordination is required to successfully operate the remote control if "compass" keys are used for navigation instead of a track-ball or other mouse-like device that uses a floating cursor. The compass keys on the remote control let the subscriber navigate and select a hyperlink; the set top box then sends an HTTP request to Cinémathèque which returns the appropriate page in response.
Cinémathèque plays a vital role in a digital entertainment service network because it is responsible for handling all subscriber interactions. Each time a subscriber follows a hyperlink, and each time they request video play-out or select some other supplementary service, Cinémathèque must accept and validate the request, secure a transaction to disk, update the subscriber's account and other persistent data structures, and format and return a suitable response. This workload represents a unique mix of web content requests and complex customer transactions.
Since Cinémathèque essentially provides the virtual shop window for the digital entertainment service provider, it must respond quickly even under considerable load, and even when the content is being generated dynamically. The content itself also has to be thoughtfully designed to facilitate effortless navigation to the items of most interest to a subscriber. The experience has to be more like watching television than surfing the web.
Although it is widely recognised that the architecture and performance of the video servers is vital to satisfy service level expectations, the performance characteristics of the management system - the so-called middleware layer - are often overlooked. But all subscriber activity starts out as an HTTP request to Cinémathèque - only when a response from Cinémathèque includes authorisation to commence video play-out does a set top box actually communicate with a media server. This is why Cinémathèque's heritage is so important: it relies heavily on PowerSource's experience building high performance transaction processing systems.
Cinémathèque is comprised of three primary functional modules:
- Jetty servlet engine
- Javelin transaction processor
- Cinémathèque application core
The Jetty servlet engine provides Cinémathèque with the flexibility of a conventional web server but without the bloat, without the inevitable performance problems, and without the implicit security worries. Jetty is embedded within Cinémathèque and acts as a servlet container and dispatcher. In this role Jetty is reliable, secure and fast. Jetty invokes specialised Cinémathèque servlets in response to requests from set top boxes; these servlets interact with the Cinémathèque application core to provide the necessary services to subscribers.
Javelin is PowerSource's secure, non-stop transaction processing engine - it is written in Java and is the component on which all of Cinémathèque's other application features and facilities are based. Javelin secures all transactions to duplicated disk files - it handles all data mirroring itself rather than delegating this to the operating system, and it provides Cinémathèque with a robust and persistent data store. On a mid-range Linux server, Javelin is capable of recording in excess of 500 transactions per second while maintaining an average response time of less than 100 milliseconds. Javelin also performs an automatic restart and recovery to ensure that no data is lost as a consequence of a system outage.
The Cinémathèque application, too, is written entirely in Java to maximise portability, reliability and flexibility. Cinémathèque supports true video on demand, as well as near video on demand via its multicast scheduler. Since every subscriber interaction is handled by Cinémathèque the number of subscribers watching on-demand programs can be monitored in real-time. Similarly, Cinémathèque also tracks, in real-time, the number of subscribers tuned to each reticulated free-to-air, pay, or multicast TV channel. This permits a service provider to perform very accurate capacity planning as well as knowing what content sells and what doesn't.
Very little of the HTML content returned to the set top box by Cinémathèque is static. Instead, Cinémathèque creates portions of many pages dynamically according to the attributes of the viewer's subscription package, the titles and packages that they've previously purchased, titles that are currently book-marked, and the rating level of the content that the current user is permitted to see (to safeguard children from accessing inappropriate content).
All transactions, including billing transactions, are processed by Cinémathèque in real-time. Cinémathèque gathers operational, statistical and performance data continuously, and records this to its transaction files; this data is available for on-demand display on system administration workstations.
Cinémathèque is set top box independent and supports any number of different types of set top boxes simultaneously within a single deployment. Similarly, it does not rely on any set top box specific features and doesn't require any specialised application software or middleware to be present in the set top box. Adding support for other set top boxes is straight forward and entails adapting several JavaScript functions which are embedded in HTML pages returned to the set top box; this JavaScript accommodates the inevitable differences between the ways that set top box vendors invoke their media players. These are important features in Cinémathèque because they help service providers avoid set top box vendor lock-in.
A virtue of IP-based set top boxes is their uniformity - almost without exception they provide a consistent "application environment" by way of of their standards compliant HTTP, HTML and JavaScript implementations. Indeed, all set top box functions, including invoking, controlling and monitoring the embedded media player are achieved with JavaScript. Although they have the capability to run a Java Virtual Machine, most IP boxes don't for two reasons: firstly, it substantially increases the memory footprint (something to be avoided in a cost sensitive consumer device), and secondly, most boxes don't have sufficient CPU resources to spare (a box with a 400 MHz clock CPU is considered fast).
Cinémathèque returns JavaScript objects to the set top box's browser in response to each HTTP request; the data embedded in these objects is then rendered using JavaScript. This mechanism allows the look-and-feel designer to expose as little or as much of the service or program-related "metadata" to subscribers as they like without the requirement to change any server-side software.
For optimum performance, Cinémathèque comes bundled with a Concurrent Computer Corporation iHawk application server. iHawks run Concurrent's RedHawk Linux operating system which is a POSIX-compliant, real-time version of the open source Linux operating system. RedHawk is based on a standard Red Hat distribution but substitutes the usual kernel with a real-time enhanced one; it provides enhancements that maximise Cinémathèque's performance.
Cinémathèque uses Java's extensive internationalisation support to make locale and language customisation straightforward. Each word and phrase that appears in the Cinémathèque administration client is maintained in a resource bundle - adding support for a new language simply requires adding the appropriate translations to the bundle. Cinémathèque currently supports English, Japanese, Korean, Simplified Chinese and Traditional Chinese and any combination of these languages can be used simultaneously within a single system on both set top boxes and the system's administration workstations.
In residential mode, a subscriber can only access IPTV and other chargeable services after first logging in with their unique client id and password. Cinémathèque lets a subscriber assign a different password to each content rating classification to prevent children from accessing inappropriate material, thereby imposing parental control. In hospitality mode, access to services is controlled by Cinémathèque which receives guest check-in and check-out notifications from the hotel's property management system.
A subscriber can have an unlimited number of simultaneously active rentals and can switch between active rentals and initiate additional rentals at any time. Whenever video play-out is suspended, Cinémathèque automatically sets a bookmark for that rental - the subscriber can resume play-out either from the start of the program or from the bookmark. The subscriber can view their active rental list and review their complete rental history via their set top box at any time. The active rentals and rental history displays are filtered according to the rating level of the current login. Again, this prevents children from seeing references to inappropriate content.
Cinémathèque also has an integral customer loyalty program that works in conjunction with its customer profiling capabilities. The loyalty program provides for standard and VIP customers and reward points can be allocated based on spending behaviour. Accumulated reward points can be redeemed for specially created package deals and service upgrades.
Jetty was selected after PowerSource's engineers had evaluated several servlet engines.
So why did PowerSource choose Jetty?
Firstly, Jetty offered superior performance. Secondly, it was easy to embed within a larger application. In this regard, PowerSource was looking for a servlet engine that didn't "get in the way" of the rest of the larger application. Thirdly, it was particularly important that the servlet engine wasn't a resource hog. And fourthly, Cinémathèque systems are installed at customer sites and are expected to run unattended in a lights out environment - PowerSource was looking for a servlet engine that the engineers could "set and forget".
Jetty's reliability and performance counted highly in its favour because Cinémathèque essentially controls the delivery of premium subscription television services that customers are buying with their discretionary expenditure. In this situation, paying customers don't tolerate service unavailability because they've become accustomed to TV not being interrupted. If the responsiveness of the IPTV service is poor, or if it is unreliable, then customers will buy their entertainment elsewhere.
Finally, as the company's software engineers were making their minds up about Jetty, it became obvious that there was another significant aspect related to performance: namely the super-responsiveness of the team at Mortbay and the enthusiasm of the Jetty users active on the mailing lists.
PowerSource have several new products under development; our positive experience with Jetty, and our ability to rely on it, means that it will remain one of the key components in PowerSource's systems.
Screen shots and diagrams
- Dialogs available on the Cinémathèque system administration client: 1 and 2
- A conceptual IPTV and VOD system: diagram
- Major components inside Cinémathèque: application stack diagram
- Kreatel IP set top box and remote control: photograph
- Examples of HTML pages for set top boxes: index page, rental page, movie page, video on demand
- Photographs of televisions showing example HTML pages: tv1, tv2
Related links
Cinematheque: http://www.powersource.com.au/cineRedHawk Linux: http://www.ccur.com/isd_solutions_redhawklinux.asp
MediaHawk video servers: http://www.ccur.com/vod_default.asp
Kreatel set top boxes: http://www.kreatel.se
Posted at 07:36AM Feb 28, 2005 by gregw in General | Comments[0]