Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix in Bittorrent example
[simgrid.git] / examples / bittorrent / Common.java
1 package bittorrent;
2 /**
3  * Common constants for use in the simulation
4  */
5 public class Common {   
6                 
7         public static String TRACKER_MAILBOX = "tracker_mailbox";
8         
9         public static int FILE_SIZE = 5120;
10         public static int FILE_PIECE_SIZE = 512;
11         public static int FILE_PIECES = 10;
12         public static int PIECES_BLOCKS = 5;
13         
14         public static int BLOCKS_REQUESTED = 2;
15         
16         public static int PIECE_COMM_SIZE = 1;
17         /**
18          * Information message size
19          */
20         public static int MESSAGE_SIZE = 1;
21         /**
22          * Max number of pairs sent by the tracker to clients
23          */
24         public static int MAXIMUM_PEERS = 50;
25         /**
26          * Interval of time where the peer should send a request to the tracker
27          */
28         public static int TRACKER_QUERY_INTERVAL = 1000;
29         /**
30          * Communication size for a task to the tracker
31          */
32         public static double TRACKER_COMM_SIZE = 0.01;
33         /**
34          * Timeout for the get peers data
35          */
36         public static int GET_PEERS_TIMEOUT = 10000;
37         /**
38          * Timeout for "standard" messages.
39          */
40         public static int TIMEOUT_MESSAGE = 10;
41         /**
42          * Timeout for tracker receive.
43          */
44         public static int TRACKER_RECEIVE_TIMEOUT = 10;
45         /**
46          * Number of peers that can be unchocked at a given time
47          */
48         public static int MAX_UNCHOKED_PEERS = 4;
49         /**
50          * Interval between each update of the choked peers
51          */
52         public static int UPDATE_CHOKED_INTERVAL = 30;
53         /**
54          * Number of pieces the peer asks for simultaneously
55          */
56         public static int MAX_PIECES = 1;
57 }