0

Hello is it possible to use LazyDataModel for lazy loading of data in a data table with Cassandra. I have been using it with Oracle before. Will there be any problem when using Cassandra and while 'talking' about this, it would be good to understand how exactly does the lazy loading work? Is data being loaded every time there is a change from one page to the other ? or is the data just being loaded once ? Any help is appreciated.

Thanks

skal
  • 155
  • 1
  • 2
  • 11
  • Can you do a sort of lazy loading in plain java with cassandra? Then it works for the datatable to. – Kukeltje Nov 17 '16 at 07:34
  • well, what does such a lazy loading depend on ? What criteria must be fulfilled in order to be able to use the lazy loading functionality in Primefaces? – skal Nov 17 '16 at 17:05
  • You used it with Oracly you said... And if you did not and 'just used Oracle', look at the PrimeFaces showcase. There is a lazy loading example there (that for simplicity uses static arrays, but the way how to use it is identical) And there are generic related questions about lazaydatamodel in stackoverflow to – Kukeltje Nov 17 '16 at 17:11
  • Sorry, but I don't use cassandra, so details are difficult to provide, but the concept is straightforward – Kukeltje Nov 17 '16 at 17:16
  • i have been using Cassandra like any other db, in the end i have a resultlist from which i build my datatables etc. I am assuming that i can use LazyDataModel without any problems in this case. The question was rather, whether anybody has experiences with this combination. But Thanks much Kukeltje for your answers. – skal Nov 17 '16 at 17:18
  • where does the lazy loading happen? is it mainly on the UI side or backend? Is data being cached? Those are the questions that i had on my mind – skal Nov 17 '16 at 17:37
  • Lazy loading happens as close to the storage systems as possible. If the UI should do lazy loading with the layer it communicates to, all data should be available in the controller/service layer. That is to memory expensive. If the persistent layer (e.g. hibernate/jpa) uses caching is up to you. It can speed up things but keeping things in memory on the database (indexes, or important tables) can speed things up ass well. All this is, again, generic, – Kukeltje Nov 17 '16 at 19:17

1 Answers1

0

i ended up implementing the load method of the lazy data model in Primefaces. I used the PagingState which Cassandra provides to get the data for the current page. Yes the implementation was straight forward. Thanks Kukeltje.

skal
  • 155
  • 1
  • 2
  • 11