|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
How reliable is PyAMF -- AS3 remoting?Dear
pyamf-list,
currently I'm working out an interactive shell. It's a little more elaborated than the shell-example provided by the pyamf project. My major concern is right now that occasionally messages are swallowed. This isn't a regular phenomemon and not easy to reproduce. The basic setup is as follows. The OS is Windows XP. The Python version is 2.5. with pyamf-0.3.1. The application uses a NetConnection object and defines `onResult` and `onFault` methods passed into a `Responder` object. As as server I use the basic WSGI demo server from the "Hello World" example. It listenes to localhost. There are two service functions, `echo` and `interact`. It suffices to consider the simpler `echo` function because the phenomenon occurs there as well. On each user input a `sendCommand` method in the AS3 code is called and a callback of `onResult` is expected. A common sequence is sendCommand onResult sendCommand onResult ... However occasionally onResult is not called and one obersves the following sequence sendCommand onResult sendCommand sendCommand ... This is not an effect of the speed of user interaction. One can pause for a few seconds and the latter sequence is nevertheless observed. I don't know where to start looking for a solution to this problem and which communication endpoint is to blame. Maybe someone here has some expertise and stumbled over comparable problems in the past? I also consider a workaround implementing a communication protocol by which the message is sent to the client multiple times in increments of about 500ms until the server receives an ACK or a timeout / threshold ( e.g. 5 times ) otherwise. I'd like to avoid such workarounds if I can in particular they are only means to patch some behavior I do not fully understand. Kind regards, Kay _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: How reliable is PyAMF -- AS3 remoting?Hi Kay,
thanks for the detailed explanation. I noticed you're using 0.3.1, any reason why you're using a very old version of PyAMF? There have been many fixes since then (it was released over a year ago) and it would be good to know if the latest (0.4.2 or trunk) would solve the issues you're having.. Cheers, Thijs On 1 Jun 2009, at 12:33, Kay Schluehr wrote:
_______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: How reliable is PyAMF -- AS3 remoting?Thijs Triemstra | Collab schrieb:
> Hi Kay, > > thanks for the detailed explanation. I noticed you're using 0.3.1, any > reason why you're using a very old version of PyAMF? There have been > many fixes since then (it was released over a year ago) and it would > be good to know if the latest (0.4.2 or trunk) would solve the issues > you're having.. Hi Thijs, Sorry, I know how annoying it is when people come up with questions concerning ancient releases. I just installed pyamf-0.4.2 as well as Fiddler2. I changed the address from `http://localhost:8081` to `http://192.168.1.33:8081` which is the the local address of my machine together with the some port. This way Fiddler is able to receive and notify traffic. Fiddler shows me that all requests are handled correctly by PyAMF with a 200 RC. The problem is not going away and must be on the Flash side. I already guessed this because some debugging messages in the server app showed that the server responded correctly and since I sended the same text multiple times I could be sure that encoding and decoding must be O.K. on the Python side. That's good for you but bad for me anything in because PyAMF would be just easy to fix. Ciao, Kay _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Terrible performance results of echo_test in local networkfor the last week I developed in Flash + PyAMF-0.4.2 on a WinXP notebook. The performance of the connection and throughput was quite good. Now I distributed my app and let my Flash client run on Vista PC while the server still runs on the XP notebook. The performance went down by at least two orders of magnitude. One can blame a slow network connection but this alone might not suffice. I attempted to reproduce the measurements with echo_test.swf + echoserver in WSGI mode from the PyAMF site and it confirmed that each message required at least 8 sec + X no matter how much data was transferred. On a single notebook ( both client and server ) I got the following results: Connecting through REMOTEOBJECT using AMF3 encoding... Testing null: OK (in 0.812 sec). Result: (null) Testing undefined: OK (in 0.042 sec). Result: (null) Testing true: OK (in 0.045 sec). Result: (true) Testing false: OK (in 0.043 sec). Result: (false) Testing : OK (in 0.045 sec). Result: (String with 0 chars) Testing Hello world!: OK (in 0.044 sec). Result: (Hello world!) Testing test1,test2,test3,test4: OK (in 0.044 sec). Result: (test1,test2,test3,test4) Testing String with 40000 chars: OK (in 0.069 sec). Result: (String with 40000 chars) Testing String with 70000 chars: OK (in 0.062 sec). Result: (String with 70000 chars) Testing String with 1000000 chars: OK (in 0.769 sec). Result: (String with 1000000 chars) Testing 0: OK (in 0.014 sec). Result: (0) ... Testing ByteArray containing 142 bytes: OK (in 0.045 sec). Result: (ByteArray containing 142 bytes) Tesing array of 2 ByteArrays: OK (in 14991 sec). Result: (Array of 2 ByteArrays) Successfully ran 52 test(s) in 3.853 seconds. On a PC + notebook network I got this result Connecting through REMOTEOBJECT using AMF3 encoding... Testing null: OK (in 22.886 sec). Result: (null) Testing undefined: OK (in 9.211 sec). Result: (null) Testing true: OK (in 9.01 sec). Result: (true) Testing false: OK (in 8.636 sec). Result: (false) Testing : OK (in 9.211 sec). Result: (String with 0 chars) Testing Hello world!: OK (in 9.186 sec). Result: (Hello world!) Testing test1,test2,test3,test4: OK (in 8.847 sec). Result: (test1,test2,test3,test4) Testing String with 40000 chars: OK (in 9.079 sec). Result: (String with 40000 chars) Testing String with 70000 chars: OK (in 9.611 sec). Result: (String with 70000 chars) Testing String with 1000000 chars: OK (in 21.65 sec). Result: (String with 1000000 chars) Testing 0: OK (in 8.033 sec). Result: (0) Testing ByteArray containing 142 bytes: OK (in 9.159 sec). Result: (ByteArray containing 142 bytes) .... Tesing array of 2 ByteArrays: OK (in 524675 sec). Result: (Array of 2 ByteArrays) Successfully ran 52 test(s) in 490.744 seconds. Has anyone an idea how to explain the discrepances? Notice that running a simple pure Python client/server system as described here http://ilab.cs.byu.edu/python/socket/echoserver.html distributed on both computers needs about one second for echoing a message. This is a guessed result though and I could provide numbers if someone is interested. Regards, Kay _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Terrible performance results of echo_test in local networkThat is really weird .. What is the ping between the two machines? Can you switch logging on in pyamf : import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s') and rerun the echo_test and attach the log - this would be able to show if pyamf is taking 8 seconds minimum to process the request or if the time is elsewhere ? I would also suggest using something like Firebug to view the network timeline and see where the lag is .. Using echoserver isn't built for performance but even so 8+ seconds is crazy! Hth, Nick On 4 Jun 2009, at 16:24, Kay Schluehr wrote:
_______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: How reliable is PyAMF -- AS3 remoting?Getting a copy of that http traffice for that session would be very
useful I think. Also, what browser are you using? This may be related to the IE cache headers discussed in an earlier thread .. On 1 Jun 2009, at 20:07, Kay Schluehr wrote: > Thijs Triemstra | Collab schrieb: >> Hi Kay, >> >> thanks for the detailed explanation. I noticed you're using 0.3.1, >> any reason why you're using a very old version of PyAMF? There have >> been many fixes since then (it was released over a year ago) and it >> would be good to know if the latest (0.4.2 or trunk) would solve >> the issues you're having.. > Hi Thijs, > > Sorry, I know how annoying it is when people come up with questions > concerning ancient releases. > > I just installed pyamf-0.4.2 as well as Fiddler2. I changed the > address from `http://localhost:8081` to `http://192.168.1.33:8081` > which is the the local address of my machine together with the some > port. This way Fiddler is able to receive and notify traffic. > Fiddler shows me that all requests are handled correctly by PyAMF > with a 200 RC. The problem is not going away and must be on the > Flash side. I already guessed this because some debugging messages > in the server app showed that the server responded correctly and > since I sended the same text multiple times I could be sure that > encoding and decoding must be O.K. on the Python side. > > That's good for you but bad for me anything in because PyAMF would > be just easy to fix. > > Ciao, Kay > > > _______________________________________________ > PyAMF users mailing list - users@... > http://lists.pyamf.org/mailman/listinfo/users _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Terrible performance results of echo_test in local networkNick Joyce schrieb:
> That is really weird .. > > What is the ping between the two machines? Can you switch logging on > in pyamf : > > import logging > logging.basicConfig(level=logging.DEBUG, > format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s') Logging is activated by default and may consume a little time for printing to stdout. ( Note that the application is broken at echotest/python/util.py. The WSGIGateway object is initialized with an unavailable "logging" keyword argument. The base class creates the logger on its own in the object constructor. So I just removed it ). > > and rerun the echo_test and attach the log - this would be able to > show if pyamf is taking 8 seconds minimum to process the request or if > the time is elsewhere ? > > I would also suggest using something like Firebug to view the network > timeline and see where the lag is .. > > Using echoserver isn't built for performance but even so 8+ seconds is > crazy! www.fiber-space.de/misc/echotest.zip Firebug essentially confirmed the echo_test logging results with some higher resolutions at some places ( message queue ). One seemingly cannot export Firebug logs. So I added also two screenshots for providing at least an impression. I have a second older XP notebook and used it to run echo_test.swf and got comparable results. I also switched the roles of the computers taking part as client and server. So it is not a problem of a single machine. There is something that decelerates the whole communication process but what can it be? Regards, Kay _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Terrible performance results of echo_test in local networkHi Kay,
On 5 Jun 2009, at 10:50, Kay Schluehr wrote: > Logging is activated by default and may consume a little time for > printing to stdout. > > ( Note that the application is broken at echotest/python/util.py. > The WSGIGateway object is initialized with an unavailable "logging" > keyword argument. The base class creates the logger on its own in > the object constructor. So I just removed it ). If you're using PyAMF 0.4.2 you should use the 0.4.2 tag of the examples. The upcoming 0.5 disabled logging by default and trunk/ echotest/python/util.py was updated to reflect these changes. Cheers, Thijs _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Terrible performance results of echo_test in local networkHi,
Did you ever get to the bottom of this? Nick On 5 Jun 2009, at 10:50, Kay Schluehr wrote: > Nick Joyce schrieb: >> That is really weird .. >> >> What is the ping between the two machines? Can you switch logging >> on in pyamf : >> >> import logging >> logging.basicConfig(level=logging.DEBUG, >> format='%(asctime)s %(levelname)-5.5s [%(name)s] % >> (message)s') > Logging is activated by default and may consume a little time for > printing to stdout. > > ( Note that the application is broken at echotest/python/util.py. > The WSGIGateway object is initialized with an unavailable "logging" > keyword argument. The base class creates the logger on its own in > the object constructor. So I just removed it ). >> >> and rerun the echo_test and attach the log - this would be able to >> show if pyamf is taking 8 seconds minimum to process the request or >> if the time is elsewhere ? >> >> I would also suggest using something like Firebug to view the >> network timeline and see where the lag is .. >> >> Using echoserver isn't built for performance but even so 8+ seconds >> is crazy! > I reproduced the data and zipped the results. One can download them > here > > www.fiber-space.de/misc/echotest.zip > > Firebug essentially confirmed the echo_test logging results with > some higher resolutions at some places ( message queue ). One > seemingly cannot export Firebug logs. So I added also two > screenshots for providing at least an impression. > > I have a second older XP notebook and used it to run echo_test.swf > and got comparable results. I also switched the roles of the > computers taking part as client and server. So it is not a problem > of a single machine. There is something that decelerates the whole > communication process but what can it be? > > Regards, Kay > _______________________________________________ > PyAMF users mailing list - users@... > http://lists.pyamf.org/mailman/listinfo/users _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
|
|
Re: Terrible performance results of echo_test in local networkNick Joyce schrieb:
> Hi, > > Did you ever get to the bottom of this? > > Nick Not really. As I said in the initial post the performance problems do not occur when I run both the Flash player + SWF on and the server at localhost. This was my development setup. One can create a similarly effective setup when one accesses PyAMF over mod_python or mod_wsgi and let the the Apache server also host the SWF. This is a realistic configuration that works fine. What doesn't work - at least not in tolerable performance bounds - is an SWF on one machine A that communicates over Flash Remoting with a PyAMF server on a second machine B. I haven't found an explanation for this and all I did is documenting the case for people who stumble over the same problem. Ciao, Kay _______________________________________________ PyAMF users mailing list - users@... http://lists.pyamf.org/mailman/listinfo/users |
| Free embeddable forum powered by Nabble | Forum Help |