You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/03/15 22:09:11 UTC

Re: Two nodes in one JVM/Tomcat

Hi,

Can you please properly subscribe to the mailing list so that the community
receives email notifications? Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1


hemanta wrote
> Hi All,
> 
> We have two web applications (A and B) running in a single instance of
> tomcat and they rely heavily on each other. They share few classes between
> them but not all. I am looking for best ignite configuration for this
> scenario.
> 
> Few approaches which I tried:
> 1. A and B both configured as server in replicated mode. 
> Problem with this is that it increases memory foot print. Data copied in
> node B cache may never be required.
> 2. A as server and B as client:
> Problem with this is getting data from B is comparatively slower than
> server server mode.
> 
> Please suggest the best approach that I can try.
> 
> Thanks a lot.

Are applications going to share the data set? If yes, just start one Ignite
node and access it from both application. This node can be either server, in
which it will store the data, or client connected to a remote cluster.

If applications are working with different data, I would configure discovery
so that they don't join the same cluster (see [1]).

[1]
https://apacheignite.readme.io/docs/cluster-config#isolated-ignite-clusters-on-the-same-set-of-machin

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Two-nodes-in-one-JVM-Tomcat-tp3519p3525.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Two nodes in one JVM/Tomcat

Posted by vkulichenko <va...@gmail.com>.
Hi,


hemanta wrote
> I hit on subscription button but I am not getting any email. I tried
> couple of times.

Can you try another email?


hemanta wrote
> Thanks for your reply. I would like to share the data between applications
> but we have two web applications running in same tomcat. They have two
> web.xml files. Right now I have two ignite configuration files that I am
> loading from each web.xml. It works but in this approach data in
> duplicated between two applications which is increasing memory footprint. 

You need to start a single node per app server, not per application. In
Tomcat you can implement LifecycleListener [1] and use Ignition.start()
method to start the node within this implementation. Will this work for you?

[1] https://tomcat.apache.org/tomcat-9.0-doc/config/listeners.html

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Two-nodes-in-one-JVM-Tomcat-tp3519p3546.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.