views:

77

answers:

1

Hi guys,
We have a browser based flash(AS2) client application which communicates with
.Net based server app. We are using traditional javascript way
[ie.ExternalInterface.call] to communicate between server and flash client.

We want to remove this dependency on javascript and directly send data to the server from flash. Many times the client has to handle large amount of data coming from server. Also we need to remove long polling between client and server.

Can this be possible using XMLSockets?like opening a socket on the server and clients sending data to this port. Also we need to be able to broadcast updates to multiple(or all) clients connected to the server.

Also we are looking at "Comet" for possible server client communication? Is it possible to integrate Flash,.net using comet?

are there any more approaches?

Thx Amit

+3  A: 

If you are already relying on Flash, it's definitely worth considering Flash Socket to communicate with a custom server in preference to going through XMLHttpRequest and the web server. You can have a plain old TCP connection, which makes the annoyance of long-polling redundant.

“Comet” is a woolly term, but generally means this kind of long-polling which it sounds like you are already doing. It's a bit of a nasty hack, one that I hope will go away with the introduction of WebSocket.

The main practical problem with Flash sockets that WebSocket tries to resolve is that of firewalls/proxies. Flash sockets just try to connect directly, which will fail if you're behind a network boundary with only an HTTP proxy letting you out.

You can of course always use Flash sockets falling back to slow XMLHttpRequest polling where not available.

bobince