8 Replies Latest reply on Apr 7, 2010 4:06 PM by qazsecs123

    Stratus 2 Support for Directed Routing

    qazsecs123

      I have read from the stratus lab page that stratus 2 supports directed routing. Can anyone give me some examples on how this is done? Is there a way to list all the peerIDs in the current netgroup?

       

       

      thanks in advance

       

      qaz

        • 1. Re: Stratus 2 Support for Directed Routing
          Michael Thornburgh Adobe Employee

          at this time we don't have any examples using Directed Routing.  it is the most academic and "high concept" of the group modes, and also the only mode that requires a fully correct group topology to work correctly (all other modes are tolerant of topology sloppiness) -- that is, directed routing may not work entirely correctly if your group has some members behind certain kinds of NATs/firewalls where not every member can communicate directly with every other member.  this mode would typically be used to create distributed data structures such as Distributed Hash Tables (DHTs).

           

          there is no passive way to list all of the members of a group.  each member has only partial information about the group as a whole.  that's the only way groups can scale.

          • 2. Re: Stratus 2 Support for Directed Routing
            qazsecs123 Level 1

            thanks for the reply mike. yes, i've just watched the video by matthew kaufman on rtmfp and  found out that multicast is more for very large groups of clients. i am actually trying to build a test app to connect at least 30 people at once but no more than 200 (connecting every client to every other client does not seem to work, does it?). what do you suggest i do? abandon the whole p2p idea or is there something out there i am missing out on? thanks again!

             

            qaz

            • 3. Re: Stratus 2 Support for Directed Routing
              Michael Thornburgh Adobe Employee

              multicast works fine at 30-200.  it also works with 2, but is higher overhead (and higher latency) than a point-to-point stream.  multicast isn't a good fit for N-way continuous communication when N is large, but there also aren't any *other* good fits for that use case.

               

              while you've mentioned multicast, you don't specify what you want to do with your test app with 30-200 participants.  if you want to stream video/audio from one to all the rest, multicast is a good fit.  if you want to make a p2p text chat (or similar), posting (NetGroup.post()) is a good fit.  if you just want to have them all join a group and see who gets directly connected to whom (by watching NetGroup.Neighbor.Connect/Disconnect events) then you can do that too.  since you've watched Matthew's presentation, you should have the background to choose the right RTMFP Group mode to your task.

               

              if you post more detail on what you're trying to achieve, perhaps we can give you more specific pointers.

              • 4. Re: Stratus 2 Support for Directed Routing
                qazsecs123 Level 1

                I am trying to create an app very much like a chat room (text and maybe video/audio as well), i also want to add a private email function to send email to a specific user in the current group. i noticed from the video,using netgroups, data have a probability of getting delivered...not sure what this means exactly, but how will it be reliable for an application like a chatroom? (or in a case where data needs to be reliable). is it possible to identify all subscribed clients within the current group (i remember something about this having a probability too...) Thanks!

                 

                qaz

                • 5. Re: Stratus 2 Support for Directed Routing
                  Michael Thornburgh Adobe Employee

                  all group modes, except for Object Replication, are partially reliable.  however, for posting, the likelihood that the message will propagate to everyone in the group is very high (at least as high as data getting through over TCP).

                   

                  as i stated earlier, it is not possible to passively enumerate all of the members of a group.  you can actively enumerate them (if every member posts a message from time to time and every member watches for postings, every member can assemble a list of everyone in the group; keep in mind this does not scale to very large groups without more sophisticated heuristics).

                   

                  for direct messaging between two participants, you should use the 1-1 NetStream API and NetStream.send().  trying to route a "private" message through the a group doesn't make sense because intermediaries will receive the message in the clear as it is routed toward the destination, plus directed routing is sensitive to membership churn and it would be easy for a message to be lost in transit.

                  • 6. Re: Stratus 2 Support for Directed Routing
                    qazsecs123 Level 1

                    thank you very much for all the information, i just want to ask one last question, might be kind of off topic. so, i know that a chat room is probably better implemented using a central server, but if I were to create a web of clients connected to each other with netstream, how big can this "web" of clients grow? or do you think this is a really bad idea from the start? (assuming only text messages are sent, no video/audio data). thank you.

                     

                     

                    qaz

                    • 7. Re: Stratus 2 Support for Directed Routing
                      Michael Thornburgh Adobe Employee

                      if your "web of clients" was similar in structure to an RTMFP Group (with O(log n) direct connections), then it should be able to scale to thousands or millions of members.  however, constructing such a structure is hard and if you were going to do that, you just use a group since it'll all be automatic.

                       

                      if your "web of clients" was a full-mesh (every member connected directly to every other member), then i don't imagine it would scale well beyond 10-40 members, depending on how clever you are about the data forwarding/distribution problem.

                       

                      personally i think NetGroup.post() is a perfect fit for a texty chat room.  it's like 10 lines of code, if that.

                       

                      after MAX2009 i posted the materials from my lab, where we built a P2P video app with text chat using multicast and posting.  here's the thread:

                       

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