You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by arthi <Ar...@nielsen.com> on 2016/05/12 14:20:12 UTC

Get client node instance

Hi,

I have a ignite grid started with 2 servers and 1 client. I want my c++
application to be able to retrieve the client node instance from the grid,
with out starting a new server/client. Is there an API I can use?
Ignition.ignite(<name>) fails -

Exception in thread "main" class
org.apache.ignite.IgniteIllegalStateException: Ignite instance with provided
name doesn't exist. Did you call Ignition.start(..) to start an Ignite
instance? [name=cip]
	at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1235)
	at org.apache.ignite.Ignition.ignite(Ignition.java:516)
	at
com.nielsen.poc.aggregation.ignite.datagrid.CacheMetrics.main(CacheMetrics.java:34)


Please advice.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

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

Looks like the tickets are in progress, so I would expect some result soon
(I'm not working on them, so I don't have any exact ETAs; feel free to ask
on dev list for more details).

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p5108.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi,

We are tracking these Jira issues -
https://issues.apache.org/jira/browse/IGNITE-3060
https://issues.apache.org/jira/browse/IGNITE-3054

We expect the client handling to improve with both of these issues. 
Are these expected to be fixed in the near future? 
When is the 1.7 release? Is there any earlier release when these can be
done?

Thanks,
Arthi





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p5045.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Igor,

I dont have control on the user request threading. That would be difficult
to do.

Is the new v1.6 better in client node connect time?

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4998.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Arthi,

I don't see how it currently possible to use shared memory to shared Ignite
instance among different processes. What I propose is to not start different
process on user request but maybe start separate thread instead so you will
have single address space among all clients. Is it possible for you?

ODBC driver thread-safe in terms of connections. It means that you can use
concurrently create and use several connections with it. Connection itself
is
not thread safe as for now, meaning you can't use the same connection among
several threads without additional synchronization.

But if you want to use the same connection from several threads concurrently
does it mean you can also use Ignite instance from several threads? I mean
without creating new process for every user request?


Best Regards,
Igor

On Tue, May 17, 2016 at 7:04 AM, arthi <Ar...@nielsen.com>
wrote:

> Hi Igor,
>
> I was wondering if the ODBC driver that will come up in v1.6 is thread
> safe?
> Can we do a connection pooling using this driver from our calling
> application level?
>
> I am just trying to see if we can go with the ODBC driver to connect to the
> grid instead of the c++ client API.
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4984.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

I was wondering if the ODBC driver that will come up in v1.6 is thread safe?
Can we do a connection pooling using this driver from our calling
application level?

I am just trying to see if we can go with the ODBC driver to connect to the
grid instead of the c++ client API.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4984.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
thanks Igor,

The application is in C++. I was hoping if I could create a shared memory
with ignite instance and share it with other process that get trigged on
user requests. Is this a possibility?

The developer tried it, but seems like it did not work. May be we are
missing something. Let me know if we should share the code.

Thanks for the help,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4983.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Arthi,

Well, there would be significant performance gain if you would
not start new client process for every request and then terminate it
but rather start node once in the same process that currently starts
new process. I'm not sure if it's possible for you. What is the language
of the application that starts C++ client now?


Best Regards,
Igor

On Mon, May 16, 2016 at 8:48 PM, arthi <Ar...@nielsen.com>
wrote:

> Hi Igor,
>
> we invoke it by some other application every time the user needs to make
> request and then
> its terminated
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4967.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

we invoke it by some other application every time the user needs to make
request and then
its terminated

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4967.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Arthi,

It seems to me like we have some misunderstanding here.
Let me provide my understanding of your usecase so you could
correct me if I'm wrong.

You have the client application which is written in C++ and has
to handle multiple concurrent requests from multiple users.

Now, do you invoke the process of your application once and
use it for multiple requests or do you invoke it by some other
application every time you user needs to make request and then
its terminated?

Best Regards,
Igor

On Mon, May 16, 2016 at 7:08 PM, arthi <Ar...@nielsen.com>
wrote:

> Hi Igor,
>
> Yes, I can, but, how do I get handle to the client node instance when a new
> user request comes in?
> Each user request invokes the C++ dll.
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4963.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

Yes, I can, but, how do I get handle to the client node instance when a new
user request comes in?
Each user request invokes the C++ dll.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4963.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
I mean startup of the client application.

Best Regards,
Igor

On Mon, May 16, 2016 at 7:18 PM, Igor Sapego <is...@gridgain.com> wrote:

> Arthi,
>
> Why do you create one client node per user request? Can you create
> a node on application start and then just use this node instance when
> you need to make a request?
>
>
> Best Regards,
> Igor
>
> On Mon, May 16, 2016 at 6:41 PM, arthi <Arthi.Kasturirangan.ap@nielsen.com
> > wrote:
>
>> Hi Igor,
>>
>> this is my usecase - I use the ignite data grid to store my business data
>> in
>> memory. My client application needs to run SQL queries on this data. Every
>> client request in the application will be translated to multiple SQL
>> queries. The application needs to support 400-500 concurrent users.
>> My client application is written in C++.
>>
>> My grid can grow to have terabytes of data across 30-40 server nodes.
>>
>> The SLA for the one request/response is < 30 sec. My SQL queries come back
>> faster, its the ignite client joining time I would want to reduce. I
>> create
>> one client node per user request and that instance is used to execute the
>> multiple SQL queries to get the response.
>>
>> what is the best that is possible in terms of client join time? Can it be
>> <1-2 secs? My servers are Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz with
>> 256GB RAM and 40 cores, the n/w between the nodes is high speed too.
>>
>> Thanks,
>> Arthi
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4960.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Arthi,

Why do you create one client node per user request? Can you create
a node on application start and then just use this node instance when
you need to make a request?


Best Regards,
Igor

On Mon, May 16, 2016 at 6:41 PM, arthi <Ar...@nielsen.com>
wrote:

> Hi Igor,
>
> this is my usecase - I use the ignite data grid to store my business data
> in
> memory. My client application needs to run SQL queries on this data. Every
> client request in the application will be translated to multiple SQL
> queries. The application needs to support 400-500 concurrent users.
> My client application is written in C++.
>
> My grid can grow to have terabytes of data across 30-40 server nodes.
>
> The SLA for the one request/response is < 30 sec. My SQL queries come back
> faster, its the ignite client joining time I would want to reduce. I create
> one client node per user request and that instance is used to execute the
> multiple SQL queries to get the response.
>
> what is the best that is possible in terms of client join time? Can it be
> <1-2 secs? My servers are Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz with
> 256GB RAM and 40 cores, the n/w between the nodes is high speed too.
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4960.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

this is my usecase - I use the ignite data grid to store my business data in
memory. My client application needs to run SQL queries on this data. Every
client request in the application will be translated to multiple SQL
queries. The application needs to support 400-500 concurrent users.
My client application is written in C++.

My grid can grow to have terabytes of data across 30-40 server nodes. 

The SLA for the one request/response is < 30 sec. My SQL queries come back
faster, its the ignite client joining time I would want to reduce. I create
one client node per user request and that instance is used to execute the
multiple SQL queries to get the response.

what is the best that is possible in terms of client join time? Can it be
<1-2 secs? My servers are Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz with
256GB RAM and 40 cores, the n/w between the nodes is high speed too.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4960.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Hi Arthi,

In current implementation, node instance (i.e. Ignite instance) can not be
shared between different processes. Can you describe your use case
a bit more? Which start up time would be acceptable in your case? Are you
starting client node on the startup of the application or are you starting
it
whenever you need to make requests?

Best Regards,
Igor

On Mon, May 16, 2016 at 7:05 AM, arthi <Ar...@nielsen.com>
wrote:

> Hi Igor,
>
> Is this possible?
>
> My C++ client application will need to create multiple requests to access
> the data grid for executing SQL queries.
>
> There could be 400-500 concurrent requests on high load. If I could re-use
> the same client node instance (or may balance across a set of client node
> instances), my topology will be stable. I will not be altering the topology
> for every incoming request for a new client. The time taken to join the
> cluster as a client takes 4-5 seconds, and on concurrent load, even greater
> (10-20 seconds).
>
> will shared memory help? Can you please provide sample code to do this?
>
> Please advice.
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4946.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

Is this possible? 

My C++ client application will need to create multiple requests to access
the data grid for executing SQL queries. 

There could be 400-500 concurrent requests on high load. If I could re-use
the same client node instance (or may balance across a set of client node
instances), my topology will be stable. I will not be altering the topology
for every incoming request for a new client. The time taken to join the
cluster as a client takes 4-5 seconds, and on concurrent load, even greater
(10-20 seconds). 

will shared memory help? Can you please provide sample code to do this? 

Please advice.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4946.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by arthi <Ar...@nielsen.com>.
Hi Igor,

The server and client are started by one application. I need to get access
to this client node from another application, possibly in another host (but
on the same n/w). Possible?

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897p4910.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Get client node instance

Posted by Igor Sapego <is...@gridgain.com>.
Hi Arthi,

Where was the original Ignite client started that you want to re-use?
Is it in the same application or was it started in some other
application/on some other machine?

Best Regards,
Igor

On Thu, May 12, 2016 at 5:20 PM, arthi <Ar...@nielsen.com>
wrote:

> Hi,
>
> I have a ignite grid started with 2 servers and 1 client. I want my c++
> application to be able to retrieve the client node instance from the grid,
> with out starting a new server/client. Is there an API I can use?
> Ignition.ignite(<name>) fails -
>
> Exception in thread "main" class
> org.apache.ignite.IgniteIllegalStateException: Ignite instance with
> provided
> name doesn't exist. Did you call Ignition.start(..) to start an Ignite
> instance? [name=cip]
>         at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1235)
>         at org.apache.ignite.Ignition.ignite(Ignition.java:516)
>         at
>
> com.nielsen.poc.aggregation.ignite.datagrid.CacheMetrics.main(CacheMetrics.java:34)
>
>
> Please advice.
>
> Thanks,
> Arthi
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Get-client-node-instance-tp4897.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>