Just to add, if you've worked with BackgroundWorker in C# with no
issues, you'll definitely find WorkerPool to be very similar.

Chris

On Nov 8, 5:51 am, Michael Nordman <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 7, 2008 at 9:53 AM, James <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > I'm am looking into using gears to transparently request large JSON
> > objects and then download and insert them into a local database
> > (SQlite).
>
> > The JSON objects are very large, 10MB in size approx, they are pre-
> > built and stored in files on the server since the data is static.
>
> > I would prefer to perform this with little user interaction, if at
> > all.
>
> > I'm using PHP on the server to read the data in to the response upon a
> > XmlHttpRequest.
>
> > From looking at the documentation, I would need to use the
> > HttpRequest, WorkerPool and Database API's to perform this function.
>
> > I have a couple of questions though:
>
> > Does the HttpRequest API handle JSON objects?
>
> Yes and no. JSON is utf8 encoded text data. HttpRequest.responseText will
> return that as a string. Its up to your application code to parse the string
> and populate an 'object'. There are libraries to perform that and there is
> also eval().
>
>
>
> > What are the tollerences of the HttpRequest API, is 10 MB too large?
>
> On a handheld device that may be a bit much, but on most desktop systems
> this should be fine.
>
>
>
> > I have used background worker constructs in both C# and Standard Java,
> > is the WorkerPool API similar in any way?
>
> Yes it is, WorkerPools start background threads.
>
>
>
> > If a user navigates away from the page that spawned the worker, will
> > the worker die a a result?
>
> Yes it will. If the worker isn't doing anything, the script context will die
> immediately. If the worker is doing something, the script will run to
> completion and then the context will go away. If the browser process exits
> while a worker script is still doing something, the script is killed (no
> waiting for completion).
>
>
>
> > Any advice/tips would be really great.
> > James- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to