Jira issue has been created for this:
https://bugs.adobe.com/jira/browse/BLZ-184

Please vote if you want it get fixed.  Thanks everyone.


--- In [email protected], "Seth Hodgson" <[EMAIL PROTECTED]> wrote:
>
> Right, only for AMF, and I'm not aware of any documentation on that. If
> there was, it would be regarding NetConnection.call(...).
> 
>  
> 
> URLLoader doesn't do any batching - it just hands off HTTP requests to
> the browser to send. But when using URLLoader, you need to be aware that
> browsers impose connection limits to a single domain (a recommendation
> in the HTTP 1.1 spec) so even there you end up in a pseudo-serial
> situation with no direct control over whether requests will be sent
> serially or concurrently. You can use CNAME hacks to circumvent this
> (ie. Yahoo/Google maps downloading map tiles), but that's quite a bit
> more complex to configure and deploy and your app needs to be hardcoded
> to know about all your CNAMEs and to know when to use which for what
> calls.
> 
>  
> 
> Our HTTPChannel, which uses URLLoader internally, serializes the
> requests it sends to sync up with the behavior of the AMFChannel and
> RTMPChannel and try to ensure that requests from the client to the
> server have a consistent, expected order (very important for Data
> Management).
> 
>  
> 
> Seth
> 
>  
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Douglas Knudsen
> Sent: Friday, May 23, 2008 10:05 AM
> To: [email protected]
> Subject: Re: [flexcoders] Re: Async Concurrent Requests with AMF for
> BlazeDS or LCDS
> 
>  
> 
> Seth, where is this documented?   Been looking for info on if the player
> batches calls up or not.  So it does, but only for AMF?
> 
> DK 
> 
> On Thu, May 22, 2008 at 2:34 PM, Seth Hodgson <[EMAIL PROTECTED]>
> wrote:
> 
> There is a single thread that advances through SWF frames and runs your
> ActionScript code and event handlers, but network calls are performed by
> separate background threads concurrently.
> 
> In order to have calls processed concurrently on the server, they need
> to arrive as separate requests. In the case of AMF, if you make a series
> of calls quickly chances are good/excellent that the Player will batch
> them up and send them to the server in the body of a single HTTP POST.
> When this happens, the server must unpack them and process them serially
> and then pack the results for all these calls back up in the body of a
> single HTTP response. Because we're dealing with a single request and
> response, there's no way to send back results for individual calls
> separately. When these results get back to the browser and are passed
> back into the Player, they are dispatched to your ActionScript handling
> code as asynchronous events. There's not a good way to force calls to be
> sent as separate requests, and even if you could, browsers impose limits
> on the number of concurrent connections they'll open to a server, so
> this really isn't the right way to solve your scenario. Also, in the
> case of RTMP all traffic between the client and server happens over a
> single connection and is ordered serially.
> 
>  
> 
> If you want to process calls/messages/data asynchronously on the server
> the proper way, it requires a bit of work on your part to accomplish at
> this point. Rather than running your current logic in your RemoteObject
> directly when it is invoked, you need to break that out into a Runnable
> class, and when you're invoked, create an instance of this class that
> packages up the incoming args and info about the client making the call
> and then submit that for asynchronous execution to a
> java.util.concurrent.Executor that you'd need to set up during server
> startup. Your remoting method could return a job id or just void once it
> has queued an instance of your Runnable with the Executor. On the client
> when you get a ResultEvent for your call you don't get the actual result
> - you just know that your invocation was successfully queued for
> asynchronous execution on the server. So the second half of the equation
> is how to get the result or fault generated when the Executor runs your
> Runnable back to the client. You need to take advantage of messaging in
> BlazeDS or LCDS to achieve this. In your client app, create a Consumer
> and subscribe to a destination you define that you can publish
> results/faults as AsyncMessages back to target clients from your
> Runnable. Your Consumer should subscribe to a subtopic that applies only
> to it, or use a selector expression. When your Runnable runs and
> generates the result or fault to return, you'd can create an
> AsyncMessage containing the result of fault info and publish it to this
> destination, using either a subtopic header, or some other message
> header that will be evaluated against the Consumer's selector expression
> such that the message is routed to the proper Consumer. That lets you
> return async results or faults to clients in a truly asynchronous
> manner.
> 
>  
> 
> This is actually something I'd like to see us bake into the product
> directly. Would one of you on the thread log an enhancement request here
> and the rest of you vote for it: https://bugs.adobe.com/blazeds/
> 
> No promises because resourcing is always a juggle but lots of people ask
> for this, I'd like to see it happen, and your votes matter J
> 
>  
> 
> Seth
> 
>  
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of MyoT
> Sent: Thursday, May 22, 2008 10:49 AM
> To: [email protected]
> Subject: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS
> or LCDS
> 
>  
> 
> If Flex (Flash) uses async request, does Single Threaded matter?
> 
> I tried to have more than one channel, it doesn't help either.
> 
> - Jay
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "twcrone70" <twcrone70@> wrote:
> >
> > Your server code might be able to run things concurrently but unless I
> > misread something, Flash is currently single threaded I believe. So
> > actually sending the requests at the 'same time' is difficult if even
> > possible.
> > 
> > - Todd 
> > 
> > --- In [email protected]
> <mailto:flexcoders%40yahoogroups.com> , "MyoT" <bighead007us@> wrote:
> > >
> > > Hi There,
> > > 
> > > I am wondering is there any way, you can make concurrent requests to
> > one destination via 
> > > RemoteObject over AMF.
> > > 
> > > Basically, I want to issue multiple request of getItem operations to
> > one destination. Currently, 
> > > my command is making multiple async requests but RemoteObject
> > doesn't seem to be calling 
> > > server concurrently. Server got those request in sequential.
> > > 
> > > Any help or pointer would help.
> > > 
> > > Thanks in advance,
> > > Jay
> > >
> >
> 
> 
> 
> 
> -- 
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?
>


Reply via email to