Hello, I would like to implement something using Globus and I would like some expert advice on how to do it.
Basically, what I have is a little application (Java) that runs in the background and periodically queries a gt4 MDS service and then does something with the data returned from MDS. This service needs to have the same lifetime as the gt4 container (i.e., starts and stops at the same time as the gt4 container does). (The app currently does periodic queries to the MDS; I plan to maybe switch to using a notifications approach instead at a later time.) Currently, I run this application as a Unix daemon using jsvc (http://commons.apache.org/daemon/jsvc.html). I would like to move away from jsvc and find a way to install my application as part of the gt4 container, and be managed by the container itself. This would be nice because it would remove the dependency on a 3rd party package (jsvc) as well as use the already running JVM of the gt4 container. My first thought was to implement my app as a gt4 singleton resource, and configure it to be initialized on gt4 container startup. In my initialize method I would create a thread that would run in the background and do its work (querying the MDS, crunching the data, etc etc). Using this approach, I guess I could bundle my app as a GAR file; making it easy to distribute and install. I could eventually write a few simple web service methods to query the status of this resource, etc... Does that make any sense? Or maybe there is a better and simpler way of doing this? Any feedback on this would be much appreciated. Best regards, Andre
