Monitoring Tool in the Cloud in (less than) 2 minutes…


This article will show how to deploy a simple monitoring application in the Cloud in a couple of minutes using statusdashboard and Heroku.

I already introduced StatusDashboard several months ago with a small websocket client I wrote allowing to connect to the web application and streaming monitoring data directly in the terminal. The monitoring data is produced by the server which is periodically trying to call a set of defined services (HTTP, HTTPs, FTP, TCP, UDP, …).

In the last version, you can now embed StatusDashboard in any node application with a really simple to use API. This is especially nice to customize it for your needs, for example, getting settings from a configuration file, from a remote service or whatever:

Let’s deploy it on Heroku…

There is one problem with the current approach: When running such an application on Heroku with the default Heroku Plan, it will ends when nobody browse it. This will stop the monitoring loop which is not really useful for a monitoring app… In order to avoid such behavior, I added a heartbeat mechanism last night which is configured from the application settings. It also needs to define some environment variable with the heroku client. Let’s assume that your application is running on http://YOURAPP.herokuapp.com, you have to define this variable like:

It will restart your application (if not, restart it manually), will start to ping itself and keep the application alive.

The code of this article is available at https://github.com/chamerling/statusdashboard-server. You get fork/clone/whatever and start monitoring your services in the next minutes…

And the proof that it works in less than 2 minutes (with a poor Internet connection, and taking time to browse source code…)

 

CXF & Heroku, one more time…


One more Apache CXF and Heroku article to push Web services to the Java PaaS… In some previous articles I explained how to create JAXWS and JAXRS service by cloning/forking/whatever git repositories. This time it is almost the same but I created a maven archetype to generate tons of maven modules quickly and to integrate them in your maven-based projects (OK cloning a repository is faster, it does not download the entire Internet as Maven does…).

Let’s do it with a screen record to check how fast it is. With my poor Internet connection and some typos, I have something running on Heroku in less than 2 min 30…

Here are the commands used in the sample above:

The archetype source code is located at https://github.com/petalslink/petalscloud-maven-archetypes and deployed on OW2 repository. Once the project is generated from the archetype, one can add his own JAXWS-annotated services and associated Spring configuration (src/main/webapp/WEB-INF/beans.xml). Generated project is also available on github at https://github.com/chamerlingdotorg/maven-heroku-jaxws-sample.

Can it really be more easy?

Running JAXRS services in the Cloud in 5 minutes… or less!


Here is a really simple post about how to push REST services in the Cloud. Nothing really technical nor advanced, just some notes and sample using amazing tools CXF + Heroku…

Last time I was speaking about putting some SOAP Web services in the Cloud with Heroku, this time it is the same with REST services… The approach is exactly the same but it uses the JAXRS implementation provided by Apache CXF.

The REST service illustrates how to annotate the Java interface to returns JSON-based responses like:

Once implemented and configured (it uses Spring with the famous WEB-INF/beans.xml file), pushing it to Heroku is as simple as last time, nothing new here. Heroku needs a Procfile to start, and the Maven-based project is configured to generate what the Procfile needs: A shell file which launches a Jetty instance running Apache CXF and all the REST stuff.

The code is located at https://github.com/chamerling/heroku-cxf-jaxrs. You can run it locally to test before pushing to heroku:

  • mvn install
  • sh target/bin/webapp

New alpha release of Petals BPM


The guys from the Petals BPM team just released a new alpha version of Petals BPM, a Web-based, open source BPM modeler.

Petals BPM Choregraphy

Petals BPM Choregraphy

New features mainly deals with collaboration and choregraphy design which are part of BPMN 2.0 specification. A complete release note is available at http://research.petalslink.org/display/petalsbpm/PetalsBPM+v1.0-alpha-3+release+note.

There is also a deployment module which allows to deploy your workflow directly to a SOA infrastructure. This is what I explained last year during the last OW2Con conference:

  1. Model your process
  2. Import services from your services infrastructure with the help of the governance module
  3. Create mappings between model and services
  4. Deploy the ‘runtime model’ to the infrastructure
  5. Run it!

So what if the services infrastructure is in the Cloud? You ‘simply’ run your business process in the Cloud, from the design phase to the runtime one.
While waiting for this all-in-cloud solution, you can start looking and trying Petals BPM directly at http://bpmneditor.ebmwebsourcing.com/ or download it at http://research.petalslink.org/display/petalsbpm/Downloads

Feel free to contact developers at http://research.petalslink.org/display/petalsbpm/Community or on the Petals Forum.

Back From OW2Con 2011


I was in Paris last week for the OW2 annual conference and I gave a talk called « Petals BPM and the Cloud » during the Open Cloud Summit Session (wow what a name!). This talk was about showing that we have things running and ready to be published in the Cloud. As I said during my talk, difficulty is not to provide the SaaS layer, pushing a Web app to the Cloud is not so hard (and not so interesting). The interesting part is about building the PaaS layer. In the current case, the PaaS will provide « Integration as a Service », or how we can use Petals Service Bus, to provide ways to integrate, orchestrate, manage and monitoring business services.

My son is an open source fan

My son is an open source fan

So let’s go back on my talk, where I planned to show things working… Unfortunately, I was not able to show anything due to some low resolution problems and this was really a shame; next time I will prepare a video in case of something like that happens. I am going to record these videos this week to show that we have interesting things under development : We can create business processes with Petals BPM and deploy them on the service bus in order to execute and monitor the process itself in a distributed way.

While waiting these videos, here are the slides of my talk. There are sort of ‘zen’ slides so the talk I gave was really important to understand all… So come and see me next time, or just send me comments.

For the other parts of the conference, as usual, there were really interesting presentations and discussions around OW2, open source and Cloud. One fun thing which I learnt was that OW2-Jonas is used in MS Azure Cloud solution as support of J2EE apps (can I also inform that Microsoft was a big sponsor of OW2Con? Yes, really, they gave money for an open source conference, that’s fun). Well, there were so many interesting things and I can not list all here. But open source is really something companies should have a look if they do not did it already, they will be surprised to see how active and professional is the community behind it.