If you speak Russian and want to help Denis, I am sure he will appreciate it. Check out the translation project on github for details.
and
Thank you Denis!
<c:list-property name="*" displayName="Installed extensions" readOnly="true" required="false">
<c:map-property name="*" displayName="Name" readOnly="true">
<c:simple-property name="module" displayName="Module name" readOnly="true"/>
</c:map-property>
</c:list-property>
WHEN | EVENT | TRACK & ROOM | SPEAKER |
11:00-11:10 | CrossDesktop (H.1308) | Christophe Fergeau | |
11:00-11:05 | Legal Issues (AW1.125) | Richard Fontana | |
11:00-11:55 | JBoss.org (K.3.201) | Marek Goldmann | |
11:00-11:05 | Free Java (K.4.401) | Mark Wielaard, Andrew Haley, Andrew Hughes | |
12:00-12:55 | JBoss.org (K.3.201) | Geoffrey De Smet | |
12:30-12:55 | libguestfs - tools for modifying virtual machine | Virtualization & Cloud (Chavanne) | Richard Jones |
13:00-13:25 | Virtualization & Cloud (Chavanne) | Pádraig Brady | |
13:00-13:55 | JBoss.org (K.3.201) | Grant Shipley | |
14:00-14:25 | Virtualization & Cloud (Chavanne) | Francesco Vollero | |
14:00-14:55 | JBoss.org (K.3.201) | Carlo De Wolf | |
15:00-15:50 | Hypervisors (Janson) | Paolo Bonzini | |
15:00-15:55 | JBoss Forge / Arquillian: Two Missing Links in | JBoss.org (K.3.201) | Koen Aers |
15:00-15:25 | Virtualization & Cloud (Chavanne) | Michal Fojtik | |
15:30-15:55 | Virtualization & Cloud (Chavanne) | Marios Andreou | |
16:00-16:55 | Infinispan: where open source, Java and in-memory | JBoss.org (K.3.201) | Manik Surtani |
16:15-17:00 | CrossDesktop (H.1308) | Christophe Fergeau | |
16:30-17:00 | Legal Issues (AW1.125) | Richard Fontana | |
17:00-17:55 | RHQ: Recent and future developments in the RHQ | JBoss.org (K.3.201) | Heiko Rupp |
17:30-18:00 | Legal Issues (AW1.125) | Richard Fontana | |
18:00-18:55 | Guvernor/JBPM : Managing workflows and business | JBoss.org (K.3.201) | Geoffrey De Smet, Marco Rietveld |
18:00-18:30 | Thermostat: Taking over the Java tooling world with | Free Java (K.4.401) | Jon VanAlten, Omair Majid |
18:20-18:35 | Lightning Talks (Ferrer) | Romain PELISSE | |
18:30-19:00 | Free Java (K.4.401) | Andrew Dinn |
WHEN | EVENT | TRACK & ROOM | SPEAKER |
09:00-09:25 | Virtualization & Cloud (Chavanne) | Hans de Goede | |
09:30-09:55 | Virtualization & Cloud (Chavanne) | Hans de Goede | |
10:00-10:45 | Configuration & Systems Management (K.3.601) | Zane Bitter | |
10:45-11:15 | CrossDesktop (H.1308) | Zeeshan Ali (Khattak), Marc-André Lureau | |
11:00-11:15 | Lightning Talks (Ferrer) | Andrew Overholt | |
11:00-11:25 | Virtualization & Cloud (Chavanne) | Itamar Heim | |
11:30-11:55 | Virtualization & Cloud (Chavanne) | Omer Frenkel | |
11:30-12:00 | Free Java (K.4.401) | Mark Wielaard | |
12:00-12:25 | Virtualization & Cloud (Chavanne) | Federico Simoncelli | |
12:30-13:30 | Free Java (K.4.401) | Andrew Haley | |
15:00-15:55 | Virtualization & Cloud (Chavanne) | Daniel Berrange | |
15:30-16:00 | Free Java (K.4.401) | Deepak Bhole | |
16:30-17:00 | Free Java (K.4.401) | Andrew Haley |
curl -i -u rhqadmin:rhqadmin \
http://localhost:7080/rest/1/metric/data/10022/raw/1324656971 \
-X PUT \
-d @/tmp/foo \
-HContent-Type:application/json
{"timeStamp": 132465716178, "value": 123, "scheduleId":10023}
curl -u rhqadmin:rhqadmin \
http://localhost:7080/rest/1/metric/data/raw \
-X POST \
-d @/tmp/foo \
-HContent-Type:application/json
[
{"timeStamp": 132465716078, "value": 123, "scheduleId":10022},
{"timeStamp": 132465716079, "value": 223, "scheduleId":10022}
]
curl -u rhqadmin:rhqadmin \
http://localhost:7080/rest/1/metric/data/10013/baseline \
-HContent-Type:application/json
curl -u rhqadmin:rhqadmin \
http://localhost:7080/rest/1/metric/data/10013/baseline \
-HContent-Type:application/json \
-HAccept:application/json \
-X PUT \
-d '{"max":2.58304512E9, \
"min":0.119968768E9, \
"mean":1.285011894659459E9, \
"computeTime":1326477607296}'
$ cd /jboss-as-7.1.0
$ bin/add-user.sh
Enter the details of the new user to add.
Realm (ManagementRealm) : <press enter>
Username : heiko
Password : <provide password>
Re-enter Password : <provide password again>
About to add user 'user' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'user' to file '/jboss-as-7.1.0/standalone/configuration/mgmt-users.properties'
$ curl --digest -u heiko http://localhost:9990/management/ -d '{"operation":"shutdown" }' -HContent-Type:application/json
$ curl -v --digest -u heiko http://localhost:9990/management/ -d '{"operation":"shutdown" }' -HContent-Type:application/json
Enter host password for user 'heiko': <okieh>
* About to connect() to localhost port 9990 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 9990 (#0)
* Server auth using Digest with user 'heiko'
> POST /management/ HTTP/1.1
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
> Host: localhost:9990
> Accept: */*
> Content-Type:application/json
> Content-Length: 0
>
< HTTP/1.1 401 Unauthorized
< Content-length: 0
< Www-authenticate: Digest realm="ManagementRealm",nonce="6089edca29aa27b064aa1db42d9651eb"
< Date: Fri, 13 Jan 2012 09:54:39 GMT
<
* Connection #0 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9990/management/'
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (127.0.0.1) port 9990 (#0)
* Server auth using Digest with user 'heiko'
> POST /management/ HTTP/1.1
> Authorization: Digest username="heiko", realm="ManagementRealm", nonce="6089edca29aa27b064aa1db42d9651eb", uri="/management/", response="78b9546e7485b661121e34a72d2979f1"
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
> Host: localhost:9990
> Accept: */*
> Content-Type:application/json
> Content-Length: 25
>
< HTTP/1.1 200 OK
< Transfer-encoding: chunked
< Content-type: application/json
< Date: Fri, 13 Jan 2012 09:54:39 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"outcome" : "success"}
$
curl --digest -u heiko http://localhost:9990/management/ -HContent-Type:application/json --data @-<< -EOF-
{
"operation":"read-attribute",
"address":[
{"socket-binding-group":"standard-sockets"},
{"socket-binding":"http"}
],
"name":"port"
}
-EOF-
#!/usr/bin/perl
use JSON qw(objToJson jsonToObj from_json to_json decode_json);
use LWP;
$host = "localhost";
$port = "9990";
$realm = "ManagementRealm";
$user = "heiko";
$password = "okieh";
# Construct url of management api
$url = "http://$host:$port/management";
# the command to send to the server in JSON encoding
$json_data = '
{
"operation":"read-attribute",
"address":[
{"socket-binding-group":"standard-sockets"},
{"socket-binding":"http"}
],
"name":"port"
}
';
# set up a User agent
my $browser = LWP::UserAgent->new();
# Create the request
my $req = HTTP::Request->new(POST => $url);
$browser->credentials("$host:$port",$realm,$user,$password);
$req->content_type( 'application/json');
$req->content($json_data);
# send the request to the server
$res = $browser->request($req);
# If we don't get a 200 back, we finish here
die "No success ", $res->status_line unless $res->is_success;
# Get the content from the response
my $seite_code = $res->content;
print "Received : $seite_code \n";
# decode the json retieved
my $json = JSON->new->utf8;
$obj = $json->decode($seite_code);
%pairs = %{$obj}; # json->decode returns a hash ref
# get the result
$httpPort = $pairs{"result"};
print "Http port is $httpPort \n";
$browser->credentials("$host:$port",$realm,$user,$password);, which makes LWP transparently handle the creation of the digest and re-sending of the request.
#!/opt/local/bin/ruby1.9
require 'json'
require 'net/http'
require 'net/http/digest_auth'
url = URI.parse('http://localhost:9990/management/')
url.user = 'heiko'
url.password = 'okieh'
# data to send to retrieve the server name
data = { "operation" => "read-attribute",
"address" => [],
"name" => "name"}
h = Net::HTTP.new url.host, url.port
# send first request to get nonce
req = Net::HTTP::Post.new url.request_uri
res = h.request req
# compute the digest
digest_auth = Net::HTTP::DigestAuth.new
auth = digest_auth.auth_header url, res['www-authenticate'], 'POST'
# Now send the real request with the nonce
body = JSON.generate(data)
puts "Sending " + body
req = Net::HTTP::Post.new url.request_uri
req.add_field 'Content-Type', 'application/json'
req.add_field 'Authorization', auth
req.body = body
res = h.request req
print "Result " + res.body
# parse the JSON and obtain the 'result' object
data = JSON.parse(res.body)
server_name = data["result"]
print "Server name is " + server_name
http://localhost:7080/rest/1/metric/data/<scheduleId>json_file <- getURL("http://localhost:7080/rest/1/metric/data/10013", httpheader=c(Accept = "application/json"),userpwd="rhqadmin:rhqadmin")
json_file <- "http://..." calls. The next step is then to transform the received data with the help of the "rjson" library into R data structures:## convert json to list of vectors
json_data <- fromJSON(paste(json_file, collapse=""))
## convert the embedded data points into a data frame
df <- data.frame(do.call(rbind,json_data$dataPoints))
## plot the data
plot(df$timeStamp,df$value,xlab="time",ylab="Free memory (bytes)",xaxt='n',type='l')
http://localhost:7080/rest/1/metric/data/10013/raw?duration=259200
As written before, I will talk at the London JBoss User Group next monday about RHQ and JBoss ON.
You may register on the meetup page, which also lists the venue and the directions to get there.

The RHQ team is proud to have released version 4.2 of the systems management and monitoring framework.
This release focuses on:
In addition to that, the release is the very first to have a (limited) REST interface. Another change is the added support for PostgreSQL 9.1.
We want to thank
As always check the release notes for a more complete list of changes. You can get the downloads from sourceforge. And please provide us feedback; for the REST interface we are also looking for usage examples.
Heiko Rupp will showcase RHQ 4.2 at the November meeting of the London JBUG.
[update] In the earlier version I had if (mediaType==MediaType.xxx), which is wrong. MediaType is no enum, so we need to compare via .equals()[/update]
So in RHQ we've introduced the REST api and one of the nice things is the ease of use like this:
@GET
@Path("/customer/{id}")
public Customer getCustomer(@PathParam("id") int custId) ;
where the implementation code e.g. looks up a Customer object in the database and then returns it. Clean expressive API.
Now things start getting more interesting when you consider returning XML, JSON and HTML versions of the document. The first naive way goes like this:
@GET
@Path("/customer/{id}")
public Customer getCustomer(@PathParam("id") int custId) ;
Which fails big time for HTML as (at least RESTEasy) does not know how to serialize the Customer object into HTML. So the next version of the API could look like this:
@GET
@Path("/customer/{id}")
@Produces({"application/json","application/xml"})
public Customer getCustomer(@PathParam("id") int custId) ;
and
@GET
@Path("/customer/{id}")
@Produces("text/html")
public String getCustomerHtml(@PathParam("id") int custId) ;
Where both methods get the customer from the backend. The first one then returns the object directly (as above) whereas the second one renders the object with the help of Freemarker templates into a HTML string and returns this one. Just returning String in both cases is also not working as one may think. So this two methods that internally use almost the same code (actually the *Html one calls the other to retrieve the Customer object).
This works quite nicely, but now I want to start adding explicit return codes (and also caching information). JAX-RS offers the Response class for this, where you can e.g. say Response.ok() or Response.notFound(). So the interface changes to
@GET
@Path("/customer/{id}")
@Produces({"application/json","application/xml"})
public Response getCustomer(@PathParam("id") int custId) ;
and
@GET
@Path("/customer/{id}")
@Produces("text/html")
public Response getCustomerHtml(@PathParam("id") int custId);
Internally we have the same situation as before, but can now explicitly return the result codes we want. This is still not optimal. Luckily JAX-RS allows to inject the Request and the HttpHeaders into the called Java-method, so that we can now write
@GET
@Path("/customer/{id}")
@Produces({"application/json","application/xml","text/html"})
Response getCustomer(@PathParam("id") int custId,
@Context HttpHeaders headers);
and then in the implementation do the following:
MediaType mediaType = headers.getAcceptableMediaTypes().get(0);
ResponseBuilder builder = ...
if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
String html = renderTemplate("customer", customer);
builder = Response.ok(html, mediaType);
}
else {
builder = Response.ok(customer);
}
So now we have one method doing all the work for us without code duplication and which can then use the same logic for caching and e.g. paging or linking.
Support for caching is now only one more step away:
@GET
@Path("/customer/{id}")
@Produces({"application/json","application/xml","text/html"})
Response getCustomer(@PathParam("id") int custId,
@Context Request request,
@Context HttpHeaders headers);
and in the implementation
// Check for conditional get
String tagString = Integer.toString(customer.hashCode());
EntityTag eTag = new EntityTag(tagString);
Date lastModifiedInDb = new Date(customer.getMtime();
Response.ResponseBuilder builder = request.
evaluatePreconditions(lastModifiedInDb,eTag);
if (builder==null ) {
// we need to send the full resource
if (mediaType.equals(MediaType.TEXT_HTML_TYPE)) {
String html = renderTemplate("customer", customer);
builder = Response.ok(html, mediaType);
} else {
builder = Response.ok(customer);
}
} builder.tag(eTag); // Set ETag on response
There is of course still a lot to do, but we have now achieved :
The last step is to add some hints to the client how long it may cache data without the need to go out to the network to do any caching at all. Again JAX-RS has already support for that:
// Create a cache control
CacheControl cc = new CacheControl();
cc.setMaxAge(300); // Customer objects are valid for 5 mins
cc.setPrivate(false); // Proxies may cache this
builder.cacheControl(cc);
This gives the client a hint, that they can consider the customer object valid for 300s = 5min. Proxies on the way are also allowed to cache the returned object. In practice one may make the maxAge depending on e.g. some average update frequencies and also set the "you need to always verify" flag via cc.setMustRevalidate(true).I am sure, this is not yet the last version of the interface, but you can see how it can evolve over time and add new features like support for conditional get. And the best part is that so far the clients don't even have to change a single line of code.
In the future we may want to introduce our own media types like appliation/vnd.rhq-customer+json that newer clients then can make use of. The server can dispatch as seen above the media type and return the appropriate representation. The existing clients, that do not know the new media type can still be serviced by the server just sending this "old" version of it.
I will talk on monday, Nov 28th at the London (UK) JBoss User Group about RHQ and JBoss ON. The talk will give an overview over RHQ and JBoss ON, showcase the new features in RHQ 4.2 and also talk a little bit about the new REST api.
The talk venue is the Skills matter eXchange, where the meetup page has the link to the location and also a link to the registration.
The guys from C2B2 also created a cool poster:

Yesterday I was at JBoss One Day Talk, organized by the local JBoss Users Group. The schedule consisted of 18 sessions in three parallel tracks.
One of the main topics was of course JBoss AS 7, where Heiko Braun was giving an overview, Thomas Diesler talking about OSGi on AS7 and myself talking about management of the server doing a lot of live demoing.
Other JBoss speakers included Kris Verlaenen on JBPM5 and Sashin Shinde on Open Shift. And there was Gavin King announced to talk about Ceylon. While I was looking forward to meet Gavin again, I was also afraid that I would need to talk only to myself with the Ceylon talk being in parallel. (Un :-)fortunately Gavin was not able to make it, so I had a great audience.
My buddy Pavlo Baron was talking about Big Data (slides are available on Slideshare). While this presentation was not as technical as I hoped, it nevertheless got me thinking about some stuff we could integrate in a future version of RHQ.
This conference was organized for the second time this year and I like the intimate atmosphere a lot. And of course the speakers dinner at Löwenbräukeller :-)
Update:
The organizers of One Day Talk have posted some interviews (in German) -- and especially one with Heiko Braun
Last week, the whole RHQ development team met in the Red Hat office in Westford (near Boston). It was very nice for me to finally see some of the old colleagues again after two years and also to meet the new colleagues on the team.
And of course, we took a team photo
We had some very good discussions about possible future features (like e.g. supporting a REST style API into the system or on the future of alerts) - I will post more information soon. In the mornings we had show'n'tell style session where each developer was presenting some area of work to the team.
After work we did some more recreational things like:
One of things we also did is to publish some sort or Roadmap for RHQ and discussed that we will move the source to GitHub at some time and also split up the build in an easier to build way. We will post about that when we are making more progress on this.
Ah and did I mention "Beer"?
In the past few weeks I was also working on implementing a sample REST interface for RHQ (see also here and here). At our team meeting I've showcased the work I've done in the heiko-rest branch of our git repository and we have decided to merge that into the RHQ master branch sooner or later.
UPDATE: this has been merged today (2011/10/09); if you build from source, you need to build the container again.
To stimulate your appetite I will show some samples what you could do with the REST api:
Returning resources in html representation
$ curl localhost:7080/rest/1/user/favorites/resource -u rhqadmin:rhqadmin
[{"resourceWithType":{"@resourceId":"10160","pluginName":"RHQServer"
,"resourceName":"Measurement Subsystem","typeId":10235
,"typeName":"RHQ Server Measurement Subsystem"}}
,{"resourceWithType":{"@resourceId":"10361","pluginName":"jboss-as-7"
,"resourceName":"\/devel\/jbas7\/jboss-as\/build\/target\/jboss-as-7.1.0.Alpha2-SNAPSHOT","typeId":10055
,"typeName":"JBossAS7-Standalone"}}]
Add resource with id 10013 to favorites:
$ curl localhost:7080/rest/1/user/favorites/resource/10013 -X PUT -u rhqadmin:rhqadmin
$ curl localhost:7080/rest/1/user/favorites/resource -u rhqadmin:rhqadmin
[{"resourceWithType":{"@resourceId":"10013","pluginName":"Platforms"
,"resourceName":"en0","typeId":10024
,"typeName":"Network Adapter"}}
,{"resourceWithType":{"@resourceId":"10160","pluginName":"RHQServer"
,"resourceName":"Measurement Subsystem","typeId":10235
,"typeName":"RHQ Server Measurement Subsystem"}}
,{"resourceWithType":{"@resourceId":"10361","pluginName":"jboss-as-7"
,"resourceName":"\/devel\/jbas7\/jboss-as\/build\/target\/jboss-as-7.1.0.Alpha2-SNAPSHOT","typeId":10055
,"typeName":"JBossAS7-Standalone"}}]
And remove it again from favorites:
$ curl localhost:7080/rest/1/user/favorites/resource/10013 -X DELETE -u rhqadmin:rhqadmin
Of course those are only some examples and should illustrate that:
We were also thinking of the possibility for agents in other languages being able to push events and metrics over this interface.
The code is currently in the heiko-rest branch in RHQ-git (at fedorahosted), but we plan to merge it into master as soon as possible. If you want to try the code, check out the branch and either build RHQ from scratch. Or try running /etc/dev-utils/setup-rest/setup.sh to populate the server with the needed libraries (edit that file first), then build server/jar and gui/rest-war in dev-mode so that the artifacts are copied to the server. Then edit rhq.ear/META-INF/application.xml to include the rest war. Of course all this will not be needed after we have merged the code in the master, as the normal build will then have all the artifacts.
The code for the Android app is available from my repository on GitHub
An important part of this whole effort is your input:
Please help us making this great so that you can create great stuff with the interface.
Actually this is not new, but already three weeks old - I wanted to add it here, for completeness sake:
RHQ 4.1.0 has been released on Sept 2nd. Make sure you read the release notes and then proceed to the download.
Major changes include translations of the UI into Chinese, Japanese and Portuguese. Big thanks go to Fusayuki Minamoto, Jijun Liu, Zhongqianglee and Rafael Torres Coelho Soares. Also in this release we have started to detect changes in configurations and files ("Drift"), made enhancements in the area of Bundles (provisioning) and added a first shot at a plugin to manage JBoss AS 7. Last but not least, Elias Ross has enhanced the SNMPTrapd plugin.
As always: please try the release and give us feedback.
The RHQ team has just released version 4.1.0.beta of the RHQ systems management and monitoring suite. This release serves as a preview of the upcoming version 4.1.0 and has a wealth of new features.
Some of the new features are work in progress and will only be finished after 4.1, which means that you can still influence the features with your ideas and feedback.
Release notes are on the RHQ wiki and also contain the link to the download at the bottom.
As written some time ago on the rhq-devel mailing list, I've started implementing a RESTful interface for RHQ. A page on the RHQ wiki shows the requirement and some progress about the implemented API. Development currently happens in a personal feature branch in order to have some code to play around and gather some experience from.
One thing that I found out over the weekend is that at least with JAX-B setting up the interface and REST resource classes is far from trivial and I have been surprised a lot by interesting error messages.
Anyway, the current state of the API is already in a somewhat usable shape (mostly read-only at the moment). The implementation has been done via RESTeasy (RE). Security integration with the RHQ security model is also done and the session bean methods can just use a Subject called caller.
So, having solved some stuff rises even more questions:
/alert/{id}. I feel that the answer may have to do with the next questionint resourceId) How can easily turn them into a link to the target Resource (given that Resource lives below /resource/{id})/resource/1234/availability or /resource/1234/schedules without the need to first obtain those values from the database.A part of the solution to questions 3+4 seem to be to only use Objects in REST domain objects, as the marshalling will skip elements where the corresponding object is null, so for e.g. the parent Resource it is enough to initialize its resource with the Resource id to only include this, but not all the other fields that should then be obtained from their real URI.
But then I am not sure how much my ideas are RESTful at all :-)
I would love to get some feedback here.