[jdev] Flash Proxy (was: Jabberd2, Flash Client...)
Richard Dobson
richard at dobson-i.net
Tue Apr 13 19:02:22 CDT 2004
> > Kind of, although I think a flash proxy would be far more useful than a
CCM
> > component, otherwise flash components are forced to use only the jabber
> > server hosted at the same ip address / domain that the flash app came
from.
>
> I agree with Richard that a proxy is a good solution, and it lets anyone
> deploying a Flash/XMPP application get around the security sandbox issue
> with relative ease. It still doesn't help anyone who wants to deploy
> without installing anything on their server (say, users of shared hosting
> services) but not much can be done about that other than crossdomain.xml
> negotiations.
>
> > IMO it is far better to develop the proxy first then possibly the CCM
> > component second if people really see a need for it, IMO the proxy maybe
all
> > thats required to get things working.
> >
> > > So I'm guessing that JECL would be an appropriate
> > > framework for developing these ?
>
> I'm not a C++ developer and I don't know anything about JECL really.
>
> Richard: Can you outline your vision as to how the proxy itself would
> work? ie - negotiations, communications from various parties? Maybe it's a
> straightforward matter, but I admit I'm completely ignorant about such
> things.
Well it should be a pretty simple matter, the proxy would sit on the
server/domain that is serving the flash app.
1) the flash app would connect to the proxy using flash a XMLSocket
2) the flash app would send a command to the proxy to connect to the jabber
server it wants to log into e.g.
<streamcmd>
<connect>jabber.org</connect>
</streamcmd>
3) the proxy would then connect to the jabber server in question and send
back to the user xml indicating it has sucessfully connected e.g.
<streamcmd>
<connected/>
</streamcmd>
or if it failed
<streamcmd>
<connect-failed/>
</streamcmd>
4) the flash app would then send login info to the proxy, which the proxy
would then use to log into the jabber server using the appropriate
authentication protocol, jabber:iq:auth or SASL e.g.
<streamcmd>
<login>
<username>user</username>
<password>letmein</password>
<resource>flashapp</resource>
</login>
</streamcmd>
5) when login is complete the proxy would then tell the flash app login was
ok e.g.
<streamcmd>
<login-ok/>
</streamcmd>
or if failed
<streamcmd>
<login-failed/>
<streamcmd>
6) the client would then revert to using standard jabber/xmpp protocol over
the socket to the proxy and the proxy will relay this along to the jabber
server.
7) if the client wants to end the jabber connection it simply closes its
socket to the proxy (the proxy would then when it detects this socket close
terminate its connection with the remote jabber server)
Well this is how I see it working, using a simple control protocol along the
lines of what is above to control the proxy from the flash app, also
documenting a protocol like this for the flash interop as a JEP would IMO be
a very good idea as it would "set in stone" as it were the interface to the
proxy allowing the development of lots of different implementations that
will interop properly (if people follow the spec :) ).
Comments??
Richard
More information about the JDev
mailing list