4 Replies Latest reply on Oct 18, 2006 4:15 PM by Newsgroup_User

    Building a robust P2P application

    Level 7
      I have an application which creates peer-to-peer connections using the MUS.
      One person runs the program as host, and everyone else connects to the host
      IP address. The host creates a second instance of the MUS and after each
      client makes their initial connection the program automatically connects
      them to the second instance as well. The second connection is used to send
      bitmaps (the media of cast members). Users can still send/recieve chat
      messages using the initial MUS instance while receiving large images this
      way.

      This lead me to wonder if I could expand on the concept of using multiple
      ports to gain even more performance. As it is now, the program loops through
      all connected users sending each of them a SendNetMessage one at a time
      through the same port/MUS instance.

      Instead of this I was wondering if there would be any benefit to creating a
      unique instance of the MUS for each user (different ports of course) and
      sending the graphics through that. I'm sure this will work but will it make
      for a more robust application?

      It seems like it would. For instance, suppose 3 users were connected and
      User A (the first to connect) has a relatively slower internet connection.
      Under my existing design, doesn't User A have to completly receive the data
      before the program begins to send the data to User B (and after that User
      C)? It seems like if each user had their own MUS instance to connect to,
      that Users B & C would not be as affected by User A.

      Of course none of this will change the overall upload bandwidth that the
      host has, the pipe is only so big. The only down side I can see is the host
      program would use memory for each instance it had to create. .





        • 1. Building a robust P2P application
          duckets Level 1
          I haven't heard of this being used, and I'm not very experienced with the MUS so I can't offer advice on whether it would be an advantage, but I would be very interested to hear whether you implement it and how it performs in comparison to a single instance! Good luck with it anyway, sounds like a good plan.

          - Ben
          • 2. Building a robust P2P application
            _lw Level 1
            the concept sounds interesting, but i am not sure if you get all the different port so work. For some reason i had not much luck using other port then 1626. May i ask how you manage this? I have still problems running two projectors that should act as a host on different ports but same ip, no problems when using same port but different ips?

            [edit]forget about this post, it was late and i just looked not close enough into the code :)[/edit]

            cheers!


            • 3. Re: Building a robust P2P application
              TravisApple
              Hey Dave C,
              I've wrote a game last year using this exact idea. Took me weeks to get it to work right but it does exactly what you were talking about.

              It uses p2p connections on many different ports to create a web of connections that assure the message gets to where it needs to go even if there are firewalls and people coming on and off the network.

              If you want to talk about it, please email me at travisapple@gmail.com

              Thanks
              T
              • 4. Re: Building a robust P2P application
                Level 7
                Thanks Travis. I've pretty much got it worked out. After a client makes the
                initial connection, the host sends messages to the client telling it to make
                other connections on other ports. Some initial testing does indicate a
                performance increase.

                I am curious about your comment about getting around firewalls. What are you
                doing, trying a specific port and if the connection fails trying another?