File: Developers.txt

package info (click to toggle)
mldonkey 2.8.1-2etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 16,940 kB
  • ctags: 26,220
  • sloc: ml: 138,666; sh: 15,368; cpp: 12,076; ansic: 8,243; asm: 3,858; xml: 3,367; perl: 1,831; makefile: 259; python: 258
file content (152 lines) | stat: -rw-r--r-- 5,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

 Yes, we are looking for developpers. If you have some programming skills, 
you are welcome to help the development of mldonkey. There are different ways
to help us. You can see a bug, or a missing feature, and fix it, and then
send us a patch. If you want to spend more time, you can fix a lot of bugs, or
add more features, and we will grant you access to the CVS in the future.
You can also provide mldonkey with support for another p2p network.

If you don't want how to start, you must first understand the code (see the
informations below), and then, you can call "mldonkey -check_impl" to
see which methods have not been implemented yet. You can also test different
operations and see what is not working good. Another option is to test
other p2p applications and try to import some interesting features in
mldonkey... 

Peer-to-peer systems that could be interested to implement:

 SoulSeek (see pyslsk, a python clone)
 Hotline (see fidelio, an open-source clone)
 Mediaseek (audio galaxy clone)
 File Utopia
 Imesh
 FastTrack

The last ones use cryptography to protect the protocol. Maybe some of them
use the SSL library, and could be cracked this way ? 

Maybe you need now some help to understand the code ?

  1) Learn Objective-Caml (you won't be disappointed):
   --------------------------------------------------  

        http://ocaml.inria.fr/

  2) mldonkey directory tree:
   --------------------------

Special directories:

config/		contains the autoconf configure.in script and other files
distrib/		files distributed with binaries in a release
patches/		patches to external programs (e.g. ocaml)
scripts/		nothing interesting here ...
tools/		useful tools to compile mldonkey (e.g. pa_zog.cma)

Useful general libraries:

cdk/		these two directories contain general modules and
lib/		data structures. diff is from history

net/		socket manipulation library around a select call (mldonkey
		is fortunately not multi-threaded, that's why it works)

chat/		part of the mlchat program inside mldonkey:

mp3tagui/	mp3 manipulation library

Program header:

common/		basic types and data structures common to all
		p2p systems.

Peer-to-peer modules (not necessary):

direct_connect/	Direct-Connect (must work on that)
limewire/	LimeWire (Gnutella client)
opennap/		Open-Napster

donkey/		the client part of donkey
server/		the server part of donkey

Program end (main):

driver/		communication with interfaces and main loop

Graphical interface:

configwin/	configuration windows for lablgtk
gpattern/	tables and columns manipulation in lablgtk
okey/		key manipulation in lablgtk
gui/		the GTK interface

icons/		some icons

  3) General architecture:
   -----------------------

The main loop of mldonkey is located in the net/ library, which is responsible
for managing the connections and the timers around a select system call (there
are no threads in mldonkey).

mldonkey executes its modules in the following way:

1) The common/ part is executed: data structures are defined for all the
  types that are common to all networks. For each type, an _ops type
  defines operations that can be executed on this type. Each network
  will have to fill such a structure to define its specific behaviors for
  these types (well, it looks like object-oriented programming, but we don't
  define classes).

commonTypes.ml: basic simple types (it also contains the network type def)
gui_proto.ml:   the protocol used to communicate with the GUI

  Types and operations on these types that have to be defined by each network.

commonChatRoom.ml: chat rooms
commonClient.ml  : client (either friend or source for a downloaded file)
commonFile.ml    : downloaded file
commonNetwork.ml : network
commonResult.ml  : result of a search
commonServer.ml  : server
commonShared.ml  : shared file
commonUser.ml    : user (either server user or source for a result)

  Main options:

commonOptions.ml : basic options
commonComplexOptions.ml: complex options (downloaded files, servers, friends, etc)

  Different useful functions:

commonSearch.ml
commonChat.ml
commonGlobals.ml
commonInteractive.ml
commonMultimedia.ml

2) All network modules are executed. The network modules have to register a
  network structure (it is often done in the ...Types module). All modules 
  often use the same naming scheme:

...Types.ml     : types specific to a network. operations structures are
                  also often defined there.
...Globals.ml   : basic values (hash tables) and functions to store and
                   manipulate these types.
...Options.ml   : basic options for this network
...ComplexOptions.ml : complex options for this network. often defines how
                  files, servers, etc should be stored in the common
                  option files
...Protocol.ml  : encoding and decoding of messages for that network.
...Clients.ml   : communication between mldonkey and another client.
...Servers.ml   : communication between mldonkey and a server.
...Interactive.ml : most functions that are called from the interfaces on
                  the network objects.
...Main.ml      : the functions to start and stop a network. the start function
                  creates sockets to connect to mldonkey, and timers
                  that are executed from time to time.

3) The final driver/ modules are executed. The last one (...Main.ml) call
  the net/ loop.