I have a problem understanding something.. or rather: figuring out a
good way to do what I want to.
On my backend I keep a list of Item-objects (which are loaded when the
backend application is started on the servlet container). There are
about 20000 objects and each of them can have up to 100 attributes.
My aim is to transfer them as seldom as possible - in fact I want to
transfer them just once. The problem is the sorting: in order to sort
and filter the objects to the users liking, I have to ensure that my
server sorts all the Item-objects.
What I have now:
- CellTable of Item-objects (containing the attributes that I want to
turn into columns)
- AsyncDataProvider, that runs a RPC-request once the user alters the
view (page-, sorting- or filtering-change)
What I want to do/have:
- the same CellTable of Item-objects
- run a RPC-request for sorting/displaying data, BUT including an ID-
list of items (just their IDs) that are already available on the
client in order for the method not to include them, but just their IDs
in the response
- have the reply checked for the Item-dummy-objects, that contain
just the ID (and are already loaded on the client), and replace them
with the loaded Item-objects
I'd manually implement all that, but maybe there's is a better way of
accomplishing this? Maybe someone with more experience than me has a
better idea?
It's not that the objects are too big. It's just that there might be
lots of request coming from several (even several hundred) users at
once and that's why I want my application to save bandwidth wherever
possible by loading static data just once (especially if it's very
unlikely for it to change) and if it needs to be sorted, use IDs or
something to not resend the data, because the items themselves won't
have changed; just their order would.
Thanks for reading and any help in that regard is greatly appreciated!
Igor.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment