Re: [Twisted-Python] Endpoint composition syntax

2016-10-13 Thread Glyph Lefkowitz
> On Oct 13, 2016, at 12:47 PM, Tom Prince wrote: > > > This applies more generally; no need for any weird hacks. Any 'new' plugin > > could just opt in to a different syntax; we can just look up until the > > first ':'; we just need to define a new interface for a new syntax. > > I don't th

Re: [Twisted-Python] Endpoint composition syntax

2016-10-13 Thread Tom Prince
> This applies more generally; no need for any weird hacks. Any 'new' plugin could just opt in to a different syntax; we can just look up until the first ':'; we just need to define a new interface for a new syntax. I don't think that this provides a good user experience. 1) There are existing e

Re: [Twisted-Python] Endpoint composition syntax

2016-10-13 Thread Kevin Conway
> we can just look up until the first ':'; we just need to define a new interface for a new syntax. What do you think of adding a special argument for endpoint strings called "wraps" or "pipe" that tells the parser to recombine the right-hand side and send it back through the parser? For example:

Re: [Twisted-Python] Endpoint composition syntax

2016-10-13 Thread Glyph Lefkowitz
> On Oct 12, 2016, at 7:35 PM, Tom Prince wrote: > > Thinking about it some more, there isn't currently any endpoint descriptions > that have an empty name, so we could have a entirely new syntax that starts > with `:`. If we went in that direction, we'd definitely want to think about > futur

Re: [Twisted-Python] Endpoint composition syntax

2016-10-12 Thread Tom Prince
> Do you have a suggestion or an example of how this might be used? The idea I have in my head isn't backwards compatible, but I was thinking of something like haproxy:(tls:hostname.example:endpoint=(tcp:7.6.5.4:443)) This would break any endpoint description that starts with `(` but allows arb

Re: [Twisted-Python] Endpoint composition syntax

2016-10-12 Thread Glyph Lefkowitz
> On Oct 12, 2016, at 2:11 PM, Tom Prince wrote: > > I think if we are reconsidering the endpoint syntax, we should explicitly > have nested delimiters for quoting (so something like () or {}), to easily > allow multiple levels of nested endpoint strings (or any other kind of > string). Do y

Re: [Twisted-Python] Endpoint composition syntax

2016-10-12 Thread Tom Prince
I think if we are reconsidering the endpoint syntax, we should explicitly have nested delimiters for quoting (so something like () or {}), to easily allow multiple levels of nested endpoint strings (or any other kind of string). ___ Twisted-Python mailing

Re: [Twisted-Python] Endpoint composition syntax

2016-09-07 Thread Kevin Conway
> However, it’s worth highlighting that endpoints are inches away from being a really powerful composable tool for saying “tunnel this protocol over this other protocol”. I'm not sure if this is the same concern as the OP. What you've described is mixing the ideas of composing protocols and compos

Re: [Twisted-Python] Endpoint composition syntax

2016-09-07 Thread Cory Benfield
> On 7 Sep 2016, at 00:05, Glyph Lefkowitz wrote: > > >> On Sep 6, 2016, at 11:55 AM, Tristan Seligmann > > wrote: >> >> Currently there is no way to explicitly compose Twisted endpoints, but >> several endpoint implementations have arisen that explicitly wrap

Re: [Twisted-Python] Endpoint composition syntax

2016-09-06 Thread Kevin Conway
I'm not opposed to a fresh syntax, but I do believe the current implementation can be used for composition. The parser for endpoint strings is simplistic, like Glyph points out, but there is nothing preventing it from having nested endpoint definitions. We used the existing syntax when writing the

Re: [Twisted-Python] Endpoint composition syntax

2016-09-06 Thread Glyph Lefkowitz
> On Sep 6, 2016, at 11:55 AM, Tristan Seligmann > wrote: > > Currently there is no way to explicitly compose Twisted endpoints, but > several endpoint implementations have arisen that explicitly wrap another > endpoint, and so have needed a way to do this. So far, this has been > implementi

Re: [Twisted-Python] Endpoint composition syntax

2016-09-06 Thread meejah
Tristan Seligmann writes: > Currently there is no way to explicitly compose Twisted endpoints, but > several endpoint implementations have arisen that explicitly wrap > another endpoint, and so have needed a way to do this. A couple other examples: Autobahn provides 'Web Application Messaging P

[Twisted-Python] Endpoint composition syntax

2016-09-06 Thread Tristan Seligmann
I'm kicking off this discussion on the mailing list as I don't have anything well-formed enough to take to the bug tracker, and I am hoping to get some more engagement on the matter. Currently there is no way to explicitly compose Twisted endpoints, but several endpoint implementations have arisen