RPC extension points

6 views
Skip to first unread message

noon

unread,
Jun 15, 2009, 11:59:48 AM6/15/09
to Google Web Toolkit Contributors
Hello,

This thread follows this one (http://groups.google.com/group/Google-
Web-Toolkit-Contributors/msg/582cfe33f17deab3), so please read it
before this one.

To make Google App Engine and GWT work together (in adapter4appengine
project), I had to modify the RPC serialization code.
My first goal was to add *clean extension points*, to allow any third
library developer to tune RPC serialization according to his needs. Of
course, I used it to develop a DataNucleus adapter, and plan to port
Hibernate one as well.

The idea is to allow 2 kinds of extension points :
- ISerializationFilter, that indicates if a specific field of a
class should be serialized or not. It is called for serialization
signature computation and for each object serialization
* Typical use : used to remove new fields from enhancement
- ISerializationTransformer, that can change a object instance
from one type to another one
* Typical use : used to turn persistent collection back to
regular one

A first step has been implemented in adapter4appengine library. It
only needs change for 4 existing classes (RPC, SerializabilityUtil,
ServerSerializationStreamReader and ServerSerializationStreamWriter).

A next step would be to read filters and transformers from the gwt.xml
file (currently, they are set by code in EngireRemoteServlet class).

I would *really* love to see this code integrated in official GWT
release, since it would be a pain for me to do the same fixes every
time a new GWT release is out (as I still have to do it since GWT 1.4
for Hibernate4GWT/Gilead because issue 1291 is opened without result
since 2 years :-( ).

My 2 cents
Bruno

Lex Spoon

unread,
Jun 19, 2009, 11:09:00 AM6/19/09
to Google-Web-Tool...@googlegroups.com
On Mon, Jun 15, 2009 at 11:59 AM, noon<bruno.ma...@gmail.com> wrote:
>
> Hello,
>
> This thread follows this one (http://groups.google.com/group/Google-
> Web-Toolkit-Contributors/msg/582cfe33f17deab3), so please read it
> before this one.
>
> To make Google App Engine and GWT work together (in adapter4appengine
> project), I had to modify the RPC serialization code.
> My first goal was to add *clean extension points*, to allow any third
> library developer to tune RPC serialization according to his needs. Of
> course, I used it to develop a DataNucleus adapter, and plan to port
> Hibernate one as well.
>
> The idea is to allow 2 kinds of extension points :
>     - ISerializationFilter, that indicates if a specific field of a
> class should be serialized or not. It is called for serialization
> signature computation and for each object serialization
>         * Typical use : used to remove new fields from enhancement
>     - ISerializationTransformer, that can change a object instance
> from one type to another one
>         * Typical use : used to turn persistent collection back to
> regular one

Are you familiar with the transient keyword and the @GwtTransient
annotation? These let you respectively eliminate a field from
serialization, and eliminate a field from GWT serialization.

-Lex

bruno

unread,
Jun 29, 2009, 6:14:58 AM6/29/09
to Google Web Toolkit Contributors
Hi Lex,

The main problem comes from enhancement added fields, so user can add
@GwtTransient annotation on it.
Yes, enhancement is evil, but we have to do with them...

Regards
Bruno

On 19 juin, 17:09, Lex Spoon <sp...@google.com> wrote:
> On Mon, Jun 15, 2009 at 11:59 AM, noon<bruno.marches...@gmail.com> wrote:
>
> > Hello,
>
> > This thread follows this one (http://groups.google.com/group/Google-
> > Web-Toolkit-Contributors/msg/582cfe33f17deab3), so please read it
> > before this one.
>
> > To make Google App Engine and GWT work together (in adapter4appengine
> > project), I had to modify theRPCserialization code.
> > My first goal was to add *clean extension points*, to allow any third
> > library developer to tuneRPCserialization according to his needs. Of

Freeland Abbott

unread,
Jun 29, 2009, 11:12:47 AM6/29/09
to Google-Web-Tool...@googlegroups.com
FWIW, Dan Rice has also been working on this, if you hadn't seen his review thread from Friday.
Reply all
Reply to author
Forward
0 new messages