You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kotamrajuyashasvi <ko...@gmail.com> on 2017/08/09 07:28:48 UTC

Using Java ignite clients and calling them from c++ using JNI v/s using c++ ignite clients directly

Hi

I have a c++ application that requires querying some data with transactions
on ignite. So I require a ignite client which would be called by this c++
application which would request the ignite server for processing the query.
Now there are two ways in which I could implement the ignite clients.

1. Use java for ignite clients and call these java ignite clients from c++
using simple JNI code. 
2. Use c++ ignite clients built using ignite c++ libraries and use these in
the main c++ application.

I know that c++ ignite clients also use JNI internally, but I feel like c++
clients do not have all features as java clients have like loading specific
entries in cache in loadcache(), affinity etc. Also I need to do additional
configurations and c++ BinaryType specialization for for mapping java Pojos 
etc.

What are the advantages or disadvantages of both the approaches. Does using
approach 1 have lesser overhead compared to approach 2? 

Also are there any better approaches than these two?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Using-Java-ignite-clients-and-calling-them-from-c-using-JNI-v-s-using-c-ignite-clients-directly-tp16073.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Using Java ignite clients and calling them from c++ using JNI v/s using c++ ignite clients directly

Posted by Igor Sapego <is...@apache.org>.
Hi,

This depends on the feature scope you will need in C++, but in general,
it is not trivial task to implement some of Ignite features in C++. For
example, that's true that you have to specialize BinaryType in C++ now to
work with it, but if you will choose to implement your own solution you will
need to implement your own serialization/de serialization protocol for
objects
and re-invent some solutions, which is already implemented in C++ client.

So, in general it looks to me as the second way is much simpler.

Also, if you want some feature in C++ client which is not there now, you
can always implement it and contribute to project as Ignite is opensource
and community driven. This way you'll get your feature, help of the
community with development and you will also develop the project, which
will help entire community.

Best Regards,
Igor

On Wed, Aug 9, 2017 at 10:28 AM, kotamrajuyashasvi <
kotamrajuyashasvi@gmail.com> wrote:

> Hi
>
> I have a c++ application that requires querying some data with transactions
> on ignite. So I require a ignite client which would be called by this c++
> application which would request the ignite server for processing the query.
> Now there are two ways in which I could implement the ignite clients.
>
> 1. Use java for ignite clients and call these java ignite clients from c++
> using simple JNI code.
> 2. Use c++ ignite clients built using ignite c++ libraries and use these in
> the main c++ application.
>
> I know that c++ ignite clients also use JNI internally, but I feel like c++
> clients do not have all features as java clients have like loading specific
> entries in cache in loadcache(), affinity etc. Also I need to do additional
> configurations and c++ BinaryType specialization for for mapping java Pojos
> etc.
>
> What are the advantages or disadvantages of both the approaches. Does using
> approach 1 have lesser overhead compared to approach 2?
>
> Also are there any better approaches than these two?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Using-Java-ignite-clients-and-
> calling-them-from-c-using-JNI-v-s-using-c-ignite-clients-
> directly-tp16073.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>