[Twisted-Python] Producers / Consumers and more examples tutorials?
Are there any more concrete examples or tutorials of using Producers and Consumers?
On Thu, 10 Aug 2006 19:13:38 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
Are there any more concrete examples or tutorials of using Producers and Consumers?
What kind of information beyond what is available in the existing producer/consumer documentation are you looking for? Jean-Paul
On 8/12/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
On Thu, 10 Aug 2006 19:13:38 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
Are there any more concrete examples or tutorials of using Producers and Consumers?
What kind of information beyond what is available in the existing producer/consumer documentation are you looking for?
Jean-Paul
pretty much anything, the only concrete example is the FileSender and it leaves a lot to "magic" happening, and it is only a producer. the documentation is sort of written by someone who knows what to do for someone who knows what to do. -- If you don't know what you want, you probably need a nap.
On Mon, 14 Aug 2006 13:14:31 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
On 8/12/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
On Thu, 10 Aug 2006 19:13:38 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
Are there any more concrete examples or tutorials of using Producers and Consumers?
What kind of information beyond what is available in the existing producer/consumer documentation are you looking for?
Jean-Paul
pretty much anything, the only concrete example is the FileSender and it leaves a lot to "magic" happening, and it is only a producer.
the documentation is sort of written by someone who knows what to do for someone who knows what to do.
Just name a specific example you'd like to see and I'll try to write something up. I don't want to pick something, write it up, and then discover that it doesn't cover what you wanted to learn. :) Jean-Paul
On 8/14/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
On Mon, 14 Aug 2006 13:14:31 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
On 8/12/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
On Thu, 10 Aug 2006 19:13:38 -0400, jarrod roberson <jarrod@vertigrated.com> wrote:
Are there any more concrete examples or tutorials of using Producers and Consumers?
What kind of information beyond what is available in the existing producer/consumer documentation are you looking for?
Jean-Paul
pretty much anything, the only concrete example is the FileSender and it leaves a lot to "magic" happening, and it is only a producer.
the documentation is sort of written by someone who knows what to do for someone who knows what to do.
Just name a specific example you'd like to see and I'll try to write something up. I don't want to pick something, write it up, and then discover that it doesn't cover what you wanted to learn. :)
Jean-Paul
Ok, I will write up something and post it back to the list. -- If you don't know what you want, you probably need a nap.
Jean-Paul Calderone <exarkun <at> divmod.com> writes:
Just name a specific example you'd like to see and I'll try to write something up. I don't want to pick something, write it up, and then discover that it doesn't cover what you wanted to learn. :)
Jean-Paul
Jean-Paul, I never saw anyone ask for a specific example, and now I actually have one: I am building a simple chat-like server, but instead of clients producing the data sent over the channel, I am tailing a log file, turning it into an xml node, and spitting it out to all connected clients. At least, that's what I'm trying to do. My guess is that I would have the Consumer sub-class that I'd make use the write() method to call the server's broadcast method. Not a complaint, but there's very little documentation on how things glue together, and the fileserver example doesn't help. So, I guess the example I'm looking for is something that: * Has a producer that reads from a file, checking for changes periodically (I think I have this done, I'll paste a link to the code at the end of this post) * Has a consumer that then takes the data from the producer, and then broadcasts it out to all clients on a simple server. I don't need to see how to implement the server, that part I think I've got down. :) Producer source: http://pastie.caboo.se/46607 I know it's not complete, but I think it's a start from what I understand about Producers/Consumers. Thanks, Michael
participants (3)
-
jarrod roberson
-
Jean-Paul Calderone
-
Michael King