Havanero / gwt-syncproxy

Automatically exported from code.google.com/p/gwt-syncproxy
0 stars 0 forks source link

Using syncproxy on Android OS #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Remove GAE authentication code (loginGAE method) from Syncproxy library
because it depends on gdata lib and your syncproxy will be usable in
Android application. 

Dalvic compilation throws because of gdata lib exception (some GC out of
memory exception) during making apk file. 

When I removed gdata and compiled your code without loginGAE method I was
able to call from Android application service on GAE with your library.

BTW... Good job with syncproxy

Original issue reported on code.google.com by matija.j...@gmail.com on 8 Apr 2010 at 1:48

GoogleCodeExporter commented 8 years ago
Also for object serialization support on Android OS you should copy
SerializabilityUtil from gwt into your lib and comment
computeHasCustomFieldSerializer in a way that always return null, becuase 
somthing in
this method is not supported by android sdk.

Original comment by matija.j...@gmail.com on 9 Apr 2010 at 11:43

GoogleCodeExporter commented 8 years ago
Testing with android; for the previously stated method 
computeHasCustomFieldSerializer you should treat it as if you're running in a 
regular GWT environment (i.e., GWT.isClient == true). If this returns null you 
will not be able to serialize custom data transfer objects.

Original comment by dsum...@gmail.com on 7 Oct 2010 at 5:35

GoogleCodeExporter commented 8 years ago
I would really like to use this lib together with Android is there any fix for 
this issue?

Original comment by miguelan...@gmail.com on 3 Nov 2010 at 2:00

GoogleCodeExporter commented 8 years ago
Working on an Android library that should work. I've got a working mock up of 
it (with sample android and web app), but it will take a couple weeks for me to 
implement some minimum tests a make sure it works well. I will update as I make 
progress

Original comment by p.pr...@blueesoteric.com on 3 Mar 2013 at 2:18

GoogleCodeExporter commented 8 years ago
this fork of the syncproxy library does work. 
https://github.com/jribble/gwt-syncproxy/commit/5747ff467c818ff6855a0bb16c0806e0
7f4c5c80 (i linked to a commit with a fix to the direction of the 
serialization, which is a bug in the original syncproxy library).

i have made a fork which also doesn't pull in gwt-user (because its somehow 
making the dex compiler fail due to the large number of classes in gwt-user). 
Reply to this message if you want to use my fork (which is pretty much a fork 
off the jribble one).

Original comment by sangohan...@gmail.com on 3 Mar 2013 at 2:38

GoogleCodeExporter commented 8 years ago
Sangohan, I am really interested in using your fork. How can I acquire it?

Original comment by Karel.Cr...@gmail.com on 21 Mar 2013 at 9:29

GoogleCodeExporter commented 8 years ago
Hi Karel,

I've put the fork up on https://bitbucket.org/chii/gwt-syncproxy , but if you 
have time to wait, i would wait for Preethum Prithviraj to integrate it into 
the mainline and release a proper version (with testing etc). 

To use it, you need to download maven (3.0.3 was the version i used, but it'd 
prob work with another version i guess?), and build and install the jar to your 
local repository. If you have any problems, just yell here and i ll help you. 

Original comment by sangohan...@gmail.com on 21 Mar 2013 at 10:10

GoogleCodeExporter commented 8 years ago
Alright, thanks! I will have a look at it and decide whether I'll wait or try 
to get your version working.

Original comment by Karel.Cr...@gmail.com on 21 Mar 2013 at 10:40

GoogleCodeExporter commented 8 years ago
I'm putting in some time on it this weekend. I'll have a better estimate of 
when it'll be complete after the weekend. I'm going to upgrading as much as I 
can to match the current App Engine and GWT releases (and some of the other 
reported bugs), which means changing around the current project's testing 
structure as well since I can't get that to work properly (easily). I'll leave 
a note on Monday on an expected timeline if it'll be longer than this weekend. 

Original comment by p.pr...@blueesoteric.com on 23 Mar 2013 at 12:47

GoogleCodeExporter commented 8 years ago
I've got a testing structure in place. However, the tests have revealed an 
issue that is going to cause a delay. If there are any GWT Serialization 
experts out there, any input would be appreciated.

The problem is occurring when using java.util classes that are implemented 
differently by the JRE running in the server and that which is in Android. For 
example, java.util.ArrayList has different methods, etc in the Android jar than 
in JRE6/JRE7/GWT emulation. This causes the server to throw an 
IncompatibleRemoteServiceException for Invalid Type Signature since the type 
signature for the Android arraylist is different than the server-side arraylist.

I'll be doing some additional work, but this will delay the library as it's a 
pretty big hitch. Expect at least 1 more week before I can give it another run.

Original comment by p.pr...@blueesoteric.com on 25 Mar 2013 at 12:21

GoogleCodeExporter commented 8 years ago
Hi Preethum Prithviraj,

Thats interesting - i didn't hit this problem with my fork. Make sure you have 
merged in the patch attached to this issue 
https://code.google.com/p/gwt-syncproxy/issues/detail?id=23 - the current 
master branch has a bug in it that causes the android client to use the 
serverside deserialization code, which doesn't work for some reason (it does 
too vigorous a check - unlike the client side deserialization code). 

Original comment by sangohan...@gmail.com on 25 Mar 2013 at 12:49

GoogleCodeExporter commented 8 years ago
Attempted with no luck. PM on the way with details. Thanks

Original comment by p.pr...@blueesoteric.com on 25 Mar 2013 at 2:48

GoogleCodeExporter commented 8 years ago
To Update, the previous issue has been resolved. I'm implementing the rest of 
the tests, which will probably take me through late Sunday. After that, I will 
plan on uploading all the source to a branch and provide a library jar for 
download for everyone to test out and give feedback. While it's out for testing 
over this week, I'll work on fixing some of the other mentioned bugs. If no 
problems, I'll plan on merging to the trunk in about a month. Meantime, I'll 
work on putting up some docs to the Wiki.

Original comment by p.pr...@blueesoteric.com on 30 Mar 2013 at 10:33

GoogleCodeExporter commented 8 years ago
An "alpha" version of the library is now available on the download list. It's 
functional, but also requires the gwt-servlet.jar to be included as a lib/ on 
the Android path. I'll put in some time this weekend to work on removing that 
dependency, but please see the Android wiki for details, and advise if any bugs 
are found. 

For anyone wanting the source level, the AndroidLibrary branch in the svn is 
also now available. Please see the SourceAndTesting wiki for details, 
dependencies, and workspace setup. As noted, this structure is designed for 
Eclipse IDE, though I'm sure it can be modified for others. I still have some 
documentation to complete on some of the library source and some of the testing 
materials, so please advise if there is anything unclear.

Original comment by p.pr...@blueesoteric.com on 5 Apr 2013 at 8:51

GoogleCodeExporter commented 8 years ago
My first attempt to replace the gwt-servlet.jar dependency failed. For whatever 
reason, when I start drawing from source files within the 
com/google/gwt/user/** area, regular objects seem to serialize without a 
problem, but anything using a collections object throws an 
IncompatibleRemoteServiceException, specified by a Serialization exception on 
ArrayList, HashSet, HashMap, etc stating that it is an "invalid type 
signature". The goal was to reduce the apk size (current test app was 2.2MB and 
dropped to 200kB with this change). Next attempt will be a straight inclusion 
of all gwt-user source and I'll start eliminating whatever files I can while 
the tests still pass. 

Can anyone advise how the current system is working or if anyone is more 
familiar with GWT, how to reduce these dependencies? Otherwise, I'll report 
back in a week or two on my progress

Original comment by p.pr...@blueesoteric.com on 6 May 2013 at 12:35

GoogleCodeExporter commented 8 years ago
Hi Preethum Prithviraj,

I vaguely recall something similar when i was doing this with my fork - it 
seems that there are two different serializers, one meant for the server, and 
one meant for the client. The server serializers are way more strict, while the 
client serializers are not as strict. Just as a check, you should make sure 
that the client classes classes are being used (see 
https://bitbucket.org/chii/gwt-syncproxy/src/aad3d15d8c0c86ce838347dd918963a622f
86ae7/src/main/java/com/google/gwt/user/client/rpc/core/java/util?at=master), 
and not these server serializers (see 
https://bitbucket.org/chii/gwt-syncproxy/src/aad3d15d8c0c/src/main/java/com/goog
le/gwt/user/server/rpc/core/java/util?at=master). 

Hope this helps. 

Cheers,
Chii

Original comment by sangohan...@gmail.com on 6 May 2013 at 6:54

GoogleCodeExporter commented 8 years ago
Thanks to Chii for his help, I was able to successfully eliminate the 
gwt-servlet.jar dependency and reduce the library footprint from 2MB to about 
350KB. Please see the Android wiki for details on usage, as there is a 
replacement dependency, servlet-api.jar (MUCH smaller). The library is now in 
Beta release, and will go into full release in a week or two if no problems are 
reported. The new library download is also available. 

Please advise if there are any problems. Thanks for everyone's help!

Original comment by p.pr...@blueesoteric.com on 7 May 2013 at 1:37

GoogleCodeExporter commented 8 years ago
Project jar has been released as part of the 0.4 SyncProxy release. The only 
change from the Beta jar to this release is a minor modification to handle an 
rpc conversion issue found while testing against Objectify.

Original comment by p.pr...@blueesoteric.com on 4 Jun 2013 at 12:03