-
1. Re: How to use infinitespan5.1 compute grid in my application?
sannegrinovero Dec 30, 2011 7:35 AM (in response to kiran1260)Hi Kiran,
your project looks like very interesting, but the description is too high level for me to be able to understand what you need to do or how to best use Infinispan.
As a general guidance, it looks like the Map/Reduce API could be useful - but since I didn't study the whole problem I can only point you to some options, it's hard to say what's "generally recommended" for your specific case.
With the Map/Reduce API you can define a filter criteria which picks on which key/values you want to process, and then the mapping function would be the expensive analysis you need to apply on each matching entry; for this to be simple enough you likely want to store all needed information for a single person in a single object value, not scatter them around (I'm guessing - it seems simpler to me to start this way).
Then each task would be summitted to the Infinispan executor and indeed performed in parallel.
Another option would be to look into the Indexing options, to make the entries you store in the grid searchable by various criterias; this provides you some more flexibility on different kinds of queries and advanced filtering, but index maintenance is an additional complexity and looks like overkill if you can solve this with Map/Reduce.