I have searched a lot to find out how to use IgniteDataStreamer to preload
cache from database, but all i couldn't find any. 
So I tried to do it myslef. Following is my approach:
1. A spring boot application having java based server configuration  for
cache - Ignite server application
2. A spring boot application having java based client configuration  for
cache - Ignite client application
3. I start the server app and then start the client app.
4. on startup of client app, after context is refreshed, i am loading ignite
cache by fetching data from database using spring data jpa.


@Autowired 
private Ignite ignite

public void preload(){
   try(IgniteDataStremer<Long,Users> stmr =
ignite.dataStremer("UsersCache")){
       List<Users> usersList = userRepository.preload();
       for(Users users: usersList){
           stmr.addData(users.getUsersKey(),users);
       }
   }
}


I am using this process to load all the cache.There are total 14 caches
created and loaded like this.

The tables are having around 600000 records.And using spring data JPA gives
me gc overhead and jvm pause issues.
I have read about data streamer that it is performance wise better, but i
don't know whether i am using it correctly.

Also i am not sure that loadcache() approach is better than datastreamer
approach.
Can anyone please help me on this issue.



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

Reply via email to