> On Jun 30, 2020, at 12:26 PM, meejah <mee...@meejah.ca> wrote:
> 
> I recently wrote a relatively simple protocol to try this "sans-io" style
> and was happy to start with the state-machine (using Automat). This
> forced some good decisions. Then I worked outwards to the "more boring"
> bits (framing and serialization/parsing).
> 
> (Hmm, this should almost just be a blog-post maybe ;)

One thing I should mention is that while there aren't necessarily great 
examples of stacking protocols like this at the parsing layer, some parts of 
Twisted do work by delegation and composition.  For example, in twisted web, 
Resource objects are thoroughly disconnected from the protocol layer, rather 
than, say, the various 'irc_' methods exposed in the IRC server.

So another way to look at this is to extend things like the Resource pattern 
down into the parser, rather than trying to think of a way to take apart the 
Protocol object in a wholly novel way.

-g

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to