ZK Huge Grouping Model

From Documentation
ZK Huge Grouping Model

Author
Robert Wenzel, Engineer, Potix Corporation
Date
August, 2013
Version
ZK 6.5 (or later)

WarningTriangle-32x32.png This page is under construction, so we cannot guarantee the accuracy of the content!

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 challenge

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

selenium-IDE-example.zip

Comments



Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.