1

I have a streaming server (for pushing data not video) setup with GraniteDS and it works great.

I have to include multiple swf files in a web page. Each of these swf files has a data table which includes streaming data(this is a specific requirement - so I really cant combine all data tables into 1 huge data table/swf file). All the swf files however, connect to the same gravity channel/streaming endpoint.

How many connections are there from the web page to the streaming server? Does each swf file start a new streaming connection? Or do all them share the same connection since they are just connecting to a single channel?

Regards, Ravi.

Neo
  • 1,554
  • 2
  • 15
  • 28

1 Answers1

1

Ah, very good question grasshoppa.

Essentially, each one of them has their own dedicated connection. So, if you have 6 swfs, each one would have a connection to the streaming server, so 6 connections. The problem with this is that if you're using RTMPT, your browser might block (or cycle) the extra connections since there's a limit (IE used to have a 2 connections per domain limit, FF is 10 I believe).

The question however is are they all getting streaming data at the same time? Is the data different from swf to swf? One possible solution for this would be to have one of the swf be the 'main' swf which connects to the service, gets all the data and sends it to the other swfs either with Javascript or using LocalConnection.

But, I don't know enough about your specs or why you have multiple swfs in the first place...

J_A_X
  • 12,857
  • 1
  • 25
  • 31
  • Thanks for the reply JAX. I actually tried the inter-swf communication - having one huge parent swf which communicates with all the child swf files. But I faced two issues with this. a) When the parent swf was set to hidden, the streaming stopped. But if the parent swf width and height were set to 1 each, the streaming started again. b) There was considerable lag between the time the parent swf file receives data and the by the time it updates all the child swfs. This lag was sometimes very visible, and there was no lag at all sometimes. Every swf file has real time data. So this is bad. – Neo Apr 23 '11 at 09:39
  • The data is related to the stock market and is real time. Data is different for every swf file - no duplication of stock data. But multiple swf files are a must - for UI and other specification reasons. Having a minimum number of connections to the streaming server is the need of the hour for me! :) Any suggestions? – Neo Apr 23 '11 at 09:44
  • 1
    I'm not sure using several swfs in a page is good form. Personally, if you want real time stock data and lots of charts, either make it a full flex app OR make it all Javascript/html/css. You can mix both sometimes, but 6 swfs is a bit overkill. – J_A_X Apr 26 '11 at 12:46