|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Help with request batching issue.
I'm having a problem with some flex code I'm hoping I can get
some help with. It's related to batching of requests and responses.
mdickson:
I set up the connection programmatically
(channels, channelsets, etc) like so:
// Create the AMF Channel and ChannelSet and add our channel to it. var channel:AMFChannel = new AMFChannel( "pyamf-channel", "http://"+hostname+":"+port); var channels:ChannelSet = new ChannelSet(); channels.addChannel( channel ); // Create a new remote object and add listener(s) remoteObj = new RemoteObject("server"); remoteObj.channelSet = channels; remoteObj.addEventListener("fault", onFault); remoteObj.get_all.addEventListener("result", getAllResult); remoteObj.get_power_state.addEventListener("result", getPowerStateResult); remoteObj.get_server_name.addEventListener("result", getServerNameResult); remoteObj.get_health.addEventListener("result", getHealthResult); remoteObj.get_all(); If I then call 3 remote methods in succession the result handlers in my flash code never get called. But if I purposefully sequence them by calling the new method in the previous result handler they work. That is: private function getAllResult(re:ResultEvent) : void { var ids:Array = re.result as Array; if(ids.length > 0) { uuid = ids[0]; remoteObj.get_server_name(uuid); remoteObj.get_power_state(uuid); remoteObj.get_health(uuid); } } Doesn't fly. But calling just get_server_name() and then in the getServerNameResult method calling get_power_state() and so on works... Is there some option or issue with request batching I need to address? I can see the stuff come and go on the python side. I'm using the 3.3 Flex sdk fwiw with FlexBuilder. The python code is just using the WSGI gateway. Honestly I don't think the issue is in the server. More likely its sending something back the client doesn't like... Any help or pointers are greatly appreciated. BTW, thanks for all the great work that's gone into PyAMF. It's way cool! Mike _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Help with request batching issue.Sorry I missed you on IRC .. I'm not much of a Flex dev but I would like to confirm that PyAMF is doing the right thing here. Could you attach the http session? Request batching has been tested but all the kinks probably haven't been ironed out. Cheers, Nick On 12 Jun 2009, at 22:39, Mike Dickson wrote:
_______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Help with request batching issue.Yes. It returns an array of identifiers (uuids) used in the other calls to identify instances. In the case below its likely an array with a single element coming back. This call does succeed. Sorry to be such a NOOB but how do you enable PyAMF to dump the HTTP session? That'd be mighty handy :-) Is there a way to force the channel to be sychronous, or send a single response per message just so I can see if that changes behaviour? Like I said, I can see it doing the underlying calls in my objects for each request so they arrive at the server correctly but the response callback in the Flex client never get activated. Thanks for the quick turnaround! Mike
_______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Help with request batching issue.On 13 Jun 2009, at 18:25, Mike Dickson wrote:
> On 06/13/2009 02:15 AM, Nick Joyce wrote: >> >> Sorry I missed you on IRC .. >> >> I'm going to assume that the result of get_all is an array with >> more than zero elements? > Yes. It returns an array of identifiers (uuids) used in the other > calls to identify instances. In the case below its likely an array > with a single element coming back. This call does succeed. > >> >> I'm not much of a Flex dev but I would like to confirm that PyAMF >> is doing the right thing here. Could you attach the http session? >> Request batching has been tested but all the kinks probably haven't >> been ironed out. >> > Sorry to be such a NOOB but how do you enable PyAMF to dump the HTTP > session? That'd be mighty handy :-) PyAMF does not do that :) You should use some sort of intermediary such as Wireshark or Charles HTTP proxy (my favourite as it decodes AMF). > > > Is there a way to force the channel to be sychronous, or send a > single response per message just so I can see if that changes > behaviour? Like I said, I can see it doing the underlying calls in > my objects for each request so they arrive at the server correctly > but the response callback in the Flex client never get activated. Sounds weird. It may be that the response is never being received by client. The HTTP session will tell us more. > > > Thanks for the quick turnaround! > > Mike _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
| Free embeddable forum powered by Nabble | Forum Help |