Server side actionscript – Hacking Tamarin

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Saturday, August 8th, 2009 @ 12:59 am

As mentioned in my previous post I have been on a short holiday. One of the things I slated to do at nights was to dig deeper into the Tamarin project.

“The Tamarin virtual machine is used within the Adobe® Flash® Player and is also being adopted for use by projects outside Adobe.” - http://www.mozilla.org/projects/tamarin/

Just to start out, I highly recommend having a look through the source if you have any understanding of c/c++ and are working with the flash player at any level. Playing with it I have learnt so much about what really goes on under the hood. I can only liken it to being a mechanic and driver at the same time compared to being just a driver. Things are fine as a driver while everything is going as planned, but when things go wrong as a mechanic as well you can tell whats going on behind the scenes and can make fixes (educated guesses) very quickly.

I began by just extending the virtual machine in c++, and soon found myself adding database abilities. These could then be in turn called from actionscript. This ineviatably led me to looking into server side actionscript. I found the mod_actionscript project on Google code and used this as a rough guidline to do my implementation. I wrapped the virtual machine in a Fast CGI wrapper. This allowed the application to remain loaded inbetween requests and just start from an entry point in the actionscript. Soon I had raw compiled actionscript returning text from Apache. And wow its fast. I have now started building a bit of an actionscript core for fun, giving it activerecord (think rails) like capabilities.

Im starting to look at the different web focused frameworks out there and how they might fit with this. Google Web Toolkit is a really nice implementation, and I can see now why it is like it is. More of a javascript application than web pages. GWT allows the strongly typed world of Java to work well against tested javascript components, forming the larger application. Then theres the rails style. Convention over configuration, loosely typed objects etc. I really love rails but I also love the debugging of Actionscript, which requires the Strongly typed objects. So Im unsure where Ill take things, but for now I will keep playing.

It sucks that the development tools are very limited, jumping from Xcode, to eclipse, to textmate etc but still fun hacking. I have even given the little project a name; RedRocket. And I found a now un-used logo for it ;)

(hehehehe)

All this leads me to the question that has been bugging me for the past week. What ever happened to the examples we saw glimpses of during max last year. They showed actionscript sections inside of an HTML page, being executed on the server.

http://www.youtube.com/watch?v=uImhKFhwAu0&feature=player_embedded

Does anyone have a link to this? Was it just some side project of the developers at Adobe? Did it get canned with the current economic situation. Was it killed as it competed with Cold Fusion to much? – Does anyone know….. does anyone care?

6 Comments   -
  • Comment by Kevin S | August 8, 2009 @ 4:42 am

    I was asking about this too. Server-side AS3 will not be in this version. :(

    http://server.dzone.com/articles/terry-ryan-coldfusion-9

  • Comment by Andrew Strader | August 8, 2009 @ 5:25 am

    In my opinion Tamarin will be of great value to the software development world not only because it will let features of other languages be incorporated into ActionScript (like many of your very cool examples), but also because it will allow more languages to be used to build Flash applications. While the ability to execute ActionScript from within an HTML file is interesting, I would really like to be able to use other languages to create SWF’s with linkage into the Flex SDK and other AS libraries. By embedding the compilers of those languages with Tamarin, we will be able to build Flash apps using Java, Perl, PHP, Python, Ruby, LISP, etc. Adobe should really get moving on that, because it will open up their technology to a much wider community of developers and compete with Micro$oft’s DLR.

  • Comment by cm | August 9, 2009 @ 10:18 am

    yea it would be really nice to have an open solution for SSAS… keep us posted ;) wonderfl is a great example of its use and looking forward to trying out mod as

  • Comment by Adam | September 11, 2009 @ 10:36 am

    Ahhh! Now I see why you haven’t been on Halo lately. ;-)

    We (Adobe) are still very much working on _something_. What we showed at MAX last year was a very early concept. Wish I could say more… but I kind like being labeled a crewl temptress.

  • Comment by Peter Strømberg | February 18, 2010 @ 3:54 pm

    On the trail of server-side actionscript I came across this post. I see redrocketserver.com is no longer, and meanwhile Campbell’s become an Adobe Communuity Professional (congrats, btw).

    So whatever happened to serverside actionscript?
    I stand with a perfectly well performing AIR/swf app that I now need to run server-side to service mobile phone users. Now I’ve either got to re-write the thing in C# (which would be my first move to the dark/server side) or find some fiendish way to refactor my AS3.

    Any glimmers of hope? Any Adobe releases before April?

  • Comment by Bianca | March 18, 2010 @ 2:55 pm

    The monkey shouda been wearing a hat, sunglasses and an earing. Add a title…”Pirates of the Carribean IV” Presto! Another blockbuster hit!!

Leave your comment

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -