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?

Compile C/C++ libraries into your swf

Filed under: AIR, Adobe, Flash, Flex, MS .NET — Wrote by Campbell on Wednesday, November 19th, 2008 @ 9:14 am

Sounds cool huh? You look at all the projects on sourcefourge and think, man if only I could do that in the flash player. Well now you can. The project named Alchemy which translates these C and C++ libraries into bytecode for the flash player is now available on Labs. I cant wait to see how people bend and twist this one. I think it may be one of the more interesting projects I have herd come out of MAX so far.

The Download and Documentation as always is displayed and well laid out on Labs:

http://labs.adobe.com/technologies/alchemy/

Looks like its a pretty intensive install for Windows, but Mac looks fine :)

Adobe is providing some example libraries, and developers are encouraged to share their ported libraries.

On another note one thing mentioned in the 2nd Keynote spiked my interest:

“Ben then opens up Visual Studio and edits MXML with color coding in Visual Studio using a new plugin Adobe is creating. Next he shows a native AMF to .net implementation to build a back-end in C#.”

Hmmm to tell you the truth if the plugin for Visual Studio works well, I might end up doing my flex work in that. I never use the visual layout features of Flex Builder these days and Thermo….  I mean Catalyst will do that work for me.

 

Thermo, Cocomo, Growl and sooo much more

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Tuesday, November 18th, 2008 @ 9:57 am

Wow what a day. The press releases are running thick and fast from Adobe today.

First up Thermo, now known as Flash Catalyst. All attendees of the keynote aparently recieved a sneek peek DVD of therm… err hmmm Flash Catalyst. I have Kai bringing me back a copy :) This will be an interesting one to play with, and I know most developers will be looking at the generated code quality as this was a big concern.

Also the AIR runtime has had a new version release. 1.5. head over to the ushal place to get the release http://get.adobe.com/air/

Cocomo went public beta too:

“Cocomo basically leverages the Adobe Connect back-end to deliver features such as Data Messaging (think traditional Remote SharedObjects), VoIP Audio, Webcam Video, File Sharing, Text Chat and so on. The tool is provided in shape of a developer framework and component set that can be used to build Flex based applications.” - flashcomguru.com

This should be a great help to moving the video/voip platforms forward, though I will watch with caution as to how Adobe charge for this. If its anything like their localized sales of software, be afraid, be very afraid.

Also on the video front Flash Media server version 3.5 was announced with dynamic streaming and DVR features (New Zealanders think My Sky for live video on the web).

“Dynamic Streaming makes it easier to deliver a consistent stream even when bandwidth conditions and general network health changes during playback. While similar techniques were possible before it is now even easier and in particular much more seamless to integrate this functionality.
The DVR feature is great when viewing live streams, either to rewind back to the beginning of the broadcast or simply to re-view a certain part of the stream. I can see this being a great feature for sports broadcasts in particular.”  - flashcomguru.com

Also announced was a new Flex features tour app. This is something I suggested to Microsoft on the launch of silverlight. Its the best way to just “play” with the controls and think about what it could do etc. 

The app is an AIR app (which needs AIR 1.5) and shows you through the controls, and it seems that user submission of examples is coming to :)

Adobe also announced a new product called Wave 

“Adobe® Wave™ is an Adobe AIR application and Adobe hosted service that work together to enable desktop notifications. It helps publishers stay connected to your customers and lets users avoid the email clutter of dozens of newsletters and social network update messages.”

Still unsure about this one….

Flash player 10 for Mobile!!!! almost fully featured. Adobe has been working with ARM to have an almost fully featured Flash player 10 on the ARM processor. I guess this means that the open screen project is actually moving forward. I cant wait for the day I can hack the set top box at home with a different AIR app :) .

“Obviously hardware may be a limitation, but demos were shown on Symbian, Win mobile and Android (sorry, no FP on iPhone yet…that’s in Apple’s hands)” - philterdesign.com

Lastly a very cool post from Mike Chambers blog about the AIR framework accessing the Growl notifications on mac. Adobe offered to (and subsequently did) help the open-source project along by adding TCP support, instead of the only option of UDP (which the flash player doesn’t support *sigh*). This version of Growl isn’t released yet but will be soon, and is available from the nightlies. Head over to Mike’s blog for more, and the google project for a lib.

So enough of the re-spout of Adobe announcements. But I thought some of these were too good not to pass on. “We now return you to your regular viewing”….

Finally in Sydney ready for WebDU tomorrow

Filed under: AIR, Adobe, Flash, Flex, General — Wrote by Campbell on Wednesday, June 11th, 2008 @ 1:44 pm

Well yep its that time of year again. I am sitting in my hotel room using over prices broadband so Ill make this quick. If you see me round WebDU tomorrow feel free to wander up and say hi :)
Mike Downey demoing a twist filter applied to video in Flash 10
Attribution-NonCommercial-NoDerivs License by Andrew Muller
See you there.

Wooo Hooo new flash player – maybe with Peer to Peer

Filed under: AIR, Adobe, Flash, Flex — Wrote by Campbell on Friday, May 16th, 2008 @ 1:21 am

Today Adobe announced the public pre-release version of the Flash Player 10. Improvements include:

  • Creative Expression

    • Custom Filters and Effects
    • 3D Effects
    • New Text Engine
    • Text Layout Components
    • Drawing API Enhancements
    • Color Management
  • Visual Performance Improvements

    • GPU Compositing
    • GPU Blitting
    • Anti-Aliasing Engine (Saffron 3.1)
    • Vector Data Type
  • Rich Media
    • Dynamic Streaming
    • RTMFP (Real Time Media Flow Protocol)
    • Speex Audio Codec
  • Other Community Requested Enhancements

    • File Reference
    • Dynamic Sound Generation
    • Large Bitmap Support
    • Context Menu
    • GB18030 Compliance
    • Ubuntu OS Support

My big interests lie in the performance areas, as I am starting to hit a lot of the barriers of the Flash player as customers demand more and more from the Flex applications we make (hoping to show a big one soon – which will explain my lack of blog posts recently).

Also of note was the mention of the possibility of peer to peer UDP communication. I haven’t dug into this one much but if so WOW!

Finally as pointer to the “squeaky wheel gets the grease” ideal the guys involved in the “Adobe, make some noise” campaign finally have something to make some noise about.

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