[08:59] *** wyleu has joined #kamaelia
[09:35] *** Uraeus has joined #kamaelia
[13:31] *** SamHasler has joined #kamaelia
[15:32] *** MS- has joined #kamaelia
[15:32] < MS-> Greetings
[15:33] *** MS- wonder how long this connection will stay OK
[15:35] < MS-> (on train - which I've not tried before. Will probably cut out)
[15:40] < Patrick`> it's fine, it won't lag out
[15:40] < Patrick`> it'll just get arbitrarily slow every so often
[15:42] < MS-> Well, I was trying MSN messenger yesterday using it and that just collapses. We'll see :)
[15:44] < MS-> Should get home in around 2 1/2 hours I guess.
[16:14] < mhrd> heh, safe journey.
[16:20] *** ms-- has joined #kamaelia
[16:42] *** MS- has joined #kamaelia
[17:23] *** vmlemon_ has joined #kamaelia
[17:25] < vmlemon_> Hi
[19:04] *** mhrd-home has joined #kamaelia
[19:23] *** MS- has joined #kamaelia
[19:23] < MS-> evening
[19:23] < MS-> back home.
[19:23] < MS-> Always forget just how long that particular journey takes (in practice) :)
[19:30] < mhrd-home> any delays?
[19:31] < MS-> a small one, which meant an intersection between 2 trains was missed (at stockport) so I carried on and changed at manc piccadilly instead
[19:31] < MS-> However I had good luck at Euston, so that's all good :)
[19:33] < MS-> Was nice to see everyone again today though
[19:33] < MS-> :)
[19:35] < mhrd-home> ooh, can restrict a google search to just kamaelia irc logs by putting this into the search box: site:www.kamaelia.org/logs
[19:35] *** mhrd-home ponders adding a 'search logs' form to the website somewhere
[19:36] < MS-> that would be useful
[19:37] < MS-> Ah, I found why you thought today's thing started at 10 btw - looking at my calendar that's when it was originally slated for
[19:37] < mhrd-home> cool, so I wasn't just being a bit dumb
[19:37] < MS-> Nope - just efficient :)
[19:37] *** MS- will be in London again on the 26th by the looks of things
[19:38] < mhrd-home> oooh, pretty
[19:38] < mhrd-home> and interesting
[19:40] < MS-> indeed.
[20:20] < mhrd-home> magic: http://www.kamaelia.org/irc.html
[20:29] *** SamHasler has joined #kamaelia
[20:32] *** VanL has joined #kamaelia
[20:34] < VanL> I am looking at implementing an IMAP4 proxy using kamaelia. I need to handle state and multiple concurrent access. Is a Carousel the right way to be handling this?
[20:35] < mhrd-home> hi VanL
[20:35] < VanL> If I read the docs correctly, a carousel instantiates a new instance for each connection, and the "main" loop can go back listening.
[20:35] < VanL> Hello mhrd-home
[20:35] < VanL> Is that right? So I can cache state on the instance?
[20:35] < mhrd-home> not quite - a carousel is like a slide projector that, when asked to, swaps out the current component for a new one
[20:36] < mhrd-home> you want to make a server that spawns a component to handle each client that connects?
[20:36] < VanL> Yes
[20:37] < mhrd-home> Try this one: http://www.kamaelia.org/Components/pydoc/Kamaelia.Chassis.ConnectedServer.html
[20:37] < mhrd-home> its a simple http socket server ... when a client connects, it spawns a component to handle communication with that client
[20:38] < mhrd-home> I believe that documentation describes that component as a "protocol handler"
[20:39] *** VanL is looking
[20:42] < VanL> Ok, so this (or maybe ServerCore) will route messages to the instatiated protocol handler? ...That appears to be how the greylisting server handles it. Is that right?
[20:42] < mhrd-home> I believe it probably does, yes.
[20:42] < mhrd-home> MS- wrote the greylisting server, so might be able to provide some insight (he might be afk atm)
[20:43] < mhrd-home> ServerCore and SimpleServer are both components within that file - you can use either:
[20:43] < mhrd-home> from Kamaelia.Chassis.ConnectedServer import ServerCore
[20:43] < mhrd-home> from Kamaelia.Chassis.ConnectedServer import SimpleServer
[20:43] < mhrd-home> s/file/module/
[20:44] < VanL> I also see https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/trunk/Sketches/MH/pop3proxy/pop3proxy.py
[20:44] < VanL> which is also similar in spirit. Which one is better style?
[20:44] < mhrd-home> yep. my dubious handiwork :-)
[20:44] < VanL> oh! Thanks for posting it :)
[20:44] < mhrd-home> I've honestly no idea - I've not looked at the greylisting server at all
[20:45] < mhrd-home> MS- has more experience and sometimes makes better long term design decisions.
[20:45] < mhrd-home> both approaches are valid - so do whatever makes most sense to you
[20:47] < VanL> one question which you might know - it looks like I need to make sure I have a complete message - I only receive line-by-line. Is that right?
[20:47] Reply: Hi, I'm a bot. I've been put here to answer faq's and log the channel.
[20:47] Reply: I've not really been configured yet, so I won't do much here yet :-)
[20:47] < mhrd-home> I suspect MS-'s code is much more modular, which is a good thing
[20:48] *** mhrd-home slaps kamlogbot
[20:48] < mhrd-home> your protocol handler component will receive data in whatever sized chunks it arrives in - that might be whole lines, or even whole messages, or neither
[20:49] < mhrd-home> thats why,in pop3proxy, I wrote a "LineSplit" component that buffers incoming bytes and chunks/splits then into individual lines
[20:50] < mhrd-home> hmm, that component probably ought to be a candidate for the main Kamaelia library
[20:51] < mhrd-home> in the mean time, feel free to copy it if you require it. or do whatever MS- did in his greylisting server :-)
[20:51] *** mhrd-home looks to find out
[20:51] < VanL> Thanks, reading both
[20:57] < mhrd-home> VanL: noticed the URL you posted was for our old repository on sourceforge ... we've moved to http://code.google.com/p/kamaelia now
[20:57] < MS-> I'm largely afk, but reading back, it's probably worth looking at these page as well:
[20:57] < MS-> http://yeoldeclue.com/cgi-bin/blog/blog.cgi?rm=viewpost&nodeid=1226574014 (basic chat server)
[20:57] < MS-> http://yeoldeclue.com/cgi-bin/blog/blog.cgi?rm=viewpost&nodeid=1223342651 (walk through of building a protocol)
[20:57] < MS-> http://www.kamaelia.org/KamaeliaGrey
[20:57] < MS-> The last two have presentations on them as well
[20:58] < MS-> The main reason for that is because it's easier to have diagrams in presentations in a nice way.
[20:59] < MS-> There's also an example of how to go about building a protocol in the layered approach that the Greylisting code uses on this page: http://www.kamaelia.org/GetKamaelia
[21:01] < MS-> oh, perhaps worth mentioning, the approach taken in the greylisting server has worked very nicely now for over a year. I've used it to handle all mail for some time now
[21:03] < VanL> MS-: Thanks
[21:03] < VanL> and mhrd-home: Thanks
[21:04] < VanL> FWIW, my ultimate goal is to have multiple-account IMAP proxy
[21:04] < VanL> so that mail/[Account1] is actually the inbox for Account 1
[21:05] < mhrd-home> np
[21:05] < VanL> and mail/[Account2] for Account2, etc
[21:05] < VanL> proxy commands to the backends as necessary, or between backends for copies
[21:06] < VanL> kamaelia looked like the right set of abstractions for that sort of thing
[21:06] < VanL> but first is getting the basic proxy.
[21:07] < mhrd-home> sounds sensible
[21:07] *** MS- nods
[21:07] < MS-> The nice thing is that you can take the basic proxy and then extend it as it does more
[21:08] < MS-> To allow it to do more
[21:08] < MS-> which is essentially what the greylister does - it implements the basic SMTP loop/mechanics, then layers on more aspects of SMTP and proxying and then has an acceptance policy
[21:08] < MS-> etc
[21:09] < VanL> right. I figured that I could wire up a couple different proxies into a component
[21:09] < VanL> with a backplane between then
[21:09] < MS-> Was a few days work, but was really useful :)
[21:09] < MS-> yep
[21:09] < VanL> s/then/them/
[21:09] < mhrd-home> regarding Carousel, Pipeline, Backplanes, etc. take a look at the cookbook if you've not already: http://www.kamaelia.org/Cookbook
[21:19] *** MS- gets an early night
[21:19] < MS-> night all :)
[21:19] *** MS- is now known as ms-afk
[21:19] < mhrd-home> night :)
[21:20] < VanL> Good night :)
[21:28] < VanL> Logging off. Thanks, all.
[21:28] *** VanL has parted #kamaelia
[21:32] *** Uraeus has joined #kamaelia
[21:58] < mhrd-home> night all
[21:58] *** mhrd-home has parted #kamaelia
[23:26] *** jae__ has joined #kamaelia
[23:50] *** jae__ is now known as eikenberry