SlideShare a Scribd company logo
1 of 25
Download to read offline
Shipping One Million Lines of Haxe
to (Over) One Million Devices
Todd Kulick & Gabriel Dalbec
Overview
• A little bit about TiVo
• TiVo and Haxe
– Evaluating Haxe for TiVo
– Converting a large AS3/Flash code base
• Lessons learned
• Future directions
TiVo Company Profile
• Founders Mike Ramsay and Jim Barton
• January 1999, TiVo unveiled it's Personal Television
Service at the CES
• Headquarters in
Silicon Valley
• Employees: ~600
• 4.5 Million active
subscribers
Worldwide Presence
Multiple countries:
United States, Canada, UK, Spain,
Sweden, Australia, New Zealand,
Mexico, Taiwan, Puerto Rico
Product Line Overview
• Digital Video Recorders (Roamio)
– Powerfully record HD broadcast, cable, IPTV (DVR)
– Record up to 1000 hours, 6 shows at once
– MSO/MVPD video-on-demand (VOD) integration
– Third-party streaming video integration (Netflix, YouTube, Hulu, etc.)
• Second Room Video Devices (Mini)
– Watch recordings on multiple devices throughout the home
• Mobile Applications
– Control DVRs (discover content, schedule)
– Download or stream video
• Online Web Video Portal
– Stream content to browser
TiVo Anywhere
Stream live or recorded shows
Download recorded shows
Schedule and browse
TiVo and Haxe
Flash Challenges
TiVo device user interface built on AS3 and Flash.
• ~500,000 lines of AS3 product code
• ~400,000 lines of AS3 tests
But we had looming problems…
• Support for Flash is waning
– Especially on embedded chipsets
• User interface performance non-ideal
– On embedded devices performance was, at best, bearable
• Going forward, fewer and fewer devices would support Flash
Could Haxe solve these problems?
Haxe Evaluation Criteria
• Basic evaluation
– Will Haxe/NME/OpenFL work for us generally?
– Is the language good (typed, efficient, easy to use/understand)?
– Are the right APIs/capabilities present (graphics/network/etc.)?
• Technical evaluation
– Will it work well on set-top box hardware?
– Will the computational parts be fast(er)?
– Will the graphics parts be fast enough?
– Will it work for an application the size/scale of ours?
• Developer workflow evaluation
– What is the development workflow like?
– How fast are incremental compiles?
– How effective/featureful are the code editing/searching tools?
– How mature are the debuggers?
Haxe Evaluation
To evaluate Haxe for our purposes, we would create a Haxe
prototype of our user interface application by converting some
of our AS3 code to Haxe…
• Test the as3tohx conversion tool
– Roughly converted 85% of the code to prototype quality
• Compare Haxe performance to Flash version
• Compare Haxe memory consumption to Flash version
• Compare Haxe image size to Flash version
• Evaluate Haxe development environment and tools
Haxe Evaluation
Beginning early last year, four developers spent three months
building a prototype and evaluating it against our criteria
• AS3 to Haxe conversion process worked reasonably
• Prototype’s performance was ~30% better
• Prototype’s memory consumption was reasonable
• Prototype’s image size was large, but workable
• Haxe development tools and IDEs were not quite as good as using Flash,
but were acceptable and could be improved
Our evaluation suggested that Haxe could meet our strategic,
technical and development needs!
So just about one year ago, we began to convert to Haxe!
Haxe Conversion Strategy
• Strategy
– Convert AS3 code to Haxe
– Compile using haxe/hxcpp and TiVo MIPS cross-compilers
– Use NME/OpenFL to provide Flash API
– Build new NME back-end on DirectFB API
• No OpenGL on many embedded set-top boxes
• Customized for best performance on set-top box devices
• Scope of conversion
– Total lines of code: >900,000
– Unit tests: ~17,000
Flash AIR Deployment
Encore (10’ UI)
Iris Toolkit Video
AIR 3.0.3 TiVo Flash
EDK
System API
Outer Loop Networking
Flash API
Graphics Audio Input
Custom
API
Video
Flash Engine
AS3
Interfaces
Run-time
Devices: TiVo set-top boxes
NME C++ Deployment
Encore (10’ UI)
Iris Toolkit Video
System API
Outer Loop Networking
Flash API
Graphics Audio Input
Custom
API
Video
Native C/C++ Runtime
hxcpp
(lib/hxcpp)
NME
(lib/nme)
TiVo EDK
(lib/edk)
Haxe
Interfaces
Run-time
Devices: TiVo set-top boxes, Android TV devices
OpenFL HTML/JS Deployment
Encore (10’ UI)
Iris Toolkit Video
System API
Outer Loop Networking
Flash API
Graphics Audio Input
Custom
API
Video
Browser
JavaScript Engine
OpenFL (lib/openfl, lib/openfl-html5-dom)
?
Haxe
Interfaces
Run-time
Devices: Browsers, Connected TVs & more…
Haxe Conversion Timeline
Spring: Looking for a
strategy for “after
Flash”
Summer: Began
learning about Haxe
Fall: Began
evaluating Haxe in
earnest
Winter: Conversion
code complete
Spring: WWX 2014 –
TiVo Haxe demo!
Summer: TiVo Haxe
shipping!
Spring: Decision to switch
to Haxe; WWX 2013
Summer: Conversion from
AS3 to Haxe begins
0
10
20
30
Haxe Conversion Goals
• Adobe/Flash independence
– …while leveraging our current user interface codebase
– Run-time smaller than embedded Adobe Flash engine, easier to
improve, more opportunities
• Performance benefits
– Better user experience
– Makes new, additional look & feel features possible
– No JIT “hiccups”, no JIT bugs(!)
• Multiplatform development efficiencies
– Build great user experiences that can be targeted at many devices
– Improvements made in the user experience would potentially have a
longer life span and broader applicability
Challenges
Workflow / development environment issues
• IDE support/quality in Linux/OSX
– No integrated debugging
– No integrate unit test execution
Application requirements issues
• Application must share graphics/audio resources
• NME designed for constant drawing/games
Haxe architectural issues
• UTF-8 / multilingual support rough
• String vs. Bytes confusion
• Map implementation handling of interfaces as keys
Challenges
Run-time issues
• Endianness issues in hxcpp
• Object churn and memory footprint
• Resulting executable size
– Generated reflection code large in hxcpp
– Object/function boxing in hxcpp
– Template size in hxcpp (not using "void*" design pattern)
Small compatibility issues
• No Date object support of UTC/localtime
• Weak reference bugs in hxcpp
Demo(s)
TiVo Haxe Contributions
• Improvements in as3tohx convertor (Dominguez)
• New hxcpp debugger
• New hxcpp compiled object caching
• IntelliJ IDEA Haxe plugin OSS'd & improved
• Numerous smaller Flash compatibility improvements in
NME/OpenFL (Granick)
• New NME back-end for TiVo STBs (DirectFB, custom-video, etc.)
– Smarter redraw logic (only when necessary)
• New OpenFL HTML5 back-end (Granick)
– Support for DOM rendering, optimized for low-end browsers
TiVo Future Directions
• Deployments through other Haxe back-ends/languages/devices
– HTML/JavaScript
– Android/iOS
• Pull requests for some additional TiVo improvements
• Continuing IDE/development environment improvements
– Better IntelliJ environment (building, debugging, etc.)
– Better multi-threaded support for GC/debugger in hxcpp
• Continuing hxcpp improvements
– Image size, run-time memory footprint, performance, GC, unreflective
• Continuing Haxe/NME/OpenFL churn improvements
• Continuing performance study/tuning
Haxelibs We Use/Love
We use the following...
TiVo Haxe Wishlist
• Better development environment
– Better IDE support on Linux
– Integrate debugger into IDE
– Integrate munit into IDE
– Continuing optimization of compiler and language back-ends
• Partial compilation for Haxe (libraries)
• Executable image size reduction when using hxcpp
• Foreign function integration API for “call in”
– CFFI only defines Haxe “call out”
• Short lambdas(?!)
Haxe has helped TiVo to successfully create
a faster, better user experience for our
customers.
Questions?

More Related Content

What's hot

Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019Derek Buitenhuis
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Thomas Weise
 
SIP to Win: VOIP telephony
SIP to Win: VOIP telephonySIP to Win: VOIP telephony
SIP to Win: VOIP telephonyMiles Maier
 
Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019Thomas Weise
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for GremlinopenCypher
 
Dynamic pricing of Lyft rides using streaming
Dynamic pricing of Lyft rides using streamingDynamic pricing of Lyft rides using streaming
Dynamic pricing of Lyft rides using streamingAmar Pai
 
StreamingFrameworkPresentationFinalVersion
StreamingFrameworkPresentationFinalVersionStreamingFrameworkPresentationFinalVersion
StreamingFrameworkPresentationFinalVersionWissem Allouchi
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkAljoscha Krettek
 
Wideband Audio Conferencing with Asterisk
Wideband Audio Conferencing with AsteriskWideband Audio Conferencing with Asterisk
Wideband Audio Conferencing with AsteriskSaúl Ibarra Corretgé
 
A Serverless first approach - Will it Lambda?
A Serverless first approach - Will it Lambda?A Serverless first approach - Will it Lambda?
A Serverless first approach - Will it Lambda?Nick den Engelsman
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceNETWAYS
 
Kamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionKamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionOlle E Johansson
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaRedis Labs
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerMatomy
 
OFI Overview 2019 Webinar
OFI Overview 2019 WebinarOFI Overview 2019 Webinar
OFI Overview 2019 Webinarseanhefty
 

What's hot (20)

Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
 
SIP to Win: VOIP telephony
SIP to Win: VOIP telephonySIP to Win: VOIP telephony
SIP to Win: VOIP telephony
 
Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019Streaming your Lyft Ride Prices - Flink Forward SF 2019
Streaming your Lyft Ride Prices - Flink Forward SF 2019
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for Gremlin
 
Beautiful Parrot
Beautiful ParrotBeautiful Parrot
Beautiful Parrot
 
Dynamic pricing of Lyft rides using streaming
Dynamic pricing of Lyft rides using streamingDynamic pricing of Lyft rides using streaming
Dynamic pricing of Lyft rides using streaming
 
Ci Tranning
Ci TranningCi Tranning
Ci Tranning
 
Meetup 2009
Meetup 2009Meetup 2009
Meetup 2009
 
StreamingFrameworkPresentationFinalVersion
StreamingFrameworkPresentationFinalVersionStreamingFrameworkPresentationFinalVersion
StreamingFrameworkPresentationFinalVersion
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
Wideband Audio Conferencing with Asterisk
Wideband Audio Conferencing with AsteriskWideband Audio Conferencing with Asterisk
Wideband Audio Conferencing with Asterisk
 
A Serverless first approach - Will it Lambda?
A Serverless first approach - Will it Lambda?A Serverless first approach - Will it Lambda?
A Serverless first approach - Will it Lambda?
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
 
Kamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionKamailio :: A Quick Introduction
Kamailio :: A Quick Introduction
 
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca AntigaServing Deep Learning Models At Scale With RedisAI: Luca Antiga
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
 
SIP is hard, let's go shopping!
SIP is hard, let's go shopping!SIP is hard, let's go shopping!
SIP is hard, let's go shopping!
 
OFI Overview 2019 Webinar
OFI Overview 2019 WebinarOFI Overview 2019 Webinar
OFI Overview 2019 Webinar
 
SIP2SIP: SIP gratis para las masas
SIP2SIP: SIP gratis para las masasSIP2SIP: SIP gratis para las masas
SIP2SIP: SIP gratis para las masas
 

Similar to Wwx2014 - Todd Kulick "Shipping One Million Lines of Haxe to (Over) One Million Devices"

WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...Amir Zmora
 
Web development revolution
Web development revolutionWeb development revolution
Web development revolutionAhmed El-Zekred
 
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013Jeff Haynie
 
WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)Victor Pascual Ávila
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?Mark Russell
 
Infinite Toolkit: an overview
Infinite Toolkit: an overviewInfinite Toolkit: an overview
Infinite Toolkit: an overviewCisco DevNet
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...Amir Zmora
 
SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017Lorenzo Miniero
 
Web APIs, the New Language Frontier
Web APIs, the New Language FrontierWeb APIs, the New Language Frontier
Web APIs, the New Language FrontierRestlet
 
Web APIs, the New Language Frontier
Web APIs, the New Language FrontierWeb APIs, the New Language Frontier
Web APIs, the New Language FrontierJerome Louvel
 
The Hitchhiker's Guide to Serverless JavaScript
The Hitchhiker's Guide to Serverless JavaScriptThe Hitchhiker's Guide to Serverless JavaScript
The Hitchhiker's Guide to Serverless JavaScriptC4Media
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUppersideConferences
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014Victor Pascual Ávila
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Chris Adamson
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAmazon Web Services
 

Similar to Wwx2014 - Todd Kulick "Shipping One Million Lines of Haxe to (Over) One Million Devices" (20)

WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
 
Workshop oracle
Workshop oracleWorkshop oracle
Workshop oracle
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
SDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLSSDAccel Design Contest: Vivado HLS
SDAccel Design Contest: Vivado HLS
 
Web development revolution
Web development revolutionWeb development revolution
Web development revolution
 
TechTalk: Connext DDS 5.2.
TechTalk: Connext DDS 5.2.TechTalk: Connext DDS 5.2.
TechTalk: Connext DDS 5.2.
 
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013
 
Mm sys 2013-demo
Mm sys 2013-demoMm sys 2013-demo
Mm sys 2013-demo
 
WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)WebRTC Standards Update (October 2014)
WebRTC Standards Update (October 2014)
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?
 
Infinite Toolkit: an overview
Infinite Toolkit: an overviewInfinite Toolkit: an overview
Infinite Toolkit: an overview
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
 
SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017SIP/WebRTC load testing @ KamailioWorld 2017
SIP/WebRTC load testing @ KamailioWorld 2017
 
Web APIs, the New Language Frontier
Web APIs, the New Language FrontierWeb APIs, the New Language Frontier
Web APIs, the New Language Frontier
 
Web APIs, the New Language Frontier
Web APIs, the New Language FrontierWeb APIs, the New Language Frontier
Web APIs, the New Language Frontier
 
The Hitchhiker's Guide to Serverless JavaScript
The Hitchhiker's Guide to Serverless JavaScriptThe Hitchhiker's Guide to Serverless JavaScript
The Hitchhiker's Guide to Serverless JavaScript
 
Upperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards UpdateUpperside Webinar - WebRTC Standards Update
Upperside Webinar - WebRTC Standards Update
 
WebRTC standards update - November 2014
WebRTC standards update - November 2014WebRTC standards update - November 2014
WebRTC standards update - November 2014
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
 

More from antopensource

Créer son logo vectoriel avec Inkscape
Créer son logo vectoriel avec InkscapeCréer son logo vectoriel avec Inkscape
Créer son logo vectoriel avec Inkscapeantopensource
 
Prise en main rapide et facile de Gimp
Prise en main rapide et facile de GimpPrise en main rapide et facile de Gimp
Prise en main rapide et facile de Gimpantopensource
 
Low fi prototype par Pol Gaosdoué
Low fi prototype par Pol GaosdouéLow fi prototype par Pol Gaosdoué
Low fi prototype par Pol Gaosdouéantopensource
 
Atelier brand utility 03.11.2015 Silexl Labs2
Atelier brand utility 03.11.2015  Silexl Labs2Atelier brand utility 03.11.2015  Silexl Labs2
Atelier brand utility 03.11.2015 Silexl Labs2antopensource
 
Atelier Blender Fev-2016 2/2
Atelier Blender Fev-2016  2/2Atelier Blender Fev-2016  2/2
Atelier Blender Fev-2016 2/2antopensource
 
Atelier Blender Fev-2016 1/2
Atelier Blender Fev-2016 1/2Atelier Blender Fev-2016 1/2
Atelier Blender Fev-2016 1/2antopensource
 
Silexlabs atelier couleurs 01
Silexlabs atelier couleurs 01Silexlabs atelier couleurs 01
Silexlabs atelier couleurs 01antopensource
 
Jive the renovation of Aswing
Jive the renovation of AswingJive the renovation of Aswing
Jive the renovation of Aswingantopensource
 
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...antopensource
 
WWX2014 speech : Elliott Stoneham "Tardis go"
WWX2014 speech : Elliott Stoneham "Tardis go"WWX2014 speech : Elliott Stoneham "Tardis go"
WWX2014 speech : Elliott Stoneham "Tardis go"antopensource
 

More from antopensource (11)

Atelier node.js
Atelier node.jsAtelier node.js
Atelier node.js
 
Créer son logo vectoriel avec Inkscape
Créer son logo vectoriel avec InkscapeCréer son logo vectoriel avec Inkscape
Créer son logo vectoriel avec Inkscape
 
Prise en main rapide et facile de Gimp
Prise en main rapide et facile de GimpPrise en main rapide et facile de Gimp
Prise en main rapide et facile de Gimp
 
Low fi prototype par Pol Gaosdoué
Low fi prototype par Pol GaosdouéLow fi prototype par Pol Gaosdoué
Low fi prototype par Pol Gaosdoué
 
Atelier brand utility 03.11.2015 Silexl Labs2
Atelier brand utility 03.11.2015  Silexl Labs2Atelier brand utility 03.11.2015  Silexl Labs2
Atelier brand utility 03.11.2015 Silexl Labs2
 
Atelier Blender Fev-2016 2/2
Atelier Blender Fev-2016  2/2Atelier Blender Fev-2016  2/2
Atelier Blender Fev-2016 2/2
 
Atelier Blender Fev-2016 1/2
Atelier Blender Fev-2016 1/2Atelier Blender Fev-2016 1/2
Atelier Blender Fev-2016 1/2
 
Silexlabs atelier couleurs 01
Silexlabs atelier couleurs 01Silexlabs atelier couleurs 01
Silexlabs atelier couleurs 01
 
Jive the renovation of Aswing
Jive the renovation of AswingJive the renovation of Aswing
Jive the renovation of Aswing
 
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...
WWX14 speech : Justin Donaldson "Promhx : Cross-platform Promises and Reactiv...
 
WWX2014 speech : Elliott Stoneham "Tardis go"
WWX2014 speech : Elliott Stoneham "Tardis go"WWX2014 speech : Elliott Stoneham "Tardis go"
WWX2014 speech : Elliott Stoneham "Tardis go"
 

Recently uploaded

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 

Recently uploaded (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 

Wwx2014 - Todd Kulick "Shipping One Million Lines of Haxe to (Over) One Million Devices"

  • 1. Shipping One Million Lines of Haxe to (Over) One Million Devices Todd Kulick & Gabriel Dalbec
  • 2. Overview • A little bit about TiVo • TiVo and Haxe – Evaluating Haxe for TiVo – Converting a large AS3/Flash code base • Lessons learned • Future directions
  • 3. TiVo Company Profile • Founders Mike Ramsay and Jim Barton • January 1999, TiVo unveiled it's Personal Television Service at the CES • Headquarters in Silicon Valley • Employees: ~600 • 4.5 Million active subscribers
  • 4. Worldwide Presence Multiple countries: United States, Canada, UK, Spain, Sweden, Australia, New Zealand, Mexico, Taiwan, Puerto Rico
  • 5. Product Line Overview • Digital Video Recorders (Roamio) – Powerfully record HD broadcast, cable, IPTV (DVR) – Record up to 1000 hours, 6 shows at once – MSO/MVPD video-on-demand (VOD) integration – Third-party streaming video integration (Netflix, YouTube, Hulu, etc.) • Second Room Video Devices (Mini) – Watch recordings on multiple devices throughout the home • Mobile Applications – Control DVRs (discover content, schedule) – Download or stream video • Online Web Video Portal – Stream content to browser
  • 6. TiVo Anywhere Stream live or recorded shows Download recorded shows Schedule and browse
  • 8. Flash Challenges TiVo device user interface built on AS3 and Flash. • ~500,000 lines of AS3 product code • ~400,000 lines of AS3 tests But we had looming problems… • Support for Flash is waning – Especially on embedded chipsets • User interface performance non-ideal – On embedded devices performance was, at best, bearable • Going forward, fewer and fewer devices would support Flash Could Haxe solve these problems?
  • 9. Haxe Evaluation Criteria • Basic evaluation – Will Haxe/NME/OpenFL work for us generally? – Is the language good (typed, efficient, easy to use/understand)? – Are the right APIs/capabilities present (graphics/network/etc.)? • Technical evaluation – Will it work well on set-top box hardware? – Will the computational parts be fast(er)? – Will the graphics parts be fast enough? – Will it work for an application the size/scale of ours? • Developer workflow evaluation – What is the development workflow like? – How fast are incremental compiles? – How effective/featureful are the code editing/searching tools? – How mature are the debuggers?
  • 10. Haxe Evaluation To evaluate Haxe for our purposes, we would create a Haxe prototype of our user interface application by converting some of our AS3 code to Haxe… • Test the as3tohx conversion tool – Roughly converted 85% of the code to prototype quality • Compare Haxe performance to Flash version • Compare Haxe memory consumption to Flash version • Compare Haxe image size to Flash version • Evaluate Haxe development environment and tools
  • 11. Haxe Evaluation Beginning early last year, four developers spent three months building a prototype and evaluating it against our criteria • AS3 to Haxe conversion process worked reasonably • Prototype’s performance was ~30% better • Prototype’s memory consumption was reasonable • Prototype’s image size was large, but workable • Haxe development tools and IDEs were not quite as good as using Flash, but were acceptable and could be improved Our evaluation suggested that Haxe could meet our strategic, technical and development needs! So just about one year ago, we began to convert to Haxe!
  • 12. Haxe Conversion Strategy • Strategy – Convert AS3 code to Haxe – Compile using haxe/hxcpp and TiVo MIPS cross-compilers – Use NME/OpenFL to provide Flash API – Build new NME back-end on DirectFB API • No OpenGL on many embedded set-top boxes • Customized for best performance on set-top box devices • Scope of conversion – Total lines of code: >900,000 – Unit tests: ~17,000
  • 13. Flash AIR Deployment Encore (10’ UI) Iris Toolkit Video AIR 3.0.3 TiVo Flash EDK System API Outer Loop Networking Flash API Graphics Audio Input Custom API Video Flash Engine AS3 Interfaces Run-time Devices: TiVo set-top boxes
  • 14. NME C++ Deployment Encore (10’ UI) Iris Toolkit Video System API Outer Loop Networking Flash API Graphics Audio Input Custom API Video Native C/C++ Runtime hxcpp (lib/hxcpp) NME (lib/nme) TiVo EDK (lib/edk) Haxe Interfaces Run-time Devices: TiVo set-top boxes, Android TV devices
  • 15. OpenFL HTML/JS Deployment Encore (10’ UI) Iris Toolkit Video System API Outer Loop Networking Flash API Graphics Audio Input Custom API Video Browser JavaScript Engine OpenFL (lib/openfl, lib/openfl-html5-dom) ? Haxe Interfaces Run-time Devices: Browsers, Connected TVs & more…
  • 16. Haxe Conversion Timeline Spring: Looking for a strategy for “after Flash” Summer: Began learning about Haxe Fall: Began evaluating Haxe in earnest Winter: Conversion code complete Spring: WWX 2014 – TiVo Haxe demo! Summer: TiVo Haxe shipping! Spring: Decision to switch to Haxe; WWX 2013 Summer: Conversion from AS3 to Haxe begins 0 10 20 30
  • 17. Haxe Conversion Goals • Adobe/Flash independence – …while leveraging our current user interface codebase – Run-time smaller than embedded Adobe Flash engine, easier to improve, more opportunities • Performance benefits – Better user experience – Makes new, additional look & feel features possible – No JIT “hiccups”, no JIT bugs(!) • Multiplatform development efficiencies – Build great user experiences that can be targeted at many devices – Improvements made in the user experience would potentially have a longer life span and broader applicability
  • 18. Challenges Workflow / development environment issues • IDE support/quality in Linux/OSX – No integrated debugging – No integrate unit test execution Application requirements issues • Application must share graphics/audio resources • NME designed for constant drawing/games Haxe architectural issues • UTF-8 / multilingual support rough • String vs. Bytes confusion • Map implementation handling of interfaces as keys
  • 19. Challenges Run-time issues • Endianness issues in hxcpp • Object churn and memory footprint • Resulting executable size – Generated reflection code large in hxcpp – Object/function boxing in hxcpp – Template size in hxcpp (not using "void*" design pattern) Small compatibility issues • No Date object support of UTC/localtime • Weak reference bugs in hxcpp
  • 21. TiVo Haxe Contributions • Improvements in as3tohx convertor (Dominguez) • New hxcpp debugger • New hxcpp compiled object caching • IntelliJ IDEA Haxe plugin OSS'd & improved • Numerous smaller Flash compatibility improvements in NME/OpenFL (Granick) • New NME back-end for TiVo STBs (DirectFB, custom-video, etc.) – Smarter redraw logic (only when necessary) • New OpenFL HTML5 back-end (Granick) – Support for DOM rendering, optimized for low-end browsers
  • 22. TiVo Future Directions • Deployments through other Haxe back-ends/languages/devices – HTML/JavaScript – Android/iOS • Pull requests for some additional TiVo improvements • Continuing IDE/development environment improvements – Better IntelliJ environment (building, debugging, etc.) – Better multi-threaded support for GC/debugger in hxcpp • Continuing hxcpp improvements – Image size, run-time memory footprint, performance, GC, unreflective • Continuing Haxe/NME/OpenFL churn improvements • Continuing performance study/tuning
  • 23. Haxelibs We Use/Love We use the following...
  • 24. TiVo Haxe Wishlist • Better development environment – Better IDE support on Linux – Integrate debugger into IDE – Integrate munit into IDE – Continuing optimization of compiler and language back-ends • Partial compilation for Haxe (libraries) • Executable image size reduction when using hxcpp • Foreign function integration API for “call in” – CFFI only defines Haxe “call out” • Short lambdas(?!)
  • 25. Haxe has helped TiVo to successfully create a faster, better user experience for our customers. Questions?