Recompiling with SYNC support

43 views
Skip to first unread message

Edson Richter

unread,
Jan 9, 2013, 9:23:23 PM1/9/13
to google-we...@googlegroups.com
I already know everything about pros and cons on using async (after
working for 4 years with GWT), and also I'm a supporter of async being
the best option for almost everything.
Nevertheless, I do have an application with >1,000,000 lines of code I
can't change right now, and I must have few methods (that call lazy
collections at server side), and I'll manage to get the object from
serverside, but this will not work with a async call.
Since this is a temporary solution until we manage to not use lazy
collections at server side (there are millions of object instances
involved and long dependencies - I can't change this without deep
analysis), I've decided to download GWT 2.4 source code and recompile
with support for sync calls.
I've considered using "gilead" library, but this lib is not being
maintained anymore, there are dozen of bug reports open against it, and
I don't want to add a layer that would affect all application (against
to only a small portion of the application using sync calls).

Has anyone else accomplished this task?

Thanks,

Edson

Jens

unread,
Jan 10, 2013, 4:49:37 AM1/10/13
to google-we...@googlegroups.com
Just out of interest: Why does a large server side lazy collection forces you to use a synchronous XMLHttpRequest that will noticeably block your whole browser while the server does its work?

Gilead will set not yet loaded lazy properties to null so instead of using Gilead you could also create a DTO class with only the information you need and then fill it on the server without ever touching the lazy properties.

-- J.

Edson Richter

unread,
Jan 10, 2013, 9:42:29 AM1/10/13
to google-we...@googlegroups.com


On Thursday, January 10, 2013 7:49:37 AM UTC-2, Jens wrote:
Just out of interest: Why does a large server side lazy collection forces you to use a synchronous XMLHttpRequest that will noticeably block your whole browser while the server does its work?

This application has a complex graph of objects, when a collection of objects is loaded, it crashes browser due memory constrains.
 

Gilead will set not yet loaded lazy properties to null so instead of using Gilead you could also create a DTO class with only the information you need and then fill it on the server without ever touching the lazy properties.

Good to know, I've not lost time using Gilead.
Using DTO will force me to change hundred of UI widgets, which I don't have anought time to do now.

Thanks,

Edson


-- J.

Jens

unread,
Jan 10, 2013, 11:02:38 AM1/10/13
to google-we...@googlegroups.com
This application has a complex graph of objects, when a collection of objects is loaded, it crashes browser due memory constrains.

Ok but then it will also crash the browser if you use synchronous XmlHttpRequest. The real problem is that you transfer too much data from server to client and not if its transferred using asynchronous communication or synchronous communication. So you should still stick to asynchronous communication as it does not block your browser while downloading the data.


-- J.
Reply all
Reply to author
Forward
0 new messages