Hi 

Issue got resolved after doing the following changes.
Attached you the updated code,client.xml(will be in src/resources folder)
and pom.xml file.
srcandpomupdated.zip
<http://apache-ignite-users.70518.x6.nabble.com/file/t2737/srcandpomupdated.zip>
  

        1. Removed the following dependency from pom.xml
            <dependency>
                        <groupId>org.apache.ignite</groupId>
                        
<artifactId>ignite-spring-boot-autoconfigure-ext</artifactId>
                        <version>1.0.0</version>
                </dependency>
        2.      Modifying the IgniteConfig.class such that      
                changing the method igniteInstance to return Ignite 
                instance by calling 
                Ignition.start("Ignite-Client.xml").
                Eariler it used to return IgniteConfiguration
                by using the following piece of code.Also earlier 
                i haven't used IgniteClient.xml.
                
                IgniteConfiguration cfg = new IgniteConfiguration();

                // The node will be started as a client node.
                cfg.setClientMode(true);

                // Classes of custom Java logic will be transferred over the 
wire
from this app.
                cfg.setPeerClassLoadingEnabled(true);

                // Setting up an IP Finder to ensure the client can locate the
servers.
                TcpDiscoveryMulticastIpFinder ipFinder = new
TcpDiscoveryMulticastIpFinder();
                ipFinder.setAddresses(Collections.singletonList("Ipaddress"));
                cfg.setDiscoverySpi(new 
TcpDiscoverySpi().setIpFinder(ipFinder));
                // Starting the node
              
                cfg.setSqlSchemas("PIE");
                        retrun cfg
                

Although this seems to be working.
I have following queries with this approach.Can you please
provide your inputs/suggestions.



                        We are going to expose this SpringBoot
                        App as a RestFul API where we are trying to
                        refresh the Ignite Cache by sending  request to this
                        Application whenever the data in Oracle changes.
                        .
                        As we are trying to expose this APP as a API,
                        which means that this  Ignite Client Node 
                        instance launched from Spring boot Application will     
                        be active for ever.Now my queries are
                        
                        1. Is it ok to have a client node which 
                        is continously in connected state forever.
                        If Ok,then how many such client node can exist.
                        2. Can this Application, be hosted on the   
                        one of the server node with different port.
                        3. Also will client node connect automatically 
                        to the cluster if the client node has  lost 
                        communication with server because if the client 
                        node is down and if there is an API request
                        , then the application will throw an error.
                        4. Is this way of refreshing the cache is efficient.
                        If no, can you please suggest a better way.
                        5. Also take provide an example on the possibility
                        of  having the REST API calling a
                        compute job which would
                        execute in a separate server
                        https://apacheignite.readme.io/docs/compute-grid
        Also i have few more queries related to Ignite 
        Behaviour.It would be really helpful if you can 
        provide some inputs.
        
        1. Currently we are using 
                ignite.cache("CacheName").loadCache(null) method
                to load  the cache initially and also increamentally as 
                this method loads data very fast almost 0.1 million
                in 1 minute. For increamental load also  we are using this 
method 
                by passing an additional argument i.e. Custom 
                Sql  to load/update only the records that have created/changed. 
                but what is happening is if the key doesn't 
                exist it is inserting the data  but if the key is present
                it is not updating its value.
                Why is the value not updated if the key is present.
        
        2. To overcome this, i have to build my own custom 
        cache store as mentioned in the following link
        https://apacheignite.readme.io/v1.9/docs/data-loading.
        But the problem with this approach is  i need to use JDBC
        result set to load the data which is very slow as 
        we have to insert row by row.
        Is there a better way to update the keys.
        
        
        3. How to load data faster with custom cache store
        as loading the data which is very slow as 
        we have to insert row by row.
        
        
                                
                        
                        
                        
                        
                        
                        




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

Reply via email to