You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Mark Fuqua <ma...@availdata.com> on 2013/11/21 15:12:27 UTC

RemoteObject question

I have to do syncing between SQLite and remote database.  In my research,
there are mentions that asynchronous RemoteObject requests will not freeze
the UI.  Is that true?  FWIW, this is a mobile application. 

 

If this is true, it simplifies the process a bit.  

 

Actionscript workers seem a bit complicated for a NOOB and don't work for
IOS.  If RemoteObjects won't freeze my UI, I can stop worrying about
multi-threading or pseudo multi-threading, which I guess is actually what
Workers are.

 

Mark Fuqua

 

mark@availdata.com

 

2301 Mount Carmel Road

Parkton,  MD  21120

(410) 215-7356

 

www.availdata.com

 


Re: RemoteObject question

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Thu, Nov 21, 2013 at 10:36 AM, Jesse Ward-Karet <jw...@tanium.com> wrote:

> The problem you may run into is processing the response from your remote
> request. If the response is large or has complex data types, the native
> parsers/deserializers can be very slow.  While the response is being
> processed you might have a freeze, sometimes a very significant one.
>
> There are a lot of things you can do to work around it... get data in
> smaller chunks, write your own custom responders, or we have had some
> success using workers to process the results before returning the processed
> response to the main SWF.
>
> What you choose to do depends on your backend infrastructure and what
> communications/API frameworks you are using. In my experience, with less
> complex/smaller data sets I've had good luck avoiding workers and simply
> suppressing attempts to convert objects back to strong types and instead
> writing my own deserializers.
>
> Jesse
>
>
To add to what Jesse said, using AMF encoding for passing the data back and
forth from the server would make a huge difference over XML or JSON.  Using
AMF means that you don't have the overhead of serializing/de-serializing
the data in the front end.

Thanks,
Om


>
> On Nov 21, 2013, at 6:22 AM, Mark Line <ma...@gmail.com> wrote:
>
> > Yes that is correct.
> >
> > Like a normal Flex event, you just set up listeners functions. The app
> > won't just stop executing while waiting for the resultEvent or
> faultEvent.
> >
> > It's up to you to manage the flow and control though
> >
> > -----Original Message-----
> > From: Mark Fuqua [mailto:mark@availdata.com]
> > Sent: 21 November 2013 14:12
> > To: users@flex.apache.org
> > Subject: RemoteObject question
> >
> > I have to do syncing between SQLite and remote database.  In my research,
> > there are mentions that asynchronous RemoteObject requests will not
> freeze
> > the UI.  Is that true?  FWIW, this is a mobile application.
> >
> >
> >
> > If this is true, it simplifies the process a bit.
> >
> >
> >
> > Actionscript workers seem a bit complicated for a NOOB and don't work for
> > IOS.  If RemoteObjects won't freeze my UI, I can stop worrying about
> > multi-threading or pseudo multi-threading, which I guess is actually what
> > Workers are.
> >
> >
> >
> > Mark Fuqua
> >
> >
> >
> > mark@availdata.com
> >
> >
> >
> > 2301 Mount Carmel Road
> >
> > Parkton,  MD  21120
> >
> > (410) 215-7356
> >
> >
> >
> > www.availdata.com
> >
> >
> >
> >
>
>

RE: RemoteObject question

Posted by Mark Fuqua <ma...@availdata.com>.
1.  I am anticipating no more than 10 records (usually just one or two at a
time) sent up as an array.  The SQLite database is queried, an array created
and sent to a remote CFC via RemoteObject.

2.  No more than 10 records received from a CFC as a Query object, which
will then be put in an ArrayCollection, which will be looped to do Insert or
Replace into a SQLite database.


If a user is scrolling a list while this is happening, will it be obvious?  

It seems like the list, with an IconItemRenderer, is pretty resource hungry
as is.  The list scrolls nicely and is the most intensive view...the rest
are somewhat static once rendered.  However, my testing phone is a Motorola
MotoX, which is pretty new and beefy, so it will most likely be worse for
many users.

Any thoughts?  Is there a performance benefit to using RemoteObject in
ActionScript rather than MXML? Or is the compiled version pretty much the
same?

Thanks,

Mark

-----Original Message-----
From: Jesse Ward-Karet [mailto:jwk@tanium.com] 
Sent: Thursday, November 21, 2013 1:37 PM
To: users@flex.apache.org
Subject: Re: RemoteObject question

The problem you may run into is processing the response from your remote
request. If the response is large or has complex data types, the native
parsers/deserializers can be very slow.  While the response is being
processed you might have a freeze, sometimes a very significant one. 

There are a lot of things you can do to work around it... get data in
smaller chunks, write your own custom responders, or we have had some
success using workers to process the results before returning the processed
response to the main SWF.

What you choose to do depends on your backend infrastructure and what
communications/API frameworks you are using. In my experience, with less
complex/smaller data sets I've had good luck avoiding workers and simply
suppressing attempts to convert objects back to strong types and instead
writing my own deserializers.

Jesse


On Nov 21, 2013, at 6:22 AM, Mark Line <ma...@gmail.com> wrote:

> Yes that is correct. 
> 
> Like a normal Flex event, you just set up listeners functions. The app 
> won't just stop executing while waiting for the resultEvent or faultEvent.
> 
> It's up to you to manage the flow and control though
> 
> -----Original Message-----
> From: Mark Fuqua [mailto:mark@availdata.com]
> Sent: 21 November 2013 14:12
> To: users@flex.apache.org
> Subject: RemoteObject question
> 
> I have to do syncing between SQLite and remote database.  In my 
> research, there are mentions that asynchronous RemoteObject requests 
> will not freeze the UI.  Is that true?  FWIW, this is a mobile
application.
> 
> 
> 
> If this is true, it simplifies the process a bit.  
> 
> 
> 
> Actionscript workers seem a bit complicated for a NOOB and don't work 
> for IOS.  If RemoteObjects won't freeze my UI, I can stop worrying 
> about multi-threading or pseudo multi-threading, which I guess is 
> actually what Workers are.
> 
> 
> 
> Mark Fuqua
> 
> 
> 
> mark@availdata.com
> 
> 
> 
> 2301 Mount Carmel Road
> 
> Parkton,  MD  21120
> 
> (410) 215-7356
> 
> 
> 
> www.availdata.com
> 
> 
> 
> 



Re: RemoteObject question

Posted by Jesse Ward-Karet <jw...@tanium.com>.
The problem you may run into is processing the response from your remote request. If the response is large or has complex data types, the native parsers/deserializers can be very slow.  While the response is being processed you might have a freeze, sometimes a very significant one. 

There are a lot of things you can do to work around it... get data in smaller chunks, write your own custom responders, or we have had some success using workers to process the results before returning the processed response to the main SWF.

What you choose to do depends on your backend infrastructure and what communications/API frameworks you are using. In my experience, with less complex/smaller data sets I've had good luck avoiding workers and simply suppressing attempts to convert objects back to strong types and instead writing my own deserializers.

Jesse


On Nov 21, 2013, at 6:22 AM, Mark Line <ma...@gmail.com> wrote:

> Yes that is correct. 
> 
> Like a normal Flex event, you just set up listeners functions. The app
> won't just stop executing while waiting for the resultEvent or faultEvent.
> 
> It's up to you to manage the flow and control though
> 
> -----Original Message-----
> From: Mark Fuqua [mailto:mark@availdata.com] 
> Sent: 21 November 2013 14:12
> To: users@flex.apache.org
> Subject: RemoteObject question
> 
> I have to do syncing between SQLite and remote database.  In my research,
> there are mentions that asynchronous RemoteObject requests will not freeze
> the UI.  Is that true?  FWIW, this is a mobile application. 
> 
> 
> 
> If this is true, it simplifies the process a bit.  
> 
> 
> 
> Actionscript workers seem a bit complicated for a NOOB and don't work for
> IOS.  If RemoteObjects won't freeze my UI, I can stop worrying about
> multi-threading or pseudo multi-threading, which I guess is actually what
> Workers are.
> 
> 
> 
> Mark Fuqua
> 
> 
> 
> mark@availdata.com
> 
> 
> 
> 2301 Mount Carmel Road
> 
> Parkton,  MD  21120
> 
> (410) 215-7356
> 
> 
> 
> www.availdata.com
> 
> 
> 
> 


RE: RemoteObject question

Posted by Mark Line <ma...@gmail.com>.
Yes that is correct. 

Like a normal Flex event, you just set up listeners functions. The app
won't just stop executing while waiting for the resultEvent or faultEvent.

It's up to you to manage the flow and control though

-----Original Message-----
From: Mark Fuqua [mailto:mark@availdata.com] 
Sent: 21 November 2013 14:12
To: users@flex.apache.org
Subject: RemoteObject question

I have to do syncing between SQLite and remote database.  In my research,
there are mentions that asynchronous RemoteObject requests will not freeze
the UI.  Is that true?  FWIW, this is a mobile application. 

 

If this is true, it simplifies the process a bit.  

 

Actionscript workers seem a bit complicated for a NOOB and don't work for
IOS.  If RemoteObjects won't freeze my UI, I can stop worrying about
multi-threading or pseudo multi-threading, which I guess is actually what
Workers are.

 

Mark Fuqua

 

mark@availdata.com

 

2301 Mount Carmel Road

Parkton,  MD  21120

(410) 215-7356

 

www.availdata.com

 



Re: RemoteObject question

Posted by Lee Burrows <su...@leeburrows.com>.
All remote comms are async (so wont freeze the app)



On 21/11/2013 14:12, Mark Fuqua wrote:
> I have to do syncing between SQLite and remote database.  In my research,
> there are mentions that asynchronous RemoteObject requests will not freeze
> the UI.  Is that true?  FWIW, this is a mobile application.
>
>   
>
> If this is true, it simplifies the process a bit.
>
>   
>
> Actionscript workers seem a bit complicated for a NOOB and don't work for
> IOS.  If RemoteObjects won't freeze my UI, I can stop worrying about
> multi-threading or pseudo multi-threading, which I guess is actually what
> Workers are.
>
>   
>
> Mark Fuqua
>
>   
>
> mark@availdata.com
>
>   
>
> 2301 Mount Carmel Road
>
> Parkton,  MD  21120
>
> (410) 215-7356
>
>   
>
> www.availdata.com
>
>   
>
>


-- 
Lee Burrows
ActionScripter