On Thu, Mar 06, 2008 at 10:55:00AM -0500, Christopher Armstrong wrote: > > This is really overcomplicating things. Calling a method repeatedly > with some data is a very simple and very effective and very > conventional way (not a "new system!") of streaming some data to an > object. This is how our protocol system works: IProtocol.dataReceived > gets called every time some data comes in over the network. > LineReceiver.lineReceived gets called every time a line is received. > In this case, IStreamingRequestHandler.streamingDataReceived could be > called. I think you should take exarkun's advice. Adding deferreds > will just make it pointlessly complicated and slower than it needs to > be.
I appreciate your point, and I can probably be convinced that this way is better. However, it's not obvious that calling back multiple times is pointlessly complicated. I could easily argue that having dozens of interfaces like IProtocol and LineReceiver and IStreamingRequestHandler and IHaveToKeepTrackOfTooManyInterfaces is also pointlessly complicated. Just in my limited experience with Twisted, figuring out how it deals with deferreds and callbacks was easy. Figuring out how all of the classes and interfaces interact was/is much more difficult. The problem is that every time you learn about a new class or interface, you have to learn all of the nuances of that class. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
pgpAhp9LGYOsJ.pgp
Description: PGP signature
_______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
