Y     YRRRRR
 Y   Y R    R
  Y Y  R    R
   Y   R RRR
   Y   R   R
  Y    R    R
  Your Radio R
  ---- -----


You are visitor nr:


Powered by
SourceForge.net Logo
Developer section.

> Where can I get the code?

You can check out the newest version with anonymous cvs:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/yourradio login 
 
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/yourradio co yourradio
Alternatively, you can download the Code for the current stable version from here.

> How does it work?

Every Client is connected to a number (4 to 5) other Clients (so called neighbors). Every Client holds PlayLists one for his user and for all the neighbors. The PlayList is a list of files together with the points given to the file. To sort the network we have to define a difference value between two Clients. This value is:
	PlayList p1 : PlayList of Client 1
	PlayList p2 : PlayList of Client 2

	PlayList same = p1 intersect p2

	diff =  sum ( abs (  e.point(p1) – e.point(p2) ))  / |same|  
            e element same

Now a Client can send a ProposePing message to all its neighbors. Those neighbors know the PlayList of the sender and can calculate the diff value between there neighbors and the sender. The neighbors of the sender send back the Client ID of the best (lowest diff value) founded Client. If the sender can connect to a better Client the sender disconnect from worst and connect to best Client.
Ex:
T1:             C1 ---- 40 ----- C ----- 20 ----- C2 ------- C3

T2:             C1 ---- 40 ----- C ----- 20 ----- C2 ------- C3
                   <------  ProposePing ------>

T3:             C1 ---- 40 ----- C ----- 20 ----- C2 ------- C3
          ProposePong -------->      <------ ProposePong
            C1 40                              C3 25

T4:             C1                  C ---- 20 ------- C2
                     <-Disconnect   ¦                 ¦
                                     -------25--------C3

more

> Design.

The Software is divided into three Parts: YourRadio.jar Netoftaste.jar and javazoom.jar. Javazoom is the javalayer mp3 Player used by YourRadio. YourRadio is a simple Command line interpreter that makes use of the Client Facade class in the Netoftaste package.

more