Re: Service Node vs Data Node

2020-05-18 Thread Stephen Darlington
We’d need to see your code. As I noted previously, running a compute job does 
not start a server node.

> On 18 May 2020, at 11:21, nithin91 
>  wrote:
> 
> Hi 
> 
> W.r.t client mode i am clear, But what is the use of starting the compute
> job on server node as when i start the the job  on server node following
> things happen 
> 
> 
> It is creating a new server node every time and the node is getting
> disconnected once the job is done. But the problem with this behavior, since
> a new node is created as 
> a part of execution of this job, data will be re balanced such that data is
> evenly distributed across
> nodes and when the job completes, then this node goes down which means  data
> on this node is lost.
> 
> 
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/




Re: Service Node vs Data Node

2020-05-18 Thread nithin91
Hi 

W.r.t client mode i am clear, But what is the use of starting the compute
job on server node as when i start the the job  on server node following
things happen 


It is creating a new server node every time and the node is getting
disconnected once the job is done. But the problem with this behavior, since
a new node is created as 
a part of execution of this job, data will be re balanced such that data is
evenly distributed across
nodes and when the job completes, then this node goes down which means  data
on this node is lost.





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Service Node vs Data Node

2020-05-18 Thread Stephen Darlington
Ignition.start() doesn’t start a compute job, it starts a new node (a server 
node by default). If you want t create a client node, you can do that in the 
configuration file or by adding "Ignition.setClientMode(true)” before you start 
the node. Then you can run a compute job:
Ignition.setClientMode(true);
Ignite ignite = Ignition.start("config.xml");

ignite.compute().run(
() -> System.out.println("Hello from a server")
);
Regards,
Stephen

> On 18 May 2020, at 08:49, nithin91 
>  wrote:
> 
> Hi
> 
> I have initially two nodes,
> But when i am initiating the compute job(IgniteCompute compute =
> ignite.compute()) from server i.e Ignite ignite=Ignition.star("Server.xml")
> it is creating a new server node every time and the node is getting
> disconnected once the job is done. But the problem with this behaviour, when
> node joins data will be rebalanced so that data is evenly distributed across
> nodes but when the job completes then this node goes down which means  data
> on this node is lost.
> 
> This  is the log i when i start  a compute job using
> ignite=Ignition.star("Server.xml") 
> 
> Topology snapshot [ver=3, locNode=92d08291, servers=3, clients=0,
> state=ACTIVE, CPUs=8, offheap=13.0GB, heap=11.0GB]
> [13:10:21]   ^-- Baseline [id=0, size=2, online=2, offline=0]
> 
> When the job completes execution, i get below
> 
> Ignite node stopped OK 
> 
> Please let me know whether my understanding is correct.
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/




Re: Service Node vs Data Node

2020-05-18 Thread nithin91
Hi

I have initially two nodes,
But when i am initiating the compute job(IgniteCompute compute =
ignite.compute()) from server i.e Ignite ignite=Ignition.star("Server.xml")
it is creating a new server node every time and the node is getting
disconnected once the job is done. But the problem with this behaviour, when
node joins data will be rebalanced so that data is evenly distributed across
nodes but when the job completes then this node goes down which means  data
on this node is lost.

This  is the log i when i start  a compute job using
ignite=Ignition.star("Server.xml") 

 Topology snapshot [ver=3, locNode=92d08291, servers=3, clients=0,
state=ACTIVE, CPUs=8, offheap=13.0GB, heap=11.0GB]
[13:10:21]   ^-- Baseline [id=0, size=2, online=2, offline=0]

When the job completes execution, i get below

Ignite node stopped OK 

Please let me know whether my understanding is correct.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Service Node vs Data Node

2020-05-18 Thread nithin91
Thanks.This information is very helpful.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Service Node vs Data Node

2020-05-18 Thread Stephen Darlington
> To execute a compute job on server nodes, should i use the below command by
> starting as client node.Please correct me if  i am wrong.
> IgniteCompute compute = ignite.compute(cluster.forRemotes());

That would start a compute job on a remote node, which could be another client! 
If you just say ignite.compute() it defaults to server nodes. You can be 
explicit with cluster.forServers().

> Also can you please confirm, that a compute job can be initiated only on a 
> client node(i.e by setting the property set client node=true in the bean 
> file).

A compute job can be initiated from any node, client or server.

Regards,
Stephen

Re: Service Node vs Data Node

2020-05-17 Thread nithin91
Thanks for the detailed explanation.It is very helpful.

I have one query.

To execute a compute job on server nodes, should i use the below command by
starting as 
client node.Please correct me if  i am wrong.
IgniteCompute compute = ignite.compute(cluster.forRemotes());



Also can you please confirm, 
that a compute job can be initiated only on a client node(i.e by setting the
property set client node=true in the bean file).







--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Service Node vs Data Node

2020-05-16 Thread Mikael

Hi!

There is nothing like service vs data nodes in Ignite, you have server 
nodes and client nodes, if you want to separate data and services nodes 
you can do that, but that is up to you it is not a requirement.


You have server nodes that can have caches that store data, run compute 
grid jobs and services also and so on, then you have client nodes, these 
are more "lightweight" and do not have any caches on them, do not 
perform computations and so on, but they can connect to server nodes and 
access all caches and services.


You have control over where the caches are created, you can have them on 
all or some server nodes, it's up to you.


You can deploy a service on any "data" node, (a data node is a server 
node).


You can connect using a client and use the compute grid, the client node 
can access all features of Ignite server nodes.


Ignite is very flexible in terms of where data is stored, where and how 
many services are run and also where compute grid jobs are excuted using 
properties, affinity keys and a few other ways.


The documentation on services and caches is very good and explain 
everything about how to use them.


Mikael

Den 2020-05-16 kl. 16:38, skrev nithin91:

Hi

We are exploring the iginite Service Grid.

Can any explain the difference between Service node and Data node.

i.e Currently i have 2 data nodes.

If i need to have a service deployed, then should i need to have a new node
which doesn't store data(based on the explanation given in the video
https://www.youtube.com/watch?v=nZ57o330yD0 ) or can i have the services
deployed on any of the data nodes directly.

Also if we want to use compute grid, can we connect in client mode or do we
need to start as server node.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Service Node vs Data Node

2020-05-16 Thread nithin91
Hi 

We are exploring the iginite Service Grid.

Can any explain the difference between Service node and Data node.

i.e Currently i have 2 data nodes.

If i need to have a service deployed, then should i need to have a new node
which doesn't store data(based on the explanation given in the video
https://www.youtube.com/watch?v=nZ57o330yD0 ) or can i have the services
deployed on any of the data nodes directly.

Also if we want to use compute grid, can we connect in client mode or do we
need to start as server node.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/