Home » Eclipse Projects » Remote Application Platform (RAP) » client/ server widgets synchronization
|
Re: client/ server widgets synchronization [message #767922 is a reply to message #767865] |
Mon, 19 December 2011 07:57   |
Ivan Furnadjiev Messages: 2411 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Sudhir,
the most problematic events are the key events. We already have a bug
opened to optimize the number of requests send by the client:
346597: Support RWT.ACTIVE_KEYS to optimize KeyListener on Widget
https://bugs.eclipse.org/bugs/show_bug.cgi?id=346597
Apart from the key listeners, there isn't unnecessary request sent.
Skipping some requests could risk the client and server to run out of
sync which is very dangerous.
Best,
Ivan
On 12/19/2011 7:08 AM, usudhir wrote:
> Hi,
>
> As I understand, in RAP, the client/server widgets are synchronized
> using AJAX calls and each change (including tab overs, navigating
> different rows in a table etc ) in client is propagated to the server.
>
> Given the richness of our application, we observed that this causes a
> significant performance degradation as it switches from views or
> navigates within table with large # of rows.
>
> Is there a way to have selective synchronization - say, if I know
> that certain events will not cause an update on server (tab over in
> cell in a large table), then prevent it making a server side call at
> all ?
>
> Thanks in advance,
>
>
> -Sudhir
|
|
|
Re: client/ server widgets synchronization [message #767969 is a reply to message #767865] |
Mon, 19 December 2011 09:46   |
|
Hi Sudhir,
> As I understand, in RAP, the client/server widgets are synchronized
> using AJAX calls and each change (including tab overs, navigating
> different rows in a table etc ) in client is propagated to the server.
That's not completely true. Requests are sent only when there's code to
be executed on the server, i.e. when a listener is attached to a widget.
> Given the richness of our application, we observed that this causes a
> significant performance degradation as it switches from views or
> navigates within table with large # of rows.
Could you be more specific on your observations? Did you identify a
performance problem that is related to network bandwidth? What is the
size and frequency of requests? Do you use VIRTUAL tables for these
large number of elements?
> Is there a way to have selective synchronization - say, if I know that
> certain events will not cause an update on server (tab over in cell in a
> large table), then prevent it making a server side call at all ?
Generally, if you don't attach a listener, there is no synchronization
needed. Are you talking about cell editors in a table? This is indeed
a case where there are too many requests being sent. This is caused by
the JFace cell editor code that does not perfectly fit for RAP. We're
looking for ways to improve this.
Regards, Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: client/ server widgets synchronization [message #768039 is a reply to message #767969] |
Mon, 19 December 2011 13:18   |
Hallvard Traetteberg Messages: 673 Registered: July 2009 Location: Trondheim, Norway |
Senior Member |
|
|
On 19.12.11 10.46, Ralf Sternberg wrote:
>
>> As I understand, in RAP, the client/server widgets are synchronized
>> using AJAX calls and each change (including tab overs, navigating
>> different rows in a table etc ) in client is propagated to the server.
>
> That's not completely true. Requests are sent only when there's code to
> be executed on the server, i.e. when a listener is attached to a widget.
Note that even though you have attached a listener, it's not always
necessary to trigger server-side processing. E.g. if you tab into and
out of a field without editing/changing the value, you don't need to
(re)validate it, but you'll still need to attach a listener to check
this. Perhaps there could be a way of declaring additional conditions,
like "value has changed", or "the user has generated an event that was
used (event.doit == true) while the field had focus", that could be
checked before sending the event.
Hallvard
|
|
|
Re: client/ server widgets synchronization [message #768522 is a reply to message #768039] |
Tue, 20 December 2011 10:04  |
|
Hi Hallvard,
> Note that even though you have attached a listener, it's not always
> necessary to trigger server-side processing. E.g. if you tab into and
> out of a field without editing/changing the value, you don't need to
> (re)validate it, but you'll still need to attach a listener to check
> this.
True. But in those cases the framework cannot decide if a request could
be skipped. In the case you mentioned, a modify listener instead of a
focus listener might help.
> Perhaps there could be a way of declaring additional conditions,
> like "value has changed", or "the user has generated an event that was
> used (event.doit == true) while the field had focus", that could be
> checked before sending the event.
Bug 346597 [1] for filtering key events goes in this direction and there
may be more places where those extensions make sense. As long as this is
possible in a declarative fashion, it could be done.
But I'm afraid that overusing this approach would quickly lead to a
mess. In the next step, people would like to combine those conditions
with boolean operators... We'd end up with some kind of expression
language. Would that be worth the little savings?
Best regards, Ralf
[1] 346597: Support RWT.ACTIVE_KEYS to optimize KeyListener on Widget
https://bugs.eclipse.org/bugs/show_bug.cgi?id=346597
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Goto Forum:
Current Time: Mon May 29 19:06:32 GMT 2023
Powered by FUDForum. Page generated in 0.02145 seconds
|