Hi there. I'm new to the Adobe forums so I am hoping this is the correct place for this question. If there's a better place, then let me know.
My question is about the URLRequest/Loader object and the order in which these requests are submitted/comitted to the server. I am fairly new to developing internet based applications, so this question will probably reflect that.
Currently I have the need to make a number of requests to the server in bulk to get information about certain objects that exist within the application (its a game actually), problem is, some of the requests are order sensitive, that is, some must be done before others. That's fine on the client side (AS3 + Flex) and it does exactly that, however, once these requests make it to the server, they are actually performed out of order.
Now, this actually makes some amount of sense as the URLRequest/Loader mechanism appears to be atomic, in that you use it to make a request to a service exposed by the server, you get some data back and the event handler is called for that response. It appears you would execute any order specific function calls within this event handler. It appears that once I use the URLLoader to execute the URLRequest, I have no control on in what order these calls are actually executed. Is this correct? Also, I am testing this locally at the moment, so latency "should not" be a huge issue.
At the moment I am trying to determine if I have gone as far I can with this current model and if I now need to refactor the transaction layer to something more suitable for a game. Seems like I may, just want to get opinions from people that may have more experience on this than myself.
I implemented a queue to handle the requests to the server. Each request is queued and then fired as the previous one completes. Completion is defined by its event handler being called. This works for the time being and all requests are sent in the correct order. I'll need error checking of course, but so far so good.