May 15th, 2008

Today Adobe released the first beta version (10.0.1.218) of the upcoming Flash Player 10, code named “Astro”. You can download the new player for Mac OS X, Linux and Windows from Adobe Labs (make sure you uninstall older players first). There are quite a few enhancements but unfortunately the documentation of the new APIs isn’t available yet (will be released at a later date through Adobe’s Livedocs system) so I haven’t been able to play with them in Actionscript yet.
Content created with the open source Flex 3 SDK is designed to work with Flash Player 9 (9.0.115.0 and higher) and will continue to function as expected with Flash Player 10. To build Flex content that takes advantage of the new features, you need a Flex SDK 3.0.x nightly build which can target the Flash Player 10 Beta.
Some of the highlights in the new Player:
Speex Audio Codec

The open source Speex voice codec offers an alternative to the older, proprietary Nellymoser for audio that delivers the lowest-latency audio experience possible. Flash developers have requested an open source voice codec since the day Macromedia added Nellymoser to Flash Player 6, and it’s great to finally see it happen at Adobe. Nellymoser audio can be decoded by FFmpeg but unfortunately it looks like Speex is one of the missing formats in the FFmpeg audio codecs list at the time of this writing. For Python there are the PySpeex bindings that allow you to create an audio stream object and encode and decode speech audio data. Other software that uses Speex are Asterisk, the open source PBX, the headsets in Microsoft’s Xbox Live and the in-game VOIP function of Half-Life 1. Java developers might want to take a look at JSpeex, a port of Speex for the Java platform.
Real Time Media Flow Protocol (RTMFP)
RTMFP provides a UDP-based secure network transport alternative to RTMP-over-TCP. UDP (User Datagram Protocol) is an efficient and standardized Internet protocol for delivering media assets because of its support for lossy delivery, improving performance of real time communication. RTMFP is always encrypted which helps protect media delivery. With Speex it will be possible to take advantage of the new RTMFP partial-reliability feature to reduce network latency and it also works over the Flash Player’s Real Time Messaging Protocol (RTMP). PyAMF was created for the AMF support in the RTMP protocol, which we’re trying to build for Python with Twisted in the RTMPy project. Adobe basically baked P2P into the Flash Player and creating applications like LimeWire or VOIP applications like Skype should be trivial.
Dynamic Sound Generation

In Flash Player 10 you will be able to dynamically create audio. The API is designed to provide a low level abstraction of the native sound driver, providing the most flexible platform to build your music applications on. Tinic Uro, one of the Flash Player engineers at Adobe, writes that “the API has one big compromise which I can’t address without large infrastructural changes and that is latency. Latency is horrible to the point where some applications will simply not be possible. To improve latency will require profound changes in the Flash Player which I will tackle for the next major revision. But for now this simple API will likely change the way you think about sound in the Flash Player”. He also mentions that extracting audio data from a microphone and extracting audio from a NetStream object is not possible for this release, but they’re aware that it’s a highly desirable feature. Keith Peters created a sample application that demonstrates the new API.
File Reference runtime access
Macromedia added the FileReference class in Flash Player 8 to give developers the ability to upload and download files using a native Flash Player API. With Flash Player 10 it’s will be possible to save those files back to the local hard disk as well. Files can be accessed as a ByteArray or text using a API in ActionScript without round-tripping to the server. You no longer need to know a server language or have access to a server to load or save files at runtime.
Check out the Adobe Labs wiki for the complete feature list and release notes.
Posted in Flash | No Comments »
May 4th, 2008

There are two parts to PyAMF: the core AMF encoder and decoder, and the gateway/remoting for transporting data between a server and a client.
Currently both parts are written in pure Python but the idea is to create a C version of the AMF encoder/decoder that can be used as a dropin which will increase performance significantly.

This will become a subproject called cpyamf that will be written with Cython, a language for writing Python extension modules that translates files from .cy, .cyp, .cyh to .c, .cpp, .h files.
For more information check the ticket or browse the sub-project in the repository.
Posted in AMF, Cython | 1 Comment »
May 4th, 2008
We’re pleased to announce a new release of PyAMF, a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.
This release improves support for Google App Engine and introduces a new AMF gateway for GAE web applications. Aral Balkan announced he’s using PyAMF in his GAESWF project, which will be used to power the website of the online Singularity conference later this year.
You can try some of the PyAMF examples for GAE on our appspot like the Interactive Python shell example and the PUnit tool to run the PyAMF unit tests on GAE using a web interface. We also added an Ohloh API example.
The dependency on the fpconst module was removed for Python >= 2.5 to make it easier to deploy PyAMF applications on GAE and devices like smart phones. Unfortunately we had to keep it around for the Windows platform due to a float issue with that version of Python 2.5.
Check out the download page, installation instructions or the API documentation. Questions? First stop is the mailing list but we also hang out on IRC.
Posted in Google App Engine, Releases | No Comments »
May 3rd, 2008
Google did the Ajax version of the Python shell, running on Google App Engine, we present you with the Flex version (click image to view the sample):

You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself on the wiki page.
Posted in Flex, Google App Engine, Python, Tutorial | 11 Comments »
May 1st, 2008
The 0.3 release tree has been mostly about building up compatibility with Google’s App Engine.
Because the environment that Google exposes to the developer is quite restricted (for obvious reasons!) we thought it best if we get the entire PyAMF test suite (up to 430 individual tests and counting …!) running.
We have built a simple web app that runs the PyAMF test suite from within the Google App Engine. Its a work in progress and isn’t planning on winning any beauty contests, but works nicely.
Check it out!
Posted in Django, Google App Engine | No Comments »
April 26th, 2008
Ohloh is a website which provides a web services suite and online community platform that aims to map the landscape of open source software development. The Ohloh API is a free, REST-based programming interface to the Ohloh open source directory. You can use the Ohloh API to create your own applications and web services based on Ohloh data. There’s a Python example client and additional examples are available for Java, Ruby, Bash, Perl, PHP and C++.
I decided to create a simple AMF gateway using PyAMF that pulls the account data from Ohloh and then passes it to a Flex application. The reason I use a AMF gateway is because I don’t want to hardcode and expose my API key in the Flex client application, which could be decompiled easily, allowing others to abuse my key.
You can test their API by entering the emailaddress of a registered Ohloh user in the input text-field below, click Submit, and it will display the user’s general account info and load the user’s avatar.
Read the rest of this entry »
Tags: ohloh
Posted in Flex, Python, Remoting, Tutorial | 3 Comments »
April 15th, 2008
PyAMF is a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.
AMF3 and RemoteObject are supported in all the implemented Remoting gateways, currently compatible with Django, Twisted, TurboGears 2, Web2Py and other WSGI supported web frameworks.
Read the rest of this entry »
Posted in Google App Engine, Releases | 3 Comments »
April 12th, 2008
We created a Guestbook Example to demonstrate a full featured application using Flex, Twisted, and PyAMF of course. Check it out after the jump!
Read the rest of this entry »
Tags: example, guestbook, mysql
Posted in AMF3, Flex, Remoting, Tutorial, Twisted | No Comments »
April 10th, 2008

After Google’s announcement on Monday we received a lot of questions about running PyAMF on the Google App Engine so we decided to start working on a tutorial. This is a work in progress and might require some updates to the library. We’re also planning on setting up a demo site on our appspot but more on that later.
Tags: Google App Engine
Posted in Google App Engine, Python | 3 Comments »
March 12th, 2008

Thanks to Louisa Cheung!
Posted in Uncategorized | 1 Comment »