ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Gura <ag...@apache.org>
Subject Re: Apache Ignite - Distibuted Queue and Executors
Date Tue, 31 Jan 2017 16:05:11 GMT
Yes, this way is right.

On Tue, Jan 31, 2017 at 5:03 PM, Baskar Sikkayan <baskar.sks@gmail.com> wrote:
> Hi,
>
> ClusterGroup cg = cluster.forOldest();
>
> Is this the way to find the oldest node?
>
> I would like to check if the localNode is the oldest node in the topology to
> execute my code.
>
> Thanks
>
>
> On Jan 31, 2017, at 5:49 AM, Baskar Sikkayan <baskar.sks@gmail.com> wrote:
>
> Hi,
>
>  I will be running ignite along with my Spring boot web application. It
> won’t be a separate application and hence i can not have a client
> application.
>
> But, yes node is oldest topology will work out.
>
> Let me try.
>
>
>
>
>
>
> On Jan 31, 2017, at 3:03 AM, Andrey Gura <agura@apache.org> wrote:
>
> HI,
>
> Just don't start all nodes with the same code. For example you can
> start 3 server nodes and then start client node that will create and
> fill queue.
>
> Another way, run your code only if your server node is oldest in topology.
>
> On Tue, Jan 31, 2017 at 7:35 AM, udayabaski <baskar.sks@gmail.com> wrote:
>
> I am planning to use Apache Ignite Distributed Queue.
>
> I am using Ignite with a spring boot application. So, on bootup, I will be
> adding 20 names in a queue. But, since there are 3 servers in a cluster, the
> same 20 names gets added 3 times. But, i want to add them only once in the
> queue.
>
> /Ignite ignite = Ignition.ignite();
>
> IgniteQueue<String> queue = ignite.queue(
>   "queueName", // Queue name.
>   0,          // Queue capacity. 0 for unbounded queue.
>   null         // Collection configuration.
> );
> /
> Distributed executors, will be able to poll from the queue and run the task.
> Here, the executor is expected to poll, run the task and then add the same
> name to the queue. Trying to achieve round robin here. Only one executor
> should be running the same task at any point of time, though there are
> multiple servers in a cluster.
>
> Any suggestion for this.
>
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Apache-Ignite-Distibuted-Queue-and-Executors-tp10326.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>
>

Mime
View raw message