Adding custom processor in Ignite Node

classic Classic list List threaded Threaded
5 messages Options
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Adding custom processor in Ignite Node

This post was updated on .
Hi

I would like a start a custom processor on Ignite Node. After exploring the
source code, I have created a custom processor class that extends
GridProcessorAdapter. I added the code to start custom processor just like
other processors in IgniteKernal.java passing the GridKernalContextImpl ctx
object. The custom processor will start a separate service on a separate
Thread. I built the project and from logs I was able to see that my process was able to
start when the Ignite node started.  

This custom service that was started will use separate Threads which will do
certain processing of data on the Ignite nodes on the cluster. The main
operations performed by each Thread are : sql queries, cache get and puts
and Ignite Transactions. I tried executing a query but the method is getting
stuck forever. I used - QueryCursor<List&lt;?>> qryCur =
ctx.query().querySqlFieldsNoCache(Sql,false); where ctx is the
GridKernalContextImpl  object passed while starting the processor.  

 I would like to know how to perform the query, cache, transaction
operations using the GridKernalContextImpl  object . Can this object be used
by multiple Threads safely ?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
afedotov afedotov
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom processor in Ignite Node

CONTENTS DELETED
The author has deleted this message.
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom processor in Ignite Node

HI

Thanks for your response.

Actually I want to implement  custom Thin Client Processor/Server which will
process requests from multiple C++ thin Client which use TCP socket
communication. The Client requests are to perform sql queries , cache gets
and puts and Ignite Transaction operations.

I have explored different options but they could not meet my requirements:
1. Ignite C++ :  since there will be a lot of Clients and I'm restricted to
use a separate Ignite C++ client node for each C++ Client since I need a
separate Transaction context for each client, hence its memory intensive.
Also there are some other issues which could not be reproduced/replicated
here.
 
2. ODBC : since I need cache gets and puts operations and Transactions which
are not supported currently and planned to be added in 2.5 version. Same
with the case of Thin Client Protocol.

Due to time constraint I want to try a custom Thin Client Processor where a
new Thread is created for each client connection to process custom
messages/requests and perform custom logic and appropriate operations on
grid and send custom message/response.Also from a knowledge perspective I
would like to know how Ignite processors work internally.





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alexey Popov Alexey Popov
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom processor in Ignite Node

In reply to this post by kotamrajuyashasvi
Hi,

I am not sure that user-list will be able to help you with such questions.

You should discuss the implementation options/details at dev-list
(http://apache-ignite-developers.2346864.n4.nabble.com/).
Probably, you don't need a custom processor class at all.

Anyway:
1. Please have a look at the thin clients' server-side code (starting from
ClientListenerNioListener class).
Maybe you can just add one more client processing code here.

2. Or you can look at GridRestProcessor code as a reference for building
your own processor.

Thank you,
Alexey



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
kotamrajuyashasvi kotamrajuyashasvi
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom processor in Ignite Node

Hi

Thanks for your response.
As you mentioned will try to discuss/take help from the dev-list.





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