Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge scm.gforge.inria.fr:/gitroot/simgrid/simgrid-java
[simgrid.git] / doc / index.doc
1 /*! \page index Java Binding documentation home page
2
3 \section welcome Welcome to Simgrid-java documentation home page
4
5 Simgrid-java is a java API that let you use <a href="http://simgrid.gforge.inria.fr/">SimGrid</a> MSG API in your favorite language (java). Without it, you would be forced to use C or one of the other bindings provided. 
6
7 MSG was the first distributed programming environment provided within SimGrid. While almost realistic, it remains quite simple. This describes the Java bindings to this interface.
8
9 \section jMSG_who Who should use this (and who shouldn't)
10 You should use MSG if you want to study some heuristics for a
11 given problem you don't really want to implement. SimGrid-java let you use MSG while coding in Java. So if your need is MSG + Java, you're in the right section!
12
13 \section SimGrid-java Usage overview 
14
15 To make a long story short, it's a JNI binding, so it implies that:
16 \li Most of the MSG and SimGrid documentation about behavioral aspects applies directly to what you are programming. 
17 \li MSG data structures are mapped to Java objects. So it means that from the syntax point of view, you have to know how those objects are. Fortunately, we have generated the Javadoc for those objects. So take a look at it
18
19 Finally, it implies also that your program can crash for 3 main reasons: 
20
21 \li Your Java part is not good: you'll have a good old java exception thrown, and hence you should be able to correct it by yourself.
22 \li Our java part is not good: you'll also have a java exception thrown, but we have real doubts this can happen, since the java part is only a JNI binding. The other option is that it crashed because you used incorrectly the MSG API, so this means also you should have an MSGException. It means you should read carefully MSG samples and/or documentation.
23 \li Something has crashed in the C part. Okay, here comes the tricky thing.
24
25 C crashes mainly for 2 reasons: 
26
27 \li When something goes wrong in your simulation, sometimes the C part stops because you used SimGrid incorrectly, and JNI bindings are not fond of that. It means that you'll have something that looks ugly, but you should be able to identify what's going wrong in your code by carefully reading the whole error message
28 \li It may happen that the problem comes directly from SimGrid: in this case, the error should be uglier. In that case, you may submit a bug directly to SimGrid.       
29
30  */