IRCd:Modularized protocol handlers
(New page: This proposal goes hand-in-hand with the tuple-queue proposal. The proposal is simply to turn the existing command processing into separate parsing and processing step...)
Current revision as of 19:52, 17 February 2009
This proposal goes hand-in-hand with the tuple-queue proposal. The proposal is simply to turn the existing command processing into separate parsing and processing steps. An incoming protocol message is parsed into a tuple, enabling separation of the parsing code from the processing code by creating a uniform interface that all protocol parsers can utilize. Moreover, the protocol handler would also be able to turn a tuple into an understandable protocol message.
This proposal generalizes the code currently existing in parse.c and msg.h, but it goes further. Almost all commands currently implemented in ircd-darenet have to parse their parameters directly from the protocol message, which makes it more difficult to change the protocol except in incremental ways. In this proposal, all that parsing is done by the parser (probably under the control of some form of parser generator language, akin in concept to the grammar input files used by yacc), and commands merely need retrieve the arguments from the tuple...and of course act correctly if necessary arguments are missing.
