none
P2P Application Development RRS feed

  • Question

  • Hello,

    I have a requirement wherein I need to develop a tool that first identifies all the devices/computers online and then it has sync the data from the nearest peer device.

    If the data to be fetched is large then it has to connect to multiple devices and then fetch the information in blocks from each of these devices async. This would be something like BitTorrent/Napster etc..

    How do I implement this in C#? What are the available tools for this purpose?

    Regards,

    Amarnath Katti

    Thursday, July 7, 2016 11:25 PM

Answers

  • P2P approaches are not easy to do and not because of programming parts - but netoworking parts. So I guess no programming Forum is the right place and you have to figure out the Networking part before you can even check if your idea is feasible in the first place (it likely is not).
    The networking classes do not care if the other end is on the same computer (loopback IP), on the same switch or on the Voyager 2 probe. Making the path avalible is a networking problem first and foremost.

    P2P is entirely dependant on peers knowing of one another/having a dual way communication path to one another. If they are all behind the same Router/Layer 3 seperator it is possible.
    A basic Layer 2 broadcast can do it. That is how NetBIOS has been working since it was introduced.

    The moment that is no longer the case you need a central server in the internet to get TCP-Hole punching working. Having a server in the internet is neither easy nor without costs.
    On average it is much easier to just rely on a existing VPN service to get two Networks connected through routers. And then just use your "Lokal Network Enabeled" software via the VPN.

    Defining "nearest" (or rather best connection) is tricky at the best of times. Near impossible on the average times.
    Joost's Dev Blog: Why good matchmaking requires enormous player counts

    You should be asking what is possible/has alraedy been done. And then use that.
    Rather then trying to re-invent the wheel eggshaped.

    Monday, July 11, 2016 4:09 PM

All replies

  • You need to post in C# forum

    Sunday, July 10, 2016 3:37 PM
  • You need to post in C# forum

    No, what he or she needs to do is post to the WCF forum.

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

    Monday, July 11, 2016 3:49 PM
  • P2P approaches are not easy to do and not because of programming parts - but netoworking parts. So I guess no programming Forum is the right place and you have to figure out the Networking part before you can even check if your idea is feasible in the first place (it likely is not).
    The networking classes do not care if the other end is on the same computer (loopback IP), on the same switch or on the Voyager 2 probe. Making the path avalible is a networking problem first and foremost.

    P2P is entirely dependant on peers knowing of one another/having a dual way communication path to one another. If they are all behind the same Router/Layer 3 seperator it is possible.
    A basic Layer 2 broadcast can do it. That is how NetBIOS has been working since it was introduced.

    The moment that is no longer the case you need a central server in the internet to get TCP-Hole punching working. Having a server in the internet is neither easy nor without costs.
    On average it is much easier to just rely on a existing VPN service to get two Networks connected through routers. And then just use your "Lokal Network Enabeled" software via the VPN.

    Defining "nearest" (or rather best connection) is tricky at the best of times. Near impossible on the average times.
    Joost's Dev Blog: Why good matchmaking requires enormous player counts

    You should be asking what is possible/has alraedy been done. And then use that.
    Rather then trying to re-invent the wheel eggshaped.

    Monday, July 11, 2016 4:09 PM
  • How about webRTC, Can I use this technology to meet my requirements?

    I am very surprised that c# does not have any tools to achieve this functionality. skype which is owned by Microsoft basically works based on the above concept.

    Tuesday, December 6, 2016 8:12 AM
  • How about webRTC, Can I use this technology to meet my requirements?

    I am very surprised that c# does not have any tools to achieve this functionality. skype which is owned by Microsoft basically works based on the above concept.

    For reliable NAT Traversal, you need TCP/IP Hole punching. There is just no manageable way.
    It is what Skype does. What Teamviewer does. What every VPN Solution does. And of course, download and update services are turned slowly into P2P solutions too.
    And TCP/IP Holepunching requires that you have a central coordination server reachable in the Internet. It does not even need much data, just one set of basic session information and IP/Port pair for every user account. But it must be there and reliably reachable.

    That server is the problem:
    Skype, Teamviewer and all the VPN Solutions can afford that Server (inlcuding power, Licenses and Internetconnection with Static IP Adress).
    Everyone that used to allow direct Downloads via Custom Clients can naturally afford to downgrade towards a P2P Solution.
    Can you too?

    Unless webRTC gives you a free Corrdination Server(Cluster) sponsored by the ones behind it to ue, it will not solve your issue. It moves the Browser more into the direction of "Thick Client", but it still has to deal with all the basic Networking issues.


    Remember to mark helpfull answers as helpfull and close threads by marking answers.

    Tuesday, December 6, 2016 1:30 PM