|
Page Created :
qpid :
CppHandlerChains
CppHandlerChains has been created by Alan Conway (Sep 20, 2007). Content:The C++ broker uses handler chains to break complex processing into individual pieces.
= Current status (2002/9/20) = Each chain starts with a SessionHandler. It handles L2 (session open, close etc.) and passes other frames to the next handler. L3/L4 frames are handled by the SemanticHandler. For clustering, a ClusterHandler is inserted at the start of the chain. It replicates frames to a backup broker so the backup can handle failover. It then passes frames on to the normal session handlers. = Approach for multi-frame segments =
class FrameSet Unknown macro: { // sketch
void add(const Frame& frame); // True if
const AMQMethodBody* getMethod(); // 0 means not complete.
const AMQHeaderBody* getHeader();
const AMQContentBody* getContent();
} ;
Note: All the visitor/dispatch classes using AMQFrame need to be reworked. Dispatch will always be based on an AMQMethodBody, not a frame. Rationale: ''Frame rather than Segment/FrameSet handlers'': Allows most flexibility to compose or not compose frames into segments & FrameSets. For example a cluster handler needs to replicate frame-by-frame, so we don't want to compose the full segment up front. Since the FrameSet class provides the composition logic, this is specified only once and easy to use in frame handlers. ''No Segment class'': A segment by itself is not very useful. A non-content method is just a FrameSet containing a single method segment. For content bearing methods are a frameset with headers & content. There's little value for a stand alone segment class. |
Unsubscribe or edit your notifications preferences
