Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2012-01-04 Thread Vladimir Blagojevic
Thanks a lot Peter! I will make corrections suggested and issue a pull request! Will see this one through all the way till infinispan-cdi hooks into spi api we made! Cheers On 12-01-04 11:44 AM, Pete Muir wrote: Done, comments on the commit, sorry for the delay! On 28 Dec 2011, at 16:23,

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-21 Thread Pete Muir
On 20 Dec 2011, at 17:15, Vladimir Blagojevic wrote: On 11-12-20 1:54 PM, Pete Muir wrote: That should be pretty trivial. Only hard bit is integrating this into CDI module. Vladimir, do you provide a SPI for object instantiation and injection in the Map Reduce/Distributed Executor

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-21 Thread Vladimir Blagojevic
Pete, a bit more guidance please :-) I read http://docs.jboss.org/weld/reference/latest/en-US/html/extend.html and I looked at the infinispan-cdi code and how InfinispanExtension class wires into CDI container. I understand that part, well, sort of! I've seen how a class whose instances are

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Sanne Grinovero
On 20 December 2011 13:35, Manik Surtani ma...@jboss.org wrote: What else do you think could/should be provided? Whatever people want to do with their data. Imagine you have to update all values by using some external service which provides some needed input, or you want to find all entries by

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Manik Surtani
So you're suggesting that the task is registered as a CDI bean on each remote node, so that requested services can be injected? Makes sense. But this would have to be a part of infinispan-cdi, as an extension to what we have in DistExec. I presume this is what you had in mind? On 20 Dec

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Sanne Grinovero
On 20 December 2011 13:47, Manik Surtani ma...@jboss.org wrote: So you're suggesting that the task is registered as a CDI bean on each remote node, so that requested services can be injected?  Makes sense.  But this would have to be a part of infinispan-cdi, as an extension to what we have in

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Sanne Grinovero
On 20 December 2011 14:07, Manik Surtani ma...@jboss.org wrote: Yup, I agree.  Care to create JIRAs for these two?  I think the first one (adding a cache reference to the task) should be for 5.1.0. For 5.1: https://issues.jboss.org/browse/ISPN-1634 For 6.0 (?) :

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Vladimir Blagojevic
On 11-12-20 9:54 AM, Sanne Grinovero wrote: On 20 December 2011 13:47, Manik Surtanima...@jboss.org wrote: So you're suggesting that the task is registered as a CDI bean on each remote node, so that requested services can be injected? Makes sense. But this would have to be a part of

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Manik Surtani
Vladimir, for you? :) On 20 Dec 2011, at 13:21, Sanne Grinovero wrote: On 20 December 2011 14:07, Manik Surtani ma...@jboss.org wrote: Yup, I agree. Care to create JIRAs for these two? I think the first one (adding a cache reference to the task) should be for 5.1.0. For 5.1:

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Vladimir Blagojevic
Sure, I'd like to hear Pete's opinion here. Can we inject pretty much anything from application scope or do we have to do something special in Mapper and Reducer to prepare objects that can be injected? I'd rather leave interfaces as they are and use injection mechanism to inject objects

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Manik Surtani
Are you asking what else needs to be added to the Mapper and Reducer interfaces to make them CDI-friendly so that implementations can have stuff injected? I suspect nothing need be done except that on the receiving node, if these implementations are annotated as CDI beans, then they should be

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Vladimir Blagojevic
Yeah, that is my question. In conclusion, Mapper/Reducer instances should be passed to CDI container for resolution once they are migrated to execution nodes, but before they are executed on those nodes On 11-12-20 12:29 PM, Manik Surtani wrote: Are you asking what else needs to be added

Re: [infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-20 Thread Pete Muir
That should be pretty trivial. Only hard bit is integrating this into CDI module. Vladimir, do you provide a SPI for object instantiation and injection in the Map Reduce/Distributed Executor stuff? If so, Kevin can probably knock it up in an hour or two + tests ;-) On 20 Dec 2011, at 16:47,

[infinispan-dev] Distributed Executors in write mode, need reference to Cache

2011-12-19 Thread Sanne Grinovero
Highlighting this use case: http://community.jboss.org/message/642300#642300 As I replied on the forum, I think we might need to improve the DistributedExecutorService by providing access to some context to the Future before it's executed remotely, as having a reference to the Cache it's being