8 messages in com.googlegroups.google-gearsRe: [google-gears] Re: working worker...
FromSent OnAttachments
JIT23 Jan 2008 22:15 
Srikanth23 Jan 2008 23:57 
JIT24 Jan 2008 03:52 
Dimitri Glazkov24 Jan 2008 04:21 
JIT24 Jan 2008 05:54 
Dimitri Glazkov24 Jan 2008 06:53 
Michael Nordman24 Jan 2008 19:39 
JIT03 Feb 2008 23:24 
Subject:Re: [google-gears] Re: working worker pool
From:Michael Nordman (mich@google.com)
Date:01/24/2008 07:39:17 PM
List:com.googlegroups.google-gears

Do you access the same database from both the worker and page contexts? The 'hangs' could be cause by contention on that resource. The db will be locked for as long as a transaction is open in either context. While the db is locked, access to the db from the other context will block. Something you definitely want to avoid is opening a transaction, making an ajax request, and not closing the transaction until after the request completes. If you can arrange to access the db exclusively from your worker, that would be ideal.

On Jan 24, 2008 6:53 AM, Dimitri Glazkov <dimi@gmail.com> wrote:

Did you read my message entirely? Take a look at http://code.google.com/apis/gears/upcoming/api_httprequest.html

With HttpRequest module, you can make AJAX calls from the worker, without having to come back to the main thread. If you are synchronizing entries from database, the entire process can stay inside of the worker.

Perhaps I am not understanding something.

:DG<

On Jan 24, 2008 7:54 AM, JIT <pras@gmail.com> wrote:

Hi,

thanks for the reply.

As you mentioned "Since you're returning back to the parent worker to do XHR calls" is there any other solution for this.

Thanks Prasad