Skip to main content
Participant
July 8, 2007
Question

Developing for two servers...

  • July 8, 2007
  • 1 reply
  • 194 views
Hi,

My company is about to start developing a Flash application for recording to Flash Media Server. The client has said they are concerned that if their server with FMS on it goes down, then the application will be unusable. They've asked if it is possible - and whether it has any affect on development - to have two Flash Media Servers running, so that if one server goes down, the SWF will connect to the other server. Can anybody let me know if this is possible/difficult to do?

Also, they had a few other questions for me, which I think I've found the answers to. If anybody could confirm though then I'd feel a lot happier 🙂 They were:

Q1) Is there a way of informing users when the number of allowed connections is used up?
A1) Yes, you can have a preloader on the SWF connecting to the server which will have some informative text (e.g. "connecting - please wait a few moments. Try again later if it takes longer than...")

Q2) Can the application connect via port 80 or port 443 instead of the standard Flash port?
A2) Yes, the SWF file will try these ports if connecting over the standard Flash port fails.

Q3) Does FMS come with a tool to convert FLV files to MP3?
A3) Not currently. There are other (3rd party) tools that claim to do this (e.g. Total Video Converter).

Sorry for the bombardment with questions! If you could answer my first question, and possibly confirm any of the other assumptions, then that would be really appreciated.

Thank you!
    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    July 9, 2007
    They've asked if it is possible - and whether it has any affect on development - to have two Flash Media Servers running, so that if one server goes down, the SWF will connect to the other server. Can anybody let me know if this is possible/difficult to do?

    Sure, this can be done. An easy way would be to have the connection routine on the client side try the primary server first, and then the backup if the connection to the primary fails. Alternately, you could connect up to the FMS admin service via your favorite flavor of application server to check on server conditions before presenting your client with the .swf. By going that route, you cpuld pass the hostname of the appropriate server to the .swf as a runtime variable.


    Q1) Is there a way of informing users when the number of allowed connections is used up?
    A1) Yes, you can have a preloader on the SWF connecting to the server which will have some informative text (e.g. "connecting - please wait a few moments. Try again later if it takes longer than...")


    Correct, you can do that, but there's a big chunk of info missing there. The client side class for connecting to an FMS server (the NetConnection Class) has a method named onStatus that catches status messages from the server. When FMs rejects a client (for license management or any other reason), the netconnection's onstatus event is invoked, and you'll be able to respond to that event in your client side actionscript.

    Q2) Can the application connect via port 80 or port 443 instead of the standard Flash port?
    A2) Yes, the SWF file will try these ports if connecting over the standard Flash port fails.


    Again, correct, but info is missing. you cna actually use whatever ports you want... you just need to configure FMS to bind to those ports, and define the port in your connection string on the client side.

    By default (assuming you define no port in the connection string), the flashplayer will try port 1935, then 80. By default, FMS is configured only to listen on port 1935.

    Q3) Does FMS come with a tool to convert FLV files to MP3?
    A3) Not currently. There are other (3rd party) tools that claim to do this (e.g. Total Video Converter).


    right... FMS doesn't convert anything to anything, so you'll need another solution there.your biggest hurdle is going to be the audio codec (Nellymoser asao), which is closed source, and not cheap.

    Also there are license issues surrounding the use the flashplayer in a server environment (the EULA is pretty clear there), so I'd give that some consideration before proposing a solution such as total video converter (programs like TVC use the flashplayer to read the files)