Skip to content

Commit

Permalink
Readme and gitignore adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
Fruchuxs committed Jan 5, 2015
1 parent 6731cbb commit b3016d1
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/derby.log
/monitor/derby.log
/monitor.properties
/logs/
/*~
/Database/
/monitor/logs/
/monitor/Database/
/monitor/target/
/client/target/
/*~
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ See the [Project Site](http://fruchuxs.github.io/RichWPS-Monitor/) for Releases
* [Apache Derby](http://db.apache.org/derby/)


## V2 Changelog
Changelog:
* WPS Identifier removed
* MeasureJobFactory now caches WpsProcessEntity instances instead of querying the database at every create call
* MonitorControl Facade extended and adjusted (endpoint selection instead of wpsIdentifier, selection by wpsId also possible)
* getWpsId(URL) and getWpsProcessId(URL, String) methods added to the monitorcontrol facade to fetch the internal database IDs
* DataAccess API extended and adjusted (selection by wpsId, endpoint selection instead of wpsIdentifier)
* wpsUri renamed to endpoint
* endpoint (previously wpsUri) now saved as String (VARCHAR in the database). This makes it easier to handle URLs in the database. The WpsEntity class encapsulate the String field as URL by getter and setter methods. This changes limit the URL length to 255 characters. I have tried to save the endpoints as URL and URI, but this makes selections impossible, because JPA can't compare CLOB in JPQL statements
* Display parameter removed from ListMeasurementRoute; metrics are always shown
* ListWpsProcessesRoute added. /measurement/wps/:id now shows the processes of the WPS entry
* Monitor GUI adjusted
* GUI tests removed (in fact the gui should be replaced in the future and the tests are not working on every machine ..)
* RESTful Interface display option removed. Metrics are now always shown

## Monitor RESTful Routes
By default the Monitor RESTful Interface is reachable on port 1111.

* List registred WPS: /measurement/wps
* List processes of a WPS: /measurement/wps/:wpsId
* List calculated metrics of a WPS Process: /measurement/wps/:wpdId/process/:processIdentifier/count/:count
* :count means the count of measurement values which should be considered for the calculation of metrics

## Monitor Events

### Events triggered by Monitor
Expand Down Expand Up @@ -45,3 +68,33 @@ See the [Project Site](http://fruchuxs.github.io/RichWPS-Monitor/) for Releases
| measurement.wpsjob.wpsexception | WpsProcessEntity |
| scheduler.wpsjob.wasexecuted | WpsProcessEntity |
| monitorcontrol.pauseMonitoring | WpsProcessEntity |

## Client
The Monitor Client uses the RESTful Interface of the monitor to fetch QoSMetrics of WPS Processes of a specific WPS endpoint. The Client is a library which can be used in your project.

###Create a Client instance
To create a new WpsMonitorClient you can use the WpsMonitorClientFactory class.

e.g.
``` java
WpsMonitorClient wpsMonitorClient = new WpsMonitorClientFactory()
.create(new URL("http://example.com:1111/"));
```

### Get Metrics
To get metrics from the monitor, you can use the getWpsProcess(wpsEndpoint : URL, wpsProcessIdentifier : String) : WpsProcessResource method.

e.h.
``` java
WpsProcessResource wpsProcess = client.getWpsProcess(new URL("http://example.com/WebProcessingService", "SimpleBuffer");

for (final WpsMetricResource metric : wpsProcess.getMetricsAsList()) {
System.out.println(metric.toString());
}
```

#### Exceptions
If a WPS or a WPS process not found in the monitor, the client will throw different exceptions. If a WPS not found in the monitor, the client will throw a WpsMonitorClientWpsNotFoundException, otherwise is a WPS Process not found in the monitor, the client will throw a WpsMonitorClientWpsProcessNotFoundException instead.

### More Examples
For more examples and a simple Testcase watch out the de.hsos.ecs.richwps.wpsmonitor.client.Main class which support a static void main method to test the client with a prepared WpsMonitor.

0 comments on commit b3016d1

Please sign in to comment.