Wednesday, July 18, 2007

Visiting Paris with Velib (new bike transit system)

I was in Paris last week end so I took this as a good opportunity to visit the city using the new "Velib" system. Velib is a new self service rental bike system that the city of Paris and JCDecaux put in place on July 15th. So you can take and return any of the 10,000+ bikes in any of the 750 locations all aroun Paris. I believe that Paris wants to a total number of 20,000 bikes for  1,400 locations.

The concept is really simple, you can take a bike for 1 euro day and it is free for 30mn, supplet of 1 euro will be charge for additional 30 mn then 2euros for the next one, ... The idea is to use the bike for short periode of time, return it to a station and take another one after 5mn. So I have been enjoying the city all Sunday for only 1 euro, it was really nice to be able to ride
under the Eiffel tower, les Invalides, Place Vendome on all these very nice and romantic parisian places. Not only is it probably one of the best way to visit Paris as a touris but also it is good for the environment...
One the flip side, I need to say that Parisian drivers are not that nice with bikers, even with the 230 miles of bike lanes...
From a technical point of view, the rental system is really nice,  the bike stations have a nice and simple to use system allowing you to take a bike, see your balance and they are all connected together allowing you to take and return bike anywhere in Paris. I will try to find more information about this application that is probably quite fun, and hopefully not like the www.velib.paris.fr site, the stations are available in multiple languages.

Tuesday, July 10, 2007

BPEL in Cluster: In which node my process is working

I was helping a customer with his BPEL in cluster and we needed to follow the flow and on which machine the instance was running.

I simply use a bpel:exec activity with the following code:
java.net.InetAddress addr = null;
try {
  addr = java.net.InetAddress.getLocalHost();
}
catch (Exception e) {
System.out.println("EXCEPTION :"+ e);
}
setVariableData("HostNameVariable", addr.getCanonicalHostName());
This code is just an example of what could be done. Here I am using java.net code API and put the result in a BPEL global variable using the setVariableData method. Obviously you will use appropriate code to differenciate the different nodes for example the name of the OC4J instance, hostname, ... or any interesting value.