>
> I would like to call GWT RPC method from my worker pool for
> synchronization process between dbs (client and server)
> It seems that the WorkerPool can only call javascript file or text
> script...
>
> GWT purpose is to generate javascript as well so it is not possible
> to:
> 1. develop the method/class to invoke in the WorkerPool with GWT.
yeah sure, create a new GWT module for each worker. there is a GALGWT
project that should have some Gears integration stuff in it.
> 2. compile this method with GWT compiler
yup, but you'll need to use the single script linker
> 3. call this method from the WorkerPool
That one is one that I'm not sure on. At one time it was possible to
issue XHR from a worker, but I was told that was a bug. I'm not sure
if worker XHRs have been added or not. I'm sure someone that is more
up to date on Gears can answer that one for you.
-jason
On Apr 16, 11:42 am, Jason Essington <jason.essing...@gmail.com>
wrote:I am going on some stale gears info here, but ...On Apr 15, 2009, at 3:15 PM, fvisticot wrote:I would like to call GWT RPC method from my worker pool forsynchronization process between dbs (client and server)It seems that the WorkerPool can only call javascript file or textscript...GWT purpose is to generate javascript as well so it is not possibleto:1. develop the method/class to invoke in the WorkerPool with GWT.yeah sure, create a new GWT module for each worker. there is a GALGWTproject that should have some Gears integration stuff in it.
In theory, it would be possible to use GWT to generate code for
workers in the worker pool, but I've never done it. If someone else
has, I'd love to hear about it.
A new linker or manual trickery would
be needed to eliminate relying on browser load event logic, which is
inappropriate for WorkerPool threads.
2. compile this method with GWT compileryup, but you'll need to use the single script linker
Unfortunately, the reliance on browser events and window objects is
present even in the SingleScriptLinker, but you could probably work
around it.
3. call this method from the WorkerPoolThat one is one that I'm not sure on. At one time it was possible toissue XHR from a worker, but I was told that was a bug. I'm not sureif worker XHRs have been added or not. I'm sure someone that is moreup to date on Gears can answer that one for you.
There is now a way to call an XHR using the HttpRequest object in
WorkerPool, but again, since I haven't written code in GWT for a
WorkerPool, I haven't tried to integrate GWT RPC.
Since GWT RPC is asyncronous, you could do the RPCs in the main thread
and then send the result data as messages to Worker threads.
-jason
Sorry, as I said, I've not really worked on this much lately due to
lack of time. however there is a fairly detailed discussion from a
couple of years ago when I first decided to get GWT modules to run as
workers.
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/d70bdbaeffa597b4
Though the data there is undoubtably outdated, it might still be a bit
useful to you.
-jason