Re: [Twisted-Python] revert / rework of "AMPv2" change?
> On Oct 21, 2020, at 10:34 AM, Jonathan Bastien-Filiatrault > wrote: > > On 2020-10-20 04 h 57, adi at roiban.ro (Adi Roiban) wrote: >> Just my 2 cents >> I think that whether this should be reverted or reworked should be between >> the person raising this issue (Glyph) and the author of the PR (Jonathan). > Glyph has asked me to submit the type annotation work on AMP, I will do > this. I also plan on resubmitting a reworked patch that addresses the > issues that glyph raised. >> >> I see that Jonathan has responded to the feedback inside the merged PR.I >> hope it can be reworked. >> >> Since AMP v2 is not standardized maybe is ok to have it as a separate >> experimental top level name. >> >> I have never used AMP ...I tried to use it via ampoule but ended up using >> the stdlib process pool as I was not able see any performance difference. >> >> Since `amp` is used by `trial -j` we need to keep it inside twisted. >> >> But since AMP v2 is experimental, I think that is best to have it as a >> separate txamp2 project. >> In this way, the twisted AMP v2 project can follow its own rules. >> Once AMP v2 is "mature" it can be moved to core twisted >> >> So my take is to revert it and move it to twisted/txamp2. > > I have no issue with changing the name or if this patch lives as a > project besides twisted. I might even rework it into something more > forward-compatible as suggested by glyph. I think netstrings are a > decent option as it would make long value handling easier since values > would always be contiguous without "continuation markers" interspersed. > The main thing I dislike about netstrings are the variable-length ASCII > numbers, but that is not a big complexity. I originally didn't like this either, but since I designed AMP I've come around: The thing about variable-length ASCII numbers is that they give you a lot of leeway to error out in case the protocol is not being respected. With packed binary values, any 2-byte sequence is a valid length, so if something opens a socket and says "EHLO", it starts waiting for 17734 more bytes which it will never receive. By contrast, netstrings have built-in redudancy; for a very low overhead (most length prefixes end up being 2-3 bytes rather than 2) you get the ability to immediately error out with a clear exception as soon as you see "E". Anyone implementing this in a static context where they don't want heap allocations for the length prefix itself should not allocate arbitrary data, but rather, allocate a very small fixed buffer (6 bytes will get you considerably beyond the built-in limitations of AMP already) and again, immediately error out if that is exceeded. Similarly the trailing comma provides an in-band sanity check where buggy applications will promptly crash rather than bleeding into the next message. > Could the next AMP version > use values framed using 32 bit or 64 bit integers ? I'd really rather go with netstrings for all the reasons listed above. > Transmitting long-ish values is a real use case and whatever extension > we do must retain the dead-simple, easy to implement nature of the > current AMP protocol. I now realise that I somewhat hijacked the > "streaming values" bug (2529). IMHO, streaming should be handled at the > application level, but I digress. Yeah, that bug is more about making it easy to do the application-level stuff than implementing something implicit within the protocol. >> >> >> BTW this is also my suggestion for the PR trying to introduce support for >> SMB have twisted SMB implementation in a separate project. >> > All the best, > > Jonathan Same to you. Thanks for your contributions, and sorry for the slow pace of communication here; 2020 is a heck of a year. -g___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Weekly Bug Summary
Bug summary __ Summary for 2020-11-22 through 2020-11-29 Opened Closed Total Change Enhancements: 2 1 1465 +1 Defects: 3 3993 +0 Tasks: 1 0 95 +1 Regressions: 0 0 1 +0 Total: 6 4 2558 +2 |== Type Changes |== Priority Changes |== Component Changes |Defect: +0 |Normal: +2 |Conch: +1 |Enhancement: +1 |Core: +1 |Task: +1 |Mail: -1 |Pydoctor: +1 Total Tickets Open Tickets New / Reopened Bugs __ = Normal = [#10056] twisted.conch.ssh.keys.Key.fromString should be able to parse PEM-format keys with "comments" (opened by exarkun) enhancement conch http://twistedmatrix.com/trac/ticket/10056 [#10057] Remove use of API function pages (opened by mthuurne) taskpydoctor http://twistedmatrix.com/trac/ticket/10057 [#10058] Add TLS 1.3 cipher string support to twisted.internet.ssl.AcceptableCiphers.fromOpenSSLCipher (eg "TLS_AES_128_CCM_SHA256") (opened by schlenk) enhancement core http://twistedmatrix.com/trac/ticket/10058 [#10059] Fix documentation of non-existing parameters (opened by mthuurne) (CLOSED, fixed) defect core http://twistedmatrix.com/trac/ticket/10059 [#10060] Fix duplicate parameter documentation (opened by mthuurne) (CLOSED, fixed) defect core http://twistedmatrix.com/trac/ticket/10060 [#10061] test_KEX_DH_GEX_GROUP in conch relies on FFDH that are small (opened by alex) (CLOSED, fixed) defect conch http://twistedmatrix.com/trac/ticket/10061 Closed Bugs __ = Normal = [#10055] Make twisted.mail.pop3client a private module (opened by mthuurne, closed by Adi Roiban , fixed) enhancement mail http://twistedmatrix.com/trac/ticket/10055 [#10059] Fix documentation of non-existing parameters (opened by mthuurne, closed by Maarten ter Huurne , fixed) defect core http://twistedmatrix.com/trac/ticket/10059 [#10060] Fix duplicate parameter documentation (opened by mthuurne, closed by Maarten ter Huurne , fixed) defect core http://twistedmatrix.com/trac/ticket/10060 [#10061] test_KEX_DH_GEX_GROUP in conch relies on FFDH that are small (opened by alex, closed by moshez, fixed) defect conch http://twistedmatrix.com/trac/ticket/10061 Ticket Lifetime Stats __ Oldest open ticket - [#50] conch command-line client doesn't work in win32 (since 2003-07-12 14:41:06). Newest open ticket - [#10058] Add TLS 1.3 cipher string support to twisted.internet.ssl.AcceptableCiphers.fromOpenSSLCipher (eg "TLS_AES_128_CCM_SHA256") (since 2020-11-26 04:07:46.897635). Mean open ticket age: 2958 days, 21:17:25.991087. Median: 2950 days, 14:53:26.244382. Standard deviation: 1481 days, 0:26:23.352256. Interquartile range: 2176 days, 20:38:34.814113. Mean time between ticket creation and ticket resolution: 615 days, 7:27:57.464950. Median: 58 days, 13:21:23. Standard deviation is 1018 days, 11:44:17.084129. The interquartile range is 812 days, 11:29:54. Mean time spent in review: 101 days, 3:17:37.270782. Median: 4 days, 16:36:34. Standard deviation: 488 days, 5:07:13.649009. Interquartile range: 23 days, 9:50:34. Mean number of times a ticket is reviewed: 1.78859964093. Median: 1 Standard deviation: 1.41015018091. Interquartile range: 1. Contributor Stats __ In the last 4 weeks, 6 unique ticket reporters 3 unique ticket reviewers 5 unique ticket resolvers In the last 24 weeks, 35 unique ticket reporters 10 unique ticket reviewers 18 unique ticket resolvers In the last 48 weeks, 57 unique ticket reporters 12 unique ticket reviewers 26 unique ticket resolvers ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python