|
Page Edited :
qpid :
Network IO Interface
Network IO Interface has been edited by Aidan Skinner (Jun 29, 2009). Content:Objective and Scope.OverviewThe broker is prone to heap exhaustion, leading to OutOfMemory errors. The servers main memory usage is storing messages on queues, Producer flow control is needed to manage that area. The other major source of memory consumption are the network buffers used to hold unprocessed AMQP frames once they have been read from the socket. These are currently able to grow uninhibited, and there is no means available to control them. Further, the transport layer is poorly implemented and difficult to work in. Improving encapsulation is an explicit goal of this work. Problem StatementFor the broker to effectively manage its memory usage, it needs to be able to at least place an upper bound on the size of it's network buffers. When the broker is unable to process frames as quickly as they are being sent these buffers begin to fill up and the broker has no way to limit those. It also has no way to know how large those buffers are. Current Architecture
Exclusions: / Assumptions
High-Level Technical ArchitectureFunctional Requirements
Non Functional Requirements
Architecture DesignCommon should have an interface which all transport plugins can implement and which the server and client can use. The interface would include a means to set the standard socket options and to limit it's incoming memory usage. The interface would return Overview of DesignThis interface should be quite simple. Methods to send, receive, flush, close, open and a method to set TCP options is likely to be sufficient. These would operate on a QpidByteBuffer, essentially MinaByteBuffer to avoid having to fix our use of expanding buffers at the same time. When processing the incoming data, one frame at a time will be processed and that frames processing will be completed before the next one is read. There will be no other data structures used to hold unprocessed frames. Breakdown of component parts.Common holds a transport layer interface which the existing MINA transport is ported too. We will also port the 0-10 client o.a.q.transport.network.io package to that interface. The server and client both use common for their network layer, and will need to be updated to use the new interface. They will need to pass through the configured socket options. The server will need to be substantively modified to push the MINA specific parts into the appropriate plugin. TestingTesting under load and handling error conditions (unexpected disconnection etc) will need to be carried out. New unit tests will need to be written to cover the transport plugins and the new interfaces. Existing test coverage in this area is minimal. ImpactThere is a potential effect upon performance, we will need to measure this once it has been implemented to quantify what effect, if any, it has had. Compatibility / Migration Implications
Risks
|
Unsubscribe or edit your notifications preferences
