ZK Huge Grouping Model"
Robertwenzel (talk | contribs) m (→Introduction) |
Robertwenzel (talk | contribs) |
||
Line 16: | Line 16: | ||
based on the concepts (paging at DB level, separate paging control from grid) there how to do grouping... | based on the concepts (paging at DB level, separate paging control from grid) there how to do grouping... | ||
− | =The | + | =The challenges= |
grouping is a powerful feature in ZK but also adds an extra layer of complexity | grouping is a powerful feature in ZK but also adds an extra layer of complexity | ||
Revision as of 09:29, 1 August 2013
Robert Wenzel, Engineer, Potix Corporation
August, 2013
ZK 6.5 (or later)
Introduction
bla bla you have some big data... how to display
article already handles display big data in a flat list http://books.zkoss.org/wiki/Small_Talks/2009/July/Handling_huge_data_using_ZK
based on the concepts (paging at DB level, separate paging control from grid) there how to do grouping...
The challenges
grouping is a powerful feature in ZK but also adds an extra layer of complexity
paging and grouping challenges
1. groups can be open or closed (also interactively)
- -> the total count and the number of pages changes, when opening/closing nodes... (needs efficient counting, and state keeping)
2. groups can have arbitrary number of children
- -> random access to a specific page ... how to know the current group and position inside the group for that page
- --> implement a feaseable search
3. minimize DB operations (accumulating network/DB latency)
- -> caching vs. memory consumption
1. + 2. + 3. !!!! combining all three in an efficient, memory preserving way
limitations... needs to store the state in memory (humans are limited, so one is unlikely to toggle 100+ groups)
Maxing out what is possible... ZK GroupsModel supports int indexes so go up to Integer.MAX_VALUE (~ 2.000.000.000 records)
not unrealistic -> Hibernate have changed their paging api to long already...
Implementation
Generating the Test data
Counting & State keeping
Random Access Paging
Appendix
Download
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |