ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathon <jonathon.a.b...@gmail.com>
Subject newbie question: how best to pass Ignite to a ComputeJob
Date Tue, 16 Jun 2015 17:45:16 GMT
Please forgive what may be silly question, but...

I'm using the ComputeTask/ComputeJob framework to arrange for /m/ Upstream
ComputeJobs to send messages to /n/ Downstream ComputeJobs, these latter
running on certain nodes of my cluster that i wish to be in control of. 

My (perhaps naive) plan is for both the U-job and D-job to each hold onto an
/IgniteMessaging/ object that was created for them by the parent ComputeTask
at construction time, and that forms a sort of 'private channel' through
which U-jobs can feed data to a specific D-job. 

Assuming this design is reasonable, what is the recommended method for
passing a specific IgniteMessaging object (or an Ignite object itself, for
that matter) to each CompuetJob?

* through the job's constructor? 

This would lead to the IgniteMessaging object 'm' (and all that it
references) being serialized across the network to the node on which the job
actually runs, no? Is that a bad thing?

* through the ComputeTaskSession mechanism?

I'm new to IoC dependency injection, but perhaps this is the preferred
method for passing Task and Job specific data through to the jobs at
execute() time? 

* by first 'naming' the cluster and then having job 'find' the cluster by
name from within its executed method?

* some other mechanism?

Many thanks


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/newbie-question-how-best-to-pass-Ignite-to-a-ComputeJob-tp503.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message