[Red5] Scripting languages revisited
Luke Hubbard (firstname.lastname@example.org)
king.selassie at gmail.com
Fri Oct 7 05:00:58 PDT 2005
I have Rhino integrated with Spring in Spark. The tricky bits were exposing
business interface from the script, and reloading the classloader when the
script changes. The code isn't tied into Spark its only dependant on Rhino
and Spring. It uses the scripting interfaces in Spring cvs sandbox. It
doesn't use BSF for reasons given previously. The main one being able to
compile to Java bytecode. I would think I can move it over to red5 with a
few hours coding. If you want I can intergrate the package with red5 this
weekend, and you can take a look starting to add other languages next week.
I think there is Groovy support in Spring standbox but it may need some more
work to get it working with the latest version of Spring.
One area we do need to look at is providing an object model to these scripts
and services. This object model should provide access to the session, client
object, application object, resources, services, etc. When accessed via
remoting it should also provide access to request and ability to set
headers. I started on this in spark, attaching the object model to thread
local allowing it to be accessed anywhere within the script. The object
model should be our own and not a copy of what fcs provides.
I do think your proposal for an fcs compat mode is a very good idea.
Personally its not something I will be using, but for many users coming from
fcs it will be very valuable. We discussed it in one of the skype meetings.
One of the points decided was where possible it should be built as a wrapper
on top of our own object model. For instance the SSAS file object will end
up calling getResource in Spring. I think it would be great if we can all
work together on the red5 object model as im sure there will be indepth
discussions on the api. If you can work on adding more languages (groovy,
beanshell, etc), and the fcs compat layer with an aim to later intergration
(0.3 or 0.5) that would also totally rock.
Let me know your thoughts.
On 10/7/05, The Irrelevant Elephant <theirrelevantelephant at gmail.com> wrote:
> I've started looking into potential scripting mechanisms based on the
> previous discussion on this list, and based on some research I've been
> doing today. I'm currently looking at BSF and I'm pretty confident that
> I can put together a sandbox that uses JS/AS1 (Rhino) pretty quickly.
> My plan is to integrate 2 or 3 languages and also provide a mechanism to
> provide an 'fcs compat' mode that will endeavour to run standard FCS AS1
> I'm happy to continue this and offer the code for later integration, but
> whilst I am working on it - I'd be happy to hear any input anyone has on
> the subject.
> If someone else is already working on this, shout and I'll stop and find
> something else I can be useful for.
> Otherwise I'll see you on the other side ;-)
> - IE
> Red5 mailing list
> Red5 at osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Red5