Server side actionscript – Hacking Tamarin
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?




