Need Access to Fabric Information

mrbahr 
Joined: 2008-09-19
Posts: 21
User is offline
Need Access to Fabric Information

I'm looking through the documentation to see if I can figure out a way to get information regarding the fabric. For example, I need to know specifically if the machine a task is running on is a region leader. Is there an extended API that allows me to query the fabric and get this data? I see that that monitor gets it, so I assume there is a way to do it. Any direction would be helpful.

Of course, the other issue is that it needs to be called from a spring bean that will be loaded in the fabric as a "stay-resident" module that will fire the query periodically. So, any thoughts on the best way to do that would be great.

Thanks for your help.
Tom

guerry  Appistry employee
Joined: 2007-12-21
Posts: 95
User is offline

We've talked about this offline in another conversation, but I thought I'd answer here too for posterity's sake. :-)

The fabric provides various configurable modes that your code can execute in. The "limited" mode is a way you can configure your code so that the fabric only "runs" N instances in the fabric. Say you have 10 workers, and want only one of those workers to be responsible for performing certain operations. You would configure those spring beans/components/tasks as "limited" and specify a min/max of one for the fabric. Though each worker has the code "ready" to run, only that one worker would be delegated to perform the operations. If that worker goes away due to hardware failure, the responsibility will automatically be picked up by another worker.

Thanks,

Guerry