|
| Gadget |
|---|
| User Guide |
| Design Principles |
| Browse the code |
| Download |
How to run Gadget
In order to run Gadget you need the following:
- a Java Virtual Machine version 1.4 or above (get one from here)
- Apache Maven version 2.0 or above (get it from here)
Once you have installed those, make sure you are online since Maven requires to download libraries from its central repository and from the SIMILE repository, then open your favorite unix shell or the windows DOS prompt type:
- mvn package
- ./gadget index -o data/blah -r /path/to/your/pile/of/xml/
- ./gadget chart data/blah
- mvn jetty:run
On windows, use "gadget" instead of "./gadget".
Then point your browser to http://127.0.0.1:8080/ to access Gadget.
If you get an error, jetty is probably still loading the web application, wait a few seconds and then hit reload on your browser. If there is another service running on port 8080 (for instance Tomcat) then you need to choose a different port number. To do so you should set the MAVEN_OPTS variable before starting the gadget web application (before step 4):
- export MAVEN_OPTS="-Djetty.port=$YOUR_PORT"
Here is a breakdown of what the above steps do:
- Step 1 - builds gadget and fetches the required libraries from the web. This step has to be performed only once or everytime you modify Gadget's source code.
- Step 2 - generates the gadget indices used by the web application by processing your XML data. Since the -r option is turned on, it will recursively scan the given directory for all the *.xml files, process them and save the indices in 'data/blah'.
- Step 3 - generates the distribution charts and the sparklines. This stage is optional, meaning that the web application will perform the same operation at runtime if not performed before, but if your dataset is large it's better to pre-compute them to increase the gadget's startup performance when browsing.
- step 4 - runs the gadget web application and provides you a user interface way to access the generated indices via your web browser.


