On Thu, Mar 06, 2008 at 12:22:04PM -0500, Christopher Armstrong wrote: > > Ok, so the new interface is request.getStreamingData(). So the > explanation of the new feature is either: > > "Implement dataReceived and call getStreamingData on the request and > add self.dataReceived as a callback" > > or > > "declare implements(IStreamingRequestHandler) and implement dataReceived".
Now we understand each other. > Is the former really simpler? Does it really offer any benefit? I am opposed to creating a brand new IStreamingRequestHandler. That's just more conceptual overhead. However, if it were to use something that already exists, like IProtocol as Glyph suggested, I would be more accepting. In that case the difference is that the former has an event-driven feel and the latter doesn't. Which is better? It depends on what you're doing. If you have multiple places that need notification that data have arrived (as is the case in my situation), there are some definite advantages to the event-driven approach. However, the latter is probably a little faster. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
signature.asc
Description: Digital signature
_______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
