Experimental project

This is a sandbox project, which contains experimental code for developer use only.

A server extension to the Services module, allowing interaction between Flash applications and the Core.

#########################################
ZendAMF is dead, long live AMFServer!
#########################################

Strategy

Less is more. The ZendAMF server is a Flash gateway to the Services module, which is itself gateway to the Core. So the point is to let the Services module handle as much of the workload as possible.

In its current state, all AMF requests are sifted through a single service class, which offloads authentication and actual function call duty to the Services module.

On the AS3 side of things, you can use the DrupalNetConnection (in the ./as3 folder) to hook up to the gateway exactly the same way you would with NetConnection, with the added possibility to set a userid and password, which will be passed along to the Services module through the Credentials AMF header (as far as i can tell, that's the standard way to do it).

Installation

  • Install the Services module (dev)
  • Get yourself a copy of ZendAMF and install (Git instructions)
  • Download the latest ZendAMF, unpack and move the Zend folder ("library" folder) to "sites/all/libraries"
  • (optional) Download ZamfBrowser and use the AIR application to test the gateway.
  • Create the service's endpoint (Admin > Configuration > Web Services > Services)
  • Use 'zendamf' for everything for now.
  • Luckily, this should be it.

Heads up!

A few things you need to keep an eye on:

  • Requirements
    • Drupal 7
    • Services (3.0-dev)
  • Don't forget to turn on debug if so required
  • Don't forget to activate the resource you want to use
  • Flash request are considered as originating from an anonymous user for the time being (looking into fixing this).
  • Keep an eye on the Services permission settings. i.e.: To use "node.retrieve", the entry "Get any binary file" needs to be activated.
  • The provided ZendAMF Authentication is disabled in debug mode!!! The authentication mechanism relies on AMF headers to carry the key, and ZamfBrowser does not allow to add header to the input call (at the time of writing).
  • The provided authentication is mainly for testing purposes. It should be functional, but it's a virtual equivalent to your typical padlock: should keep away most, but definitely vulnerable to a few.

Project information