From: Dean M. B. <mik...@gm...> - 2007-12-12 12:34:32
|
Hi Mike! Sorry this took a while, been swamped with work lately. On Dec 12, 2007 2:02 AM, Michael Dickey <mi...@mi...> wrote: > On Dec 11, 2007, at 12:26 AM, Dean Michael Berris wrote: > > > Hi Mike! > > > > On Dec 11, 2007 10:40 AM, Michael Dickey <mi...@mi...> wrote: > >> Dean and I have been talking on the boost development list about ways > >> to integrate Pion code into the current cpp-netlib structure. Seemed > >> like a good idea to move that discussion over to this list instead. > > > > I agree, though I'd also like to have other people in the Boost > > mailing list involved somehow. I like the input that we get there, and > > I'm thankful that the discussion has brought out interesting insights > > from people in the list. :) > > I'm new to the Boost list, so I just wasn't sure about overwhelming it > messages on this topic -- in particular as we get more into > implementation details. I can re-post my message there though if you > think others would be interested in chiming in. > Now that I think about it, it would really make sense once we get the HTTP parsing and somehow implement it and make it work with the basic_message<> type. This should open up the discussion to more possibilities. It's really just a lot of work, and I currently do not have the time to get to it yet. > ... > >> In any case, if we could figure out how to merge this functionality > >> over I'd be happy to switch over to using cpp-netlib in Pion instead > >> of our own message-like classes. > >> > > > > Sweet! That sounds like good motivation for me to actually write more > > documentation, try porting your better parser, and see how else we can > > improve on decoupling the logging/networking/etc. from the actual > > parsing. > > Great, feel free to use as much or little of it as you like! =) > > And of course, let me know if you have any questions.. > Thanks! Will do. :) > > Just a question: why shouldn't we be using Boost.Spirit for this > > sort of thing? > > The main reason I didn't use it is that I'm not familiar with > Boost.Spirit, and the parsing code was original based on Chris' > http_server examples in ASIO (which do not use Spirit). > > I got the impression from reading through the Spirit pages that it > does incur a performance penalty, and I wanted to make everything in > Pion as fast as possible. Also, I wasn't clear if Spirit could handle > the incremental processing needs. Namely, the parser needs to be able > to consume as few as 1 byte at a time to make it asynchronous, low- > memory and HTTP/1.1 compatible. > Now that you mention it, I think using Spirit in this context (incremental parsing, DFA style) might not make much sense. I'll try reading up on Boost.Statechart which might be a better fit (maybe better than a hand-rolled switch() which becomes unwieldy most times) or perhaps Expressive for some pattern matching/parsing. Though from the looks of it, we have a lot of stuff we can work with already. Now it's just a matter of getting to it. ;-) Again, thanks Mike and have a great day! -- Dean Michael C. Berris Software Engineer, Friendster, Inc. [http://cplusplus-soup.blogspot.com/] [mik...@gm...] [+63 928 7291459] [+1 408 4049523] |