Adobe, Mozilla, and Tamarin

By now the press release has gone out announcing Adobe's contribution to the Mozilla project of open source code for their ActionScript Virtual Machine (AVM2), and Brendan has blogged about it. I'm not directly involved with the project itself but have spent a few days reviewing press materials and doing press interviews, so I've had a chance to think about the significance of this announcement and what it means for the Mozilla project and for the web at large. Here are some of my thoughts.

The basics

First, a brief review of what this announcement is about (and what it's not about). (I apologize for repeating material from the press release and elsewhere; I've found in the past that one can't always assume that people have actually read such material.)

Adobe's Flash player executes applications written in ActionScript, a programming language that (in its current version, ActionScript 3.0) is based on the ECMAScript language specification and is therefore a sibling to JavaScript. As part of Flash Player 9 Adobe introduced a new virtual machine (AVM2) for executing ActionScript applications; among other things, AVM2 features a Just In Time (JIT) compiler that can convert ActionScript bytecode (the form into which ActionScript is initially compiled) into native machine instructions for much faster execution of ActionScript 3.0 applications.

Adobe has now taken the code for that AVM2 virtual machine implementation and released it as open source through the Mozilla project as Tamarin. Adobe will continue to develop the Tamarin code, working with other developers from the Mozilla community, and will be using it as the basis of the ActionScript virtual machine in future versions of their own products. The Mozilla project will use Tamarin as part of future versions of SpiderMonkey, the C-based JavaScript engine used in Firefox and other applications, and will include it in future versions of Firefox (beyond Firefox 3) that are built using Mozilla 2 technology.

(The name Tamarin continues the Mozilla tradition of monkey-themed projects, including of course SpiderMonkey itself; like SpiderMonkey, Tamarin is a code name, not a trademark. As noted on the Tamarin project page, we thank Ben Parker for his generosity in allowing us to reuse the name of his existing Tamarin framework for development of Java Swing applications.)

Note that Tamarin is not an open source version of the Flash player; it is simply the virtual machine embedded within Flash Player 9, and does not include all the other components that make up Flash (including the bits that display graphics and play music and video). Adobe will continue to develop and distribute the Flash player on its own as a product separate from Firefox itself.

What it all means

What does this all mean? Let's start with users of Firefox and other applications based on Mozilla technology. They'll get future versions of Firefox and other Mozilla-based products that will run JavaScript-based applications significantly faster, including in particular AJAX-enabled web applications commonly thought of in connection with the Web 2.0 meme. (In its own testing Adobe has seen up to a ten times speedup of ActionScript applications due to the introduction of the AVM2 technology.) Since Firefox and Firefox extensions are partly written in JavaScript (as are other applications built on Mozilla's XUL technology), users will also likely see performance gains in some areas of Firefox itself.

Developers of web applications and XUL-based applications will also realize the benefits of improved performance; they'll be able to develop and deploy new and innovative applications for which the performance demands on current JavaScript engines are just too great. They'll also be able to take advantage of new JavaScript language features coming with ECMAScript 4th Edition, and in addition will be more able to leverage their knowledge of JavaScript in developing Flash applications using ActionScript (or vice versa).

Finally, the Mozilla project will gain yet another major corporate contributor in Adobe, one that's made the largest single code contribution to the project since Netscape originally released the Mozilla source code in 1998. Not only do we gain an important new piece of technology that's critical to our products, we and Adobe both gain the benefit of being able to more closely work together on ECMAScript language technology and avoid unnecessary duplication of efforts; this in turn will allow both the Mozilla project and Adobe to put more resources into other areas important for future innovations.

For Adobe, Mozilla, and others who might join in future, the Tamarin project represents for client-side web technology what the so-called LAMP stack does for server-side web technology: a move to not only centralize development around key specifications (ECMAScript for Tamarin, HTTP, SQL, etc., for the LAMP stack) but also to jointly develop and promote high-quality open source implementations of those specifications. Cooperating on such efforts helps grow the larger commercial and noncommercial ecosystems around the relevant technologies, to the ultimate benefit of all users of the web.

In praise of sustaining innovations

Some might read the above and say, So Tamarin will enable web applications to run faster, maybe even an order of magnitude faster, and make JavaScript and ActionScript more compatible; what's the big deal? We're conditioned to look for world changing, break the mold developments in technology and to dismiss merely incremental improvements. To use the terms popularized by Clayton Christensen, we think disruptive innovations are sexy, and sustaining innovations are not.

I believe this is a serious mistake. First, the terms disruptive and sustaining aren't indicators of the technical merit of innovations; they simply indicate whether the degree to which innovations better satisfy the needs of existing customers (sustaining innovations) vs. appealing to new customers (disruptive innovations). In this sense even something as wonderful as Firefox is better viewed as a sustaining innovation than a disruptive innovation, as I've previously discussed.

Second, the cumulative impact of multiple sustaining innovations can be quite large, and can enable new disruptive innovations to take root and flourish. For example, as many people have pointed out, at least in theory Web 2.0-style applications could have been developed many years before they in fact appeared. The advent of Web 2.0 as we know it was really a function of multiple sustaining innovations that accumulated over time and interacted together:

  • incremental browser features like XMLHttpRequest that enabled basic AJAX techniques to be developed

  • continuous improvements in the performance, stability, and standards compliance of web browsers, which enabled cross-platform dynamic web applications to be more easily developed and debugged

  • continuous improvements in the cost and performance of server-side hardware and software, which enabled organizations to deploy significant web applications without multi-million dollar investments

  • continuous improvements in the ability of organizations to economically manage large numbers of servers, which enabled Google and others to deploy dynamic web applications reaching hundreds of millions of users

  • continuous improvements in the cost, performance, and ubiquity of broadband connections, which enabled more people to run dynamic web applications and actually enjoy the experience

Within each of these areas the individual innovations were relatively small: a minor cost or performance improvement made, a few more browser bugs fixed or new browser features added, a few million more broadband connections provisioned. But in toto these innovations added up to nothing less than a revolution in the way the web can be used.

In this sense everyone who contributes to the Mozilla project–fixing a Mozilla bug, making a performance improvement in Mozilla code (no matter how small), enabling Mozilla-based products to pass yet another standards compliance test, writing a Mozilla test case, creating or revising a Mozilla documentation page, and so on–helps change the future of the web and advance our goal of promoting choice and innovation on the Internet, to the ultimate benefit of everyone. Adobe is the latest such contributor, and most definitely a significant one; we thank them for their contribution and welcome them to the Mozilla project. Please join me in doing likewise!

Comments

tr wrote at 2006-11-07 06:14:

Sounds interesting. Will the current JavaScript-Engine of Firefox/Seamonkey/Thunderbird be abandoned? Doesn't it have some sort of a bytecode compiler as well? How does the code quality compare?

Frank Hecker wrote at 2006-11-07 09:03:

The current SpiderMonkey JavaScript engine (used in Firefox, etc.) will not be replaced, as it does more than just provide a virtual machine; rather the Tamarin code will be integrated into SpiderMonkey. On compilers, the current SpiderMonkey engine can convert JavaScript to byte code, but does not have the ability to convert byte code to native machine instructions; this is a major feature that Tamarin provides. I don't know enough to comment on relative code quality; I'll leave this to others who've actually had experience with both code bases.

Robin wrote at 2006-11-07 06:27:

Thank-you Frank for the excellent writeup. This sounds like great news and a major step forward for the Mozilla project.

funTomas wrote at 2006-11-07 10:52:

Frank, thanks a lot for this valuable post, I've been starving for detailed info on the deal and what's behind the scene, since I spotted it in news.

Jason Barnabe wrote at 2006-11-07 11:21:

You and Brendan both mentioned that this would improve the performance of AJAX web applications. Is there something unique to AJAX that will get sped up, or will all JavaScript-based applications get sped up, and you were just using AJAX as an example?

Ben wrote at 2006-11-07 11:24:

You mention that AVM2 features a JIT compiler. What platforms does this compile for? Will only x86/x86-64/PPC be supported?

Frank Hecker wrote at 2006-11-07 11:28:

There's nothing unique to AJAX in terms of performance improvements from Tamarin. My understanding is that Tamarin should provide performance boosts for any and all JavaScript code executing in the context of Firefox and other applications that embed the future SpiderMonkey engine with Tamarin inside. We just mentioned AJAX in particular because AJAX-style applications make especially heavy use of JavaScript and hence could be expected to benefit more than usual.

Frank Hecker wrote at 2006-11-07 11:38:

Regarding platform support for the JIT compiler, from a brief look at the Tamarin source code it appears that there's code generation support for x86, PowerPC, and ARM; I don't know about x86-64. If you're interested in hearing more in-depth information, I suggest that you attend the developer chat that Brendan Eich will be giving today (Tuesday, November 7) at 10am PST (UTC-8) on the IRC server irc.mozilla.org in the channel #javascript.

Simon wrote at 2006-11-08 03:51:

It's gogint to be interesting when the firefox plugin developers get their hands on flash functionality. We could potentially end up with some very slick interefaces.

Si.

Steven Elliott wrote at 2006-11-08 06:31:

As I understand the press release the AVM2 JIT compiler will allow compilation of ActionScript 3 libraries. In essence this means AS3 APIs such as XMLSocket, NetConnection and NetConnectionChannel will be available. Just having these three APIs available would mean I would drop XHR in an instant. Not just because I would have AMF as a data transport option but I would also have available to me server->client messaging (aka reverse AJAX / Comet). I would appreciate your comments on this.

Frank Hecker wrote at 2006-11-08 07:01:

Simon: Note that this announcement really isn't about enabling Flash functionality in Firefox, in the sense of supporting Flash-style APIs for graphics, audio, video, etc. What's being done is just to support core ECMAScript/JavaScript language functions, which core functions are or will be shared with ActionScript.

Steven Elliott: I don't know exactly which network classes and APIs the Tamarin VM will support. This question would be best asked in the Mozilla JavaScript engine discussion group, mozilla.dev.tech.js-engine.

Mads Bondo Dydensborg wrote at 2006-11-09 01:28:

This really sound like great news.

However, I am bit worried about the implecations for those of us, that are embedding SpiderMonkey. Will this have any negative impact on us, such as breakage of the C API, or more strict licensing, or?

Dino Baskovic wrote at 2006-11-09 15:01:

Less weekly activity reports and more posts like this, please :)

Frank Hecker wrote at 2006-11-09 18:09:

In response to Mads Bondo Dydensborg: I'm not sure what if any changes to the SpiderMonkey embedding API might occur. That's a question best asked in the mozilla.dev.tech.js-engine newsgroup. As for licensing, the licensing of existing SpiderMonkey code and the new Tamarin code is identical; both use the standard Mozilla MPL/GPL/LGPL trilicense.

To Dino Baskovic: I'd like to write more blog posts like this too, but time pressures get in the way :-(

Bora wrote at 2006-11-11 03:31:

Well, It sounds great but as long as performance of DOM calls from a script is not improved, getting script engine faster would not effect the overall AJAX experience at all. Am I wrong?

Supbar (Malaysia) wrote at 2006-11-11 03:35:

It Tamarin will also available for other browser such as IE 6, IE 7 and Opera.Since current world wide browser market share shows IE 6 dominate the browser market ( about 78%). If tamarin is not available for those browsers (specially IE6 ir IE 7) how about users using those browsers??

Frank Hecker wrote at 2006-11-11 09:44:

In response to Bora: The question about DOM calls is best asked in the mozilla.dev.tech.js-engine newsgroup.

In response to Supbar: Other browser vendors are free to use Tamarin code under the terms of the open source licenses. You should ask them what their plans are.

Manian wrote at 2006-11-13 08:16:

It is Tamarin will behave as a plugin such as flash, java and quicktime or it will be integrated in Firefox's rendering engine??

Frank Hecker wrote at 2006-11-13 12:44:

Tamarin is not the same as the Flash plugin (or any other plugin). It is "just" a low-level engine that interprets (or in some cases compiles) the JavaScript language and executes the resulting code. It will be integrated into the existing JavaScript implementation used in Firefox, etc.

Supbar (Malaysia) wrote at 2006-11-14 01:54:

Adobe AVM2 is said to be a Virtual Machine that convert actionscript 3.0 codes into a native machine codes for a maximum execution speed. Now what is the contribution of Tamarin to Adobe AVM2? Is Tamarin will be integrated into Flash Player 9.x..

Frank Hecker wrote at 2006-11-14 11:49:

To Supbar: Tamarin and AVM2 are essentially the same thing. "Tamarin" is the code name given to the project to develop AVM2 as open source code. AVM2 is already part of Flash Player 9. Future versions of the Flash Player will incorporate future versions of the AVM2 code developed as part of the Tamarin project.

Juergen Fey wrote at 2006-11-20 11:06:

Thanks for the clarifications. How big will the brave new world of embedded scripting be?

Reason to ask: I am thinking about embeddeding SpiderMonkey in a typical embedded system (well, ARM9 or two, a few Mbytes left ...). If it gets too big i would need to go the lex yacc bison path or something completely different.

Maybe a SpiderMonkeyNG Lite? Or just the "old" SpiderMonkey?

Frank Hecker wrote at 2006-11-20 12:22:

In response to Juergen Fey: I don't have any numbers for estimated code size of the "new" SpiderMonkey with Tamarin integrated. This is a question best asked of the developers themselves, either via email (their addresses are on the Tamarin project page) or in the mozilla.dev.tech.js-engine newsgroup.

However I will note that minimizing code size appears to be a priority for the Adobe developers, since they don't want to bloat the size of the Flash player. Also, since Tamarin includes code for ARM code generation they've clearly been thinking about the needs of small devices.

Jim Plush wrote at 2006-11-21 13:29:

I wish you people would actually read the post carefully.

1. tamarin will not let you do stupid flash "tweens". It's for making JS faster.

2. Who cares about IE? This is why mozilla is gaining ground, because of getting features like these.

From Bora: " getting script engine faster would not effect the overall AJAX experience at all. Am I wrong?"

you couldn't be more wrong my friend. This paints a bright FUTURE for Ajax development. Especially desktop style AJAX apps. Firefox will be the target platform for all vendors.

Tamarin is the most exciting thing I've seen in a while. I have to create apps that run on 266mhz-800mhz machines. Desktop style ajax apps. This is a HUGE plus.

Bora wrote at 2006-12-12 10:41:

Jim Plush: Well at least you could have taken the whole quote not part of it. A DOM call is very slow as it is in both firefox and seamonkey, and that has nothing to do with the performance of the javascript engine.

Firefox fan (Malaysia) wrote at 2007-01-20 22:06:

What is the diference with getco 1.9 and Tamarin.As i know both are scripting engines..

Frank Hecker wrote at 2007-01-22 13:41:

Firefox fan: I presume you mean Gecko 1.9? Gecko is the core layout engine used in Firefox and other products; it's not a scripting engine per se. Gecko 1.9 is the version of Gecko that will be included in Firefox 3.

The current JavaScript scripting engine used in Firefox is called Spidermonkey; Spidermonkey will be upgraded to use Tamarin as its runtime virtual machine. That new version of Spidermonkey is being created as part of the Mozilla 2 project; that project will also produce a new version of Gecko, Gecko 2. Both Gecko 2 and the new version of Spidermonkey (with Tamarin) will be used in a version of Firefox beyond Firefox 3. For more information go to http://wiki.mozilla.org/ and look for Gecko, Spidermonkey, and Tamarin.

Trackbacks

JD on EP mentioned this post in "Tamarin commentary, day 1":

Tamarin commentary, day 1: Through the day I'll be updating this entry with links & pullquotes I find particularly interesting. It's like drinking from a firehose, though... Adobe's donation to Mozilla of scripting engine sourcecode will take us all awhile to assimilate....

Global Nerdy mentioned this post in "Adobe Donates Tamarin Code to Mozilla Foundation":

<p>Frank Hecker, the Excecutive Director of the Mozilla foundation has a comprehensive post on this announcement, which has been burning ...

The Momo Weblog mentioned this post in "Projet Tamarin : Adobe donne sa machine virtuelle ECMAscript Mozilla":

Adobe, qui a rachet il y a peu Macromdia, le crateur de Flash, vient de librer le code (135000 lignes) de sa machine virtuelle ECMAscript 4 sous licence Mozilla Public Licence. Cela en fait donc un produit open source, nomm Tamarin.

A...

bkchung's WebLog mentioned this post in "플래‹의 액션스크립트 버추얼머‹ 오픈소스화 소‹ (II)":

Frank Hecker, Mozilla : Adobe, Mozilla, and Tamarin 정‹없는 이전 포스트를 보기보‹는 위의 Frank가 깔끔하게 쓴 글을 참고하‹라. Frank

Elsewhere on the 'Net mentioned this post in "Project Tamarin":

http://weblogs.mozillazine.org/roadmap/archives/2006/11/project_tamarin.html...

Backdrifter mentioned this post in "Adobe Donates ActionScript VM to Mozilla":

Adobe has donated the source code to AVM2, their ActionScript virtual machine, to the Mozilla Foundation. The new project is known as Tamarin. As stated in the press release, this is the largest contribution to Mozilla since its inception. For the w...

ryyo's Blog mentioned this post in "Adobe 的 AVM2 source":

Adobe 把 AVM2 open source 了[separator],將它捐給了 Mozilla 的 Tamtrin Project,Mozilla 同時間也發佈了,AVM2 source code (遵循 MPL/GPL/LGPL)..

Sam Ruby mentioned this post in "Tamarin":

Frank Hecker: If we take as a given that this runtime will be ubiquitous, debugged, and performant; and couple this with the recent trends to retarget popular languages to run on a common VM, then why not port some of these same language

GBGames' Blog mentioned this post in "Better Flash Support for Mozilla, GNU/Linux?":

I never thought I would be posting anything from Happy News, but then I saw the article entitled Adobe Gives Mozilla Some Computer Code. Basically, Adobe shared some code with the Mozilla Project related to ActionScript, which is what the Flash playe...

hastalasiesta.org mentioned this post in "Tamarin":

I&#8217;m a bit surprised how little speculation there have been about the Tamarin project. If you have no clue what I&#8217;m talking about; let me break it down for you.

Adobe, the current owners of what used to be the Macromedia Flash Player, have m

Submit a comment

Please enter comments as plain text only; no HTML tags are allowed. All comments and trackbacks are moderated, and will not be displayed until approved by the moderator.

Comments are closed for this story.

Trackbacks are closed for this story.