views:

121

answers:

2

I am using Google AppEngine, in conjunction with PyAMF to provide RemoteObject support. In my Flex code I make several RemoteObject method calls at once which tends to batch the AMF Messages into a single HTTP request.

Most of the time this is fine but AppEngine applies some strict per request limits (in this case I am hitting a DeadlineExceededError - max 30 seconds). A number of service methods are expected to take upwards of 10 seconds and if these are batched by the RemoteObject into 1 HTTP .. you see where this is going.

Now you could say refactor your service calls and that is also going on but not really the question being asked here. Is there a way to prevent Flex RemoteObject from batching AMF requests for situations like this?

I have done a fair amount of Googling on the subject and come up with bupkis. It seems to me that I would need to implement a custom version of mx.messaging.channels.AMFChannel or something of that nature, which seems waay too hardcore for a feature like this ..

Anyone have any pointers/insight?

A: 

you can create a pool of connections, and create another another class that triggers the connections. Your application does not make the connections, only feeds the pool.

Daniel Schmitz
Can you give an example of what this looks like? I am a n00b when it comes to Flex ..
njoyce
+1  A: 

Check out the concurrency property on RemoteObject.

James Ward
Looking at these docs (and correct me if I'm wrong) my problem seems to be subtly different - I would like ensure that each AMF Message sent via the RemoteObject is sent by one HTTP Request (and be able to make multiple calls without error).I dug through the Flex SDK and it doesn't appear that the Messaging RPC is batching the requests which leads me to assume that it is occurring in the underlying NetConnection?
njoyce
Yes. You are right. The Flash Player waits until the frame ends to send all queued network requests. If you move each request onto a different frame (like with callLater) then it will insure that each request actually uses a different HTTP network request.
James Ward
Thanks! That info was enough for me to be able to put my calls into a queue and stagger them accordingly.
njoyce