Author Topic: DB IM P2P Work  (Read 5836 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
DB IM P2P Work
« on: June 08, 2012, 12:06:07 PM »
I got the server side some-what done, see attachment. The problem is it only works on LAN, my friend Justin (my key help on the project) says it is something to do with "port forwarding." I also found this link saying it could be done, but other wise the link is not teaching me anything new  http://msdn.microsoft.com/en-us/magazine/cc301833.aspx

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: DB IM P2P Work
« Reply #1 on: June 09, 2012, 02:30:23 AM »
Download emule 0.50 source code and look for anything containing upnp.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: DB IM P2P Work
« Reply #2 on: June 09, 2012, 06:31:01 PM »
I am guessing emule is some kind of p2p program?

Is it more like Torrent or more like Napster?

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: DB IM P2P Work
« Reply #3 on: June 10, 2012, 03:20:56 AM »
Emule is a serverless ptp program.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: DB IM P2P Work
« Reply #4 on: June 11, 2012, 02:52:20 PM »
wow, I have to dig trough this , sounds Interesting.

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: DB IM P2P Work
« Reply #5 on: June 11, 2012, 02:59:00 PM »
One of the advantages of using their code it that it has been tested by many users, so it's probably more robust than anything a sole programmer can achieve and beta test in DB

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: DB IM P2P Work
« Reply #6 on: June 11, 2012, 03:03:40 PM »
There is no such thing as a "serverless p2p" (as I thought)
This one uses eD2K or Kademlia networks.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: DB IM P2P Work
« Reply #7 on: June 11, 2012, 03:27:57 PM »
Ouch, It is written in c++, and, there is about 2x more code then in DarwinBots. Plus, I have some missing files in my Output window.  :wacko:

ikke do you know any c++ ?  :P

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: DB IM P2P Work
« Reply #8 on: June 11, 2012, 04:42:41 PM »
There is no such thing as a "serverless p2p" (as I thought)
This one uses eD2K or Kademlia networks.
KAD is serverless. You save a list of peers as you exit, and hope not every one of them is dead when you reconnect. They provide the entry to the rest of the network. No server, or everybody is a server. More important, KAD is a searching technique to find files. I don't think we need that. What we do need is the code to build a network and establish and maintain connections even when passing through bottlenecks like routers. If we look at the code they need to successfully send and receive their handshake we have enough, I think.

And yes, I have a basic knowledge of C++. Every programmer hammers me when I say so but computer languages all look alike. My problem is I don't know any libraries...
I have read some sections of the emule code and made some minor alterations for my own mod. I know of the sections you are probably interested in, but don't know them.
Key words to look for: socket, upnp, packet, OP_HELLO

Missing files are due to 3rd party libraries not always included on the source code , or wring VS version (express version).

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: DB IM P2P Work
« Reply #9 on: June 11, 2012, 04:51:14 PM »
Quote
You save a list of peers as you exit,

Interesting, so how do you get the list in the first place? (I really don't like piggy backing on some random peers file sharing xxx vids or something)



My c++ knowledge is very limited.

1. We can get rid of most of the UI stuff.
2. We do not need file searching components.
3. We just need a way to connect to a random peer and transfer a file.

 Can you give me a general idea where to look for the stuff above? (I know that in c++ most of the UI stuff is hard-coded)
« Last Edit: June 11, 2012, 05:09:17 PM by Botsareus »

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: DB IM P2P Work
« Reply #10 on: June 12, 2012, 10:58:26 AM »
Quote
You save a list of peers as you exit,

Interesting, so how do you get the list in the first place? (I really don't like piggy backing on some random peers file sharing xxx vids or something)
It comes with a list of nodes in its installation. Alternatively you can download a nodes.dat with active emule clients from various servers or enter an IP adress to connect to. Translating this to DB means you program the ptp version, publish it and run it somewhere. If you publish that IP others can connect. Once you have an active user base, the new downloadable comes with active Ip's.
Making the system more robust, you'd have a server monitoring the network and publishing the Ip's for people to download as a back up (I say back up to keep server load low). Check out the KAD tab in emule to see what I mean. It also means more code.
Piggybacking on emule / KAD has the advantage of using a large and active ptp network to find the few DB clients


My c++ knowledge is very limited.

1. We can get rid of most of the UI stuff.
2. We do not need file searching components.
3. We just need a way to connect to a random peer and transfer a file.

 Can you give me a general idea where to look for the stuff above? (I know that in c++ most of the UI stuff is hard-coded)
You are still thinking of using KAD, which is overcomplicating things. I'd start with identifying the handshake (OP_Hello if I recall correctly) and identify the code needed to initialise, create, send and receive the packet. That should give you the minimum code required to successfully set up and maintain a ptp network. Everything else is bloat, for your purposes