Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » client/ server widgets synchronization
client/ server widgets synchronization [message #767865] Mon, 19 December 2011 05:08 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: August 2011
Junior Member
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 #767922 is a reply to message #767865] Mon, 19 December 2011 07:57 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
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 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
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 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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/
Previous Topic:client/ server widgets synchronization
Next Topic:How should I change the view's color
Goto Forum:
  


Current Time: Sat Apr 20 02:18:06 GMT 2024

Powered by FUDForum. Page generated in 0.03285 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top