Re: athena evolution path to 3G networks 'not so reliable' connections
Werner Thie <[email protected]> Wed, 11 Nov 2009 17:36:54 +0100
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Organization | THIEngineering AG |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------090903080209020801000508
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Hello Jean-Paul
wanted to dive into that matter and thought I first look at the tests
for the LivePages. Being on MSW is often not ideal but being bound to
develop for this platform too I wondered if I could bring the skipped
tests to run on MSW too. Brought in SpiderMonkey V1.7 as js.exe and
tweaked nevow.testutil.py such that I now get from trial test
===============================================================================
[FAIL]:
nevow.test.test_consolejstest.JSGenerationTestCase.test_generateTestScript
Traceback (most recent call last):
File "C:\proj\nevow\Nevow\nevow\test\test_consolejstest.py", line 164,
in gotResult
''])
twisted.trial.unittest.FailTest: not equal:
a = ['hello from ConsoleJSTestFoo\r',
'hello from ConsoleJSTestFoo.Bar\r',
'hello from ConsoleJSTestFoo.Baz\r',
'hello from the test module\r',
'']
b = ['hello from ConsoleJSTestFoo',
'hello from ConsoleJSTestFoo.Bar',
'hello from ConsoleJSTestFoo.Baz',
'hello from the test module',
'']
-------------------------------------------------------------------------------
Ran 1047 tests in 8.125s
FAILED (skips=4, expectedFailures=2, failures=1, successes=1040)
The JS tests run fine up to the one failing which is most probably
because of the line endings given in a.
If this is of any interest please find the patch to testutil.py attached
Cheers, Werner
[email protected] wrote:
> On 19 Oct, 09:19 am, [email protected] wrote:
>> Hi all
>>
>> Being a long term user of nevow/athena and quite happy with it I have a
>> question which comes from the area of more and more clients being mobile
>> and thus not having all to reliable TCP connections on 3G networks.
>> For all the stuff athena does it relies on a persistent TCP connection.
>> The moment the client is disconnected the whole life situation is gone,
>> everything is teared down and starts anew when the client reconnects.
>
> Fortunately Athena doesn't actually rely on a single unbroken persistent
> TCP connection. It's perfectly capable of handling lost connections.
>> Does anybody see an evolution path for athena moving towards being able
>> to do reliable delivery and withstanding short (<20 sec) disconnects of
>> the persistent connection?
>
> A small change to the way Athena retries failed requests may be
> sufficient to handle this case. Currently, it will retry 2 or 3 times
> (I forget which) and then give up completely. There is no delay between
> retries. It would be a fairly simple change to increase the number of
> retries and/or insert some delay between them. This could get you to
> the point where 20 seconds of no network connectivity is not sufficient
> to disrupt the connection.
>
> See Nevow/nevow/js/Nevow/Athena/__init__.js, lines 558 - 602 for the
> code in question.
>
> Jean-Paul
--------------090903080209020801000508
Content-Type: text/plain;
name="testutil.py.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="testutil.py.patch"
N2M3LDgNCjwgICAgIGZyb20gcG9wZW4yIGltcG9ydCBQb3BlbjMNCi0tLQ0KPiAgICAgaW1w
b3J0IHN1YnByb2Nlc3MNCj4gICAgIGZyb20gc3VicHJvY2VzcyBpbXBvcnQgUG9wZW4NCjlj
MTAsMTYNCjwgICAgIFBvcGVuMyA9IE5vbmUNCi0tLQ0KPiAgICAgUG9wZW4gPSBOb25lDQo+
IA0KPiBpZiBnZXRhdHRyKG9zLCAiV0VYSVRTVEFUVVMiLCBOb25lKSBpcyBOb25lIGFuZCBz
eXMucGxhdGZvcm0gPT0gJ3dpbjMyJzoNCj4gICBvcy5XRVhJVFNUQVRVUyA9IGxhbWJkYSB3
OiB3DQo+ICAgb3MuV0lGRVhJVEVEICAgPSBsYW1iZGEgdzogVHJ1ZQ0KPiAgIG9zLldJRlNJ
R05BTEVEID0gbGFtYmRhIHc6IEZhbHNlDQo+ICAgb3MuV1RFUk1TSUcgICAgPSBsYW1iZGEg
dzogMA0KNDEwLDQxMWM0MTcsNDE4DQo8ICAgICAgICAgaWYgUG9wZW4zIGlzIE5vbmU6DQo8
ICAgICAgICAgICAgIHJhaXNlIE5vdFN1cHBvcnRlZCgiQ291bGQgbm90IGltcG9ydCAncG9w
ZW4yLlBvcGVuMyciKQ0KLS0tDQo+ICAgICAgICAgaWYgUG9wZW4gaXMgTm9uZToNCj4gICAg
ICAgICAgICAgcmFpc2UgTm90U3VwcG9ydGVkKCJDb3VsZCBub3QgaW1wb3J0ICdzdWJwcm9j
ZXNzLlBvcGVuJyIpDQo0NjhjNDc1LDQ3Ng0KPCAgICAgICAgIG9sZEhhbmRsZXIgPSBzaWdu
YWwuc2lnbmFsKHNpZ25hbC5TSUdDSExELCBzaWduYWwuU0lHX0RGTCkNCi0tLQ0KPiAgICAg
ICAgIGlmIHN5cy5wbGF0Zm9ybSAhPSAnd2luMzInOg0KPiAgICAgICAgICAgb2xkSGFuZGxl
ciA9IHNpZ25hbC5zaWduYWwoc2lnbmFsLlNJR0NITEQsIHNpZ25hbC5TSUdfREZMKQ0KNDcx
YTQ4MA0KPiAgICAgICAgICAgaWYgc3lzLnBsYXRmb3JtICE9ICd3aW4zMic6DQo1MDBjNTA5
LDUxMA0KPCAgICAgICAgICAgICBjaGlsZCA9IFBvcGVuMyhbanMsIHNjcmlwdF0pDQotLS0N
Cj4gICAgICAgICAgICAgY2hpbGQgPSBQb3BlbihbanMsIHNjcmlwdF0sIHNoZWxsPVRydWUs
IHN0ZG91dD1zdWJwcm9jZXNzLlBJUEUsIHN0ZGVycj1zdWJwcm9jZXNzLlBJUEUpDQo+ICAg
ICAgICAgICAgICNjaGlsZCA9IHBvcGVuMyhqcywgc2NyaXB0KQ0KNTAyYzUxMiw1MTMNCjwg
ICAgICAgICAgICAgICAgIGJ5dGVzID0gY2hpbGQuZnJvbWNoaWxkLnJlYWQoNDA5NikNCi0t
LQ0KPiAgICAgICAgICAgICAgICAgYnl0ZXMgPSBjaGlsZC5zdGRvdXQucmVhZCg0MDk2KQ0K
PiAgICAgICAgICAgICAgICAgI2J5dGVzID0gY2hpbGQuZnJvbWNoaWxkLnJlYWQoNDA5NikN
Cg==
--------------090903080209020801000508
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline