Classes | |
| class | FrameHandler |
| Common interface for frame handlers. More... | |
| class | Session |
| Represents a Session. Much omitted. More... | |
| class | ClusterSession |
| Cluster session with extra chains. More... | |
| class | Frame |
| New Frame methods. More... | |
Qpid already has input and output handlers. This proposal would
Side/future benefits:
A Frame holds a pointer to the Session it is associated with.
For 0-9 the handlers are:
If an AMQP method handler wants to send frames back to the client it uses the Session::outgoing() chain. For 0-9 that would be:
CPG guarantees ordrer of delivery with "self-delivery". A node that sends a message cannot take actions associated with that message until it is self-delivered via the CPG API.
The sequence of events is:
ClusterSession::incoming has a short chain:
When a frame is (self-) delivered by CPG it is handed to the ClusterSession::clusterIncoming() chain which is just like a 0-9 incoming chain.
ClusterSession::outgoing depends on whether the session is local (current node is primary) or not. For a local session it is just like 0-9. For a remote session:
Some important details omitted: esp correspondence between connections, Channels, Sessions and channel-ids/session-ids. Multicast frames will be accompanied by a cluster-wide unique session identifier so nodes identify the correct Session object.
Note that although this is not our final goal for clustering, the final goal can be reached by implementing additional handlers (e.g. PointToPointBackupHandler) and adding logic to choose the right handlers based on configuration of primary, backup etc.
We will retain multicast backup for wiring, so the above will still apply to queue.declare et. al.
We will probably need a Cluster class for inter-node communication at some point.
This actually makes all the other arguments redundant. Getting rid of them would open some interesting template possibilities that would help multi-version but it's not critical for clustering.
1.5.1