13 Replies Latest reply on May 4, 2010 1:34 PM by P Mhn

    Possible to run *own* Stratus server or *not* use Stratus for RTFMP?

    cseberino

      Possible to run *own* Stratus server or *not* use it for RTFMP?

       

      In other words, have Flash peers be able to talk RTFMP without needing to ever talk to Stratus server.

       

      It may not always be possible to stay connected to Adobe's Stratus servers so this would be useful.

       

      Possible? How?

       

      cs

        • 2. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
          Sean S Murphy

          Stratus is not the only way to set up p2p connections right now. LCCS has incorporated into their services a way for clients to meet up and converse using rtmfp, and if that doesnt work they provide a fallback to rtmp. This service costs though.

          There has also been word that fms will include in a rtmfp, 'stratus' like service in a future update. So that would also take stratus out of the equation.

          Finally, and what I think you were trying to ask in the beginning, in flash 10.1, there will be a option to have clients meet locally by using "rtmfp:" as your connection. So there will be no need for any server.

           

          Refrence these articles for more information.

           

          http://www.flashcomguru.com/index.cfm/2009/10/7/lccs-fms-stratus

               Talks about lccs and fms and stratus

          http://tv.adobe.com/watch/max-2009-develop/p2p-on-the-flash-platform-with-rtmfp

               Matthew Kaufman talks about p2p networking in flash, and at ~51 minutes he mentions connecting using rtmfp: and never using a server.

          • 3. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
            Michael Thornburgh Adobe Employee

            Flash Player 10.1 beta supports nc.connect("rtmfp:").  a NetConnection connected in this manner can only be used for groups communication (NetStream for multicast and NetGroup) between peers on the local LAN, or for a NetStream that is to receive a pure IP multicast (no P2P or C-S at all).  this is covered in the beta ActionScript reference page for NetConnection.connect().

             

            note that this mode can't be used for 1-1 NetStreams, only group NetStreams and NetGroups.

             

            in order for peers in the group to find each other on the local LAN, you must enable LAN peer discovery and add an IP multicast address to the groupspec.  when using GroupSpecifier to make the groupspec for joining groups (recommended), that's the "ipMulticastMemberUpdatesEnabled" property and the "addIPMulticastAddress()" method, respectively.  for example:

             

              var nc:NetConnection = new NetConnection;

              nc.connect("rtmfp:");

             

              var gs:GroupSpecifier = new GroupSpecifier("com.example.chatapp/mychannel");

              gs.multicastEnabled = true;

              gs.postingEnabled = true;

              gs.ipMulticastMemberUpdatesEnabled = true;

              gs.addIPMulticastAddress("239.254.254.1:30000");

             

              var ng:NetGroup = new NetGroup(nc, gs.groupspecWithAuthorizations());

              var ns:NetStream = new NetStream(nc, gs.groupspecWithAuthorizations());

             

              // ... add event handlers, wait for NetGroup.Connect.Success & NetStream.Connect.Success, then post and publish/play streams

             

            in this example, i specified a group called "com.example.chatapp/mychannel", where P2P multicast and posting are enabled, where peers can discover each other on the local LAN and they use IPv4 multicast address 239.254.254.1 UDP port 30000 to do so.

             

            things get really interesting when you connect to Stratus and enable the group server channel (to get auto bootstrapping) and *also* use LAN peer discovery so that peers on the LAN will be more tightly meshed than they necessarily would through normal group topology evolution.

             

            -mike

            • 4. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
              kielsoft

              @Michael Thornburghhttp://forums.adobe.com/people/Michael%20Thornburgh

               

              Please Mike,  can you please show a full simple example of how one can use the addIPMulticastAddress("192.168.1.1:8008"); to make and LAN discovery/ p2p without using stratus, in this case just among the computer on a local network.

               

               

              and another question is that: Is it possible to use more than one set of IP range?

              for example, in my offiice there are about 3 set of local network of different IP range 32.0.3.1, 83.229.56.1 and 83.229.57.1 but of the same DNS. If one adds these IPv4 IPs and their subnet through the advance option of IPv4 settings, then one will be able to ping any computer on any IP range.

               

              And please can one use something like this for multiple IPcast

               

              addIPMulticastAddress("192.168.1.1:8008", "10.0.1.1:8008")

              • 5. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                kielsoft Level 1

                @Michael Thornburgh

                 

                Please Mike,  can you please show a full simple example of how one can use the addIPMulticastAddress("192.168.1.1:8008"); to make and LAN discovery/ p2p without using stratus, in this case just among the computer on a local network.

                 

                 

                and another question is that: Is it possible to use more than one set of IP range?

                for example, in my offiice there are about 3 set of local network of different IP range 32.0.3.1, 83.229.56.1 and 83.229.57.1 but of the same DNS. If one adds these IPv4 IPs and their subnet through the advance option of IPv4 settings, then one will be able to ping any computer on any IP range.

                 

                And please can one use something like this for multiple IPcast

                 

                addIPMulticastAddress("192.168.1.1:8008", "10.0.1.1:8008")

                 

                 

                 

                Please I need to get the LAN Discovery on LAN with connnecting to Stratus

                • 6. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                  Michael Thornburgh Adobe Employee

                  in order for GroupSpecifier.addIPMulticastAddress() to do anything useful, you must add an IP *multicast* address (either IPv4 in the range of 224.0.0.0 through 239.255.255.255, or IPv6 in ff00::/8).  unicast addresses such as the ones you listed in your posts will have no effect.

                   

                  in my posting above to which you responded, i included all of the relevant pieces you need to use IP4v multicast address 239.254.254.1 UDP port 30000 with a "serverless RTMFP" NetConnection to find peers on the local network.

                   

                  you can add multiple IPv4 and IPv6 (even some of each) to a GroupSpecifier by making multiple calls to GroupSpecifier.addIPMulticastAddress().

                  • 7. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                    kielsoft Level 1

                    Thanks so much for your reply, but my problem is that i dont really have much Networking ideal and all the multicast and the unicast you were saying I dont understand. maybe i will consult our NetAdmin to say more of that. but..

                     

                    1. Is it that I will use NetConnection.connect(null) or NetConnect.connect("rtmp:") or NetConnect.connect() to connect without stratus.

                     

                    2. can you please attach a simple sample file here to illustrate how i should go.

                     

                     

                    Thanks so much.

                    • 8. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                      Michael Thornburgh Adobe Employee

                      you use NetConnection.connect("rtmfp:") to make a "serverless NetConnection" for on-LAN P2P group use.

                       

                      i won't post a complete example.  however, here's how you modify an existing example to use this mode.  read this thread:

                       

                         http://forums.adobe.com/message/2423240#2423240

                       

                      and get the materials there (especially "viewer.mxml" and "publisher.mxml").  ideally go through the handout and slides so you understand what's going on.

                       

                      to modify these for serverless mode on a LAN, make the following changes:

                       

                        1) change variable SERVER to "rtmfp:"

                       

                        2) set variable DEVKEY to "" (empty string)

                       

                        3) in the OnConnect() method, after the "groupSpecifier.serverChannelEnabled = true;" line, add

                       

                            groupSpecifier.ipMulticastMemberUpdatesEnabled = true;

                            groupSpecifier.addIPMulticastAddress("239.254.254.1:30000");

                       

                      that's all there is to it.  this will cause Flash Players to use IPv4 multicast address 239.254.254.1 UDP port 30000 to find each other on your LAN and join up into a group.

                      • 9. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                        Michael Thornburgh Adobe Employee

                        for a good time, fire up a packet sniffer (like Wireshark or tcpdump) and watch the multicast packets.

                        • 10. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                          kielsoft Level 1

                          Thank you so much for your reply, I got it working perfectly now, I am very grateful.

                           

                          Another issue that i came across is the that of multiple lan, please see the picture below.

                          multicastP2P.jpg

                           

                          How can it be possible for me to broadcast from any of these computers (Publisher.air) and all others view it with their Viewer.air?

                           

                          When I publish on a computer ( lets say Computer B) ,only the neighbor computer( Computer C ) could view it but other couldnt,

                          is there any way to let others view the broadcast or like what can I do with this type of network architecture, i tried to replace all the routers with another set of switches( which means all the computers have different it on 32.0.3.x ) and all the computer participated in the Group, but we prefer this arrangement of the network, I mean with the routers, How can I solve this problem.

                           

                          Thanks Mike.

                          I really appreciate your help.

                          • 11. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                            Michael Thornburgh Adobe Employee

                            serverless LAN peer discovery for RTMFP Groups is only for the single-LAN case.  in order for a computer to reach a peer on a different network, you must use a peer introduction service such as Stratus.

                             

                            the IP multicast packets that RTMFP uses to find peers are sent with an IP TTL of 1, so even if you configured IP multicast routing in your routers, the packets shouldn't propagate to other subnets.

                            • 12. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                              kielsoft Level 1

                              Thank you for always being there, you have really helped me this week, I will always be grateful.

                               

                              I will hold to the single LAN solution, that mean we will have to make all the computer to be a LAN and make use of switches instead of the routers.

                              But please how can i get the list of active members of the group on LAN, to what extend is the groupSpecifier.ipMulticastMemberUpdatesEnabled = true can be helpful to this problem?

                               

                              Thanks to You and Adobe.

                              • 13. Re: Possible to run *own* Stratus server or *not* use Stratus for RTFMP?
                                P Mhn

                                Is it possible to use Hamachi VPN and bring computer across the internet in to the same LAN and then use the stratusless connection?