Low latency, high throughput data storage system

A method of providing assured message delivery with low latency and high message throughput, in which a message is stored in non-volatile, low latency memory with associated destination list and other meta data. The message is only removed from this low-latency non-volatile storage when an acknowledgement has been received from each destination indicating that the message has been successfully received, or if the message is in such memory for a period exceeding a time threshold or if memory resources are running low, the message and associated destination list and other meta data is migrated to other persistent storage. The data storage engine can also be used for other high throughput applications.

FIELD OF THE INVENTION

This invention relates to generally to reliable data storage in, for example, data communication networks a high throughput is required, and in particular to a method of assured message delivery across a message delivery system with very low delivery latency and high message throughput, or other similar applications requiring non-volatile, high throughput, low latency storage of state information with redundancy.

BACKGROUND OF THE INVENTION

In the prior art, many message delivery systems exist which offer assured message delivery between endpoints, such as between different applications. Assured (sometimes also called guaranteed or persistent) message delivery offers a once and only once message delivery semantics, although other delivery semantics can also be offered as well, such as deliver at most once, deliver at least once, etc.

Such messaging systems provide for loosely coupled message delivery between the message source and the receiving application (for one-to-one delivery) or receiving applications (for one-to-many delivery). A receiving application may be offline when a message is sent, or part of the network may be unavailable at the time, and the messaging system must persist the message and deliver it to the application when it becomes available or when a communications path to it becomes available. As well, the system ensures message delivery to the receiving application even in the presence of message loss between network elements, as may occur due to events such as communications errors, power outages, etc.

Examples of prior art messaging systems are WebSphere MQ from International Business Machines Corporation and a number of implementations of the Java Messaging Service (JMS) which is known in the art.

In prior art assured delivery systems, messages can be sent by a message source to a destination message queue or to a destination topic group. A destination queue is suitable for one-to-one message delivery. Note however that multiple applications can receive messages from a destination queue, e.g. for load balancing or resiliency, but a given message is only received by one application from the queue. With publish-subscribe style message delivery, a message is published to a topic, and can be received by one or more applications that subscribe to messages from that topic. Some messaging systems such as JMS also allow for “message selectors” to allow for filtering of the messages based on matching rules on certain header fields so that an application can, for example, receive a subset of the messages from a topic based on the message selector filtering rules. Content-based routing message delivery systems also allow a message to be delivered to one or more recipients based on their subscriptions to the content of a message, as opposed to a pre-defined topic.

In order to provide assured message delivery in the face of any type of failure, including loss of power, the restart of the messaging system etc., messages must be persisted to non-volatile storage. Typically disk drives are utilized due to the large message volume and the requirement to be able to persist messages for a long period of time, e.g. when the destination for the message is not available. In order to provide for assured delivery, the message must be guaranteed to be in non-volatile storage before the message sender is sent an acknowledgement that the message has been accepted by the messaging system. The act of storing the message adds significant latency to the processing of the message at a message processing node, and even with non-volatile caches, the message latency and throughput is significantly affected by this requirement. Such non-volatile caches are typically implemented as part of the disk sub-system, for example, as part of the disk controller logic. For example, refer to U.S. Pat. No. 5,581,726.

The use of write-back cache logic, where once the data is successfully written to the non-volatile memory cache of the disk sub-system the messaging system is free to continue processing the message without waiting for the message to be written to the physical disk device(s) does reduce the message latency, but the latency is still quite high due to the significant processing necessary through the operating system and file system logic. Moreover, the messaging throughput from a relatively small number of sources is limited still by the disk write latency of the disk drives—again because the next message cannot be accepted from a sender until the previous one has been written to disk. The disk cache serves as a front-end to the disk drives, so each data write will ultimately be placed onto the disk storage media, which has a limited data write rate. The write data rate can be increased by utilizing disks in a RAID configuration, for example, as is known in the art, but the write speed will always be much slower compared to the message processing capability of the messaging system. This limits the overall assured delivery messages rate of the system.

Some messaging systems offer an option to use a lower-level of reliability, where messages are allowed to be queued in the volatile data structures of the operating system's file system (in RAM) and the message is considered to have been saved even though is may not have yet reached a non-volatile disk cache (if one is provided) or the disk itself. This option is provided to increase messages throughput and decrease message latency at the expense of reliability. With such an option, a power failure can result is messages being lost. To increase reliability, external uninterruptible power supplies can further be utilized to power the messaging system so that in the event of a power failure, the file system RAM data structures can be flushed onto the physical storage medium before the messaging system does a controlled shutdown. While this increases reliability, and performance is increased through the use of RAM buffering, the throughput is again limited ultimately by the sustained disk write speed. Moreover, the use of interruptible power supplies normally include battery technology, which need to be maintained and has a limited lifetime.

While assured delivery systems of the past were also used heavily in batch-oriented systems, where messages may be queued for long periods before being consumed by the destination application, many mission-critical systems, such as trading applications in financial services now are required to process extremely high message rates and require very low latency across the messaging system, such as much less than one millisecond. In such applications, a given message is typically only queued in the messaging system for a very short period of time, and once successfully consumed by the destination application or applications, the message no longer has to be retained by the messaging system. However, in such applications there is still a requirement for assured messaging and assurances that messages will not be lost by the messaging system (requiring every message to be written to disk).

As an example of current performance levels of the prior art, refer to “JMS Performance Comparison”, October 2004, Krissoft Solutions, the contents of which are incorporated herein by reference. This study shows that for the persistent messaging benchmark, the fastest vendor surveyed, a scenario of 1 publisher, 1 subscriber and 1 topic yielded a message rate of only 1654 messages per second, and for 10 publishers, 10 subscribers and 10 topics the message rate was only 4913 messages per second. As a comparison, the same study showed that for the non-persistent messaging benchmark, a scenario of 1 publisher, 1 subscriber and 1 topic yielded a message rate of 24457 messages per second (14.7 times faster than the persistent messaging benchmark), and for 10 publishers, 10 subscribers and 10 topics the message rate was 37268 messages per second (7.6 times faster than the persistent messaging benchmark). It can be seen that there is a very large performance penalty for persistent messaging over non-persistent messaging, and at least an order of magnitude increase in the persistent messaging rate is needed, and the message latency also has to be reduced as low as possible.

It is highly desirable to provide a messaging system which can offer assured message delivery which offers the required reliability and can also offer both very low message latency and very high message throughput.

SUMMARY OF THE INVENTION

Thus in a first aspect invention provides a method of providing reliable low latency, high throughput storage of data, comprising normally storing incoming data in a high performance, low latency volatile main memory, wherein data is continually written to and retrieved from said volatile memory; continually replicating said stored data to a mate high performance low latency volatile memory so as to maintain synchronism between said main memory and said mate memory; normally supplying power to said main memory from one of one or more normal power sources; providing an independent back-up power supply with a stored energy reserve for use in the event of failure of said one or more normal power sources; providing a back-up non-volatile memory; monitoring the supply of power to said main memory from said one or more normal power sources; and upon detection of a failure in said one or more normal power sources, switching the supply of power to said main memory from said one or normal power sources to said back-up power supply, and transferring current data in said main memory to said non-volatile memory, and wherein said back-up power supply has a sufficient reserve of stored energy to permit the transfer of the contents of said main memory to said non-volatile memory.

The invention thus permits high throughput data to be stored with low latency, yet permit the high throughput that is required in, for example, an assured message delivery system, such as found in a content-routed network.

In one embodiment, the storage engine comprises a high performance, low latency volatile main memory; a memory controller for continually writing data to and retrieving data from said volatile memory; a power control unit for connection to one of one or more normal power sources for normally supplying power to said volatile main memory; an independent back-up power supply with a stored energy reserve for use in the event of failure of said one or more normal power sources connected to said power control unit; a back-up non-volatile memory; and wherein said power control unit monitors the supply of power to said main memory from said one or more normal power sources and upon detection of a failure in said one or more normal power sources, switches the supply of power to said main memory from said one or normal power sources to said back-up power supply, and initiates transfer of current data in said main memory to said non-volatile memory, and wherein said back-up power supply has a sufficient reserve of stored energy to permit the transfer of the contents of said main memory to said non-volatile memory.

In yet another aspect the invention provides a method of providing low latency, high throughput assured message delivery in a network using an non-volatile data storage engine, comprising identifying a set of destinations for a received message; storing the received message in a low-latency protected main data storage engine along with information about each destination and other meta-data associated with the message; attempting to route the message to each identified destination; awaiting an acknowledgement from each identified destination indicating that the message has been successfully received thereby; and removing the message from said memory when an acknowledgement has been received for each destination.

In a still further aspect the invention provides an assured message delivery engine for use in a network, comprising a protected low-latency main data storage engine; and a processor programmed to identify a set of destinations for a received message; store the received message in a low-latency protected main data storage engine along with information about each destination and other meta-data associated with the message; attempt to route the message to each identified destination; await an acknowledgement from each identified destination indicating that the message has been successfully received thereby; and remove the message from said data storage engine when an acknowledgement has been received for each destination.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1shows an example system1which consists of a message delivery network2which is providing a scaleable, distributed assured message delivery service, as well as clients for the service. Network2consists of message delivery routers3through10which can be flexibly deployed in various different networks topologies, with an example topology shown inFIG. 1. An example of a device which can serve as a router3through10is the VRS/32 Value-Added Services Routing System from Solace Systems, Inc. Note that routers3through10may be deployed as an overlay to an underlying network, such as an IP/MPLS network, or other communications networks as is known in the art. Connected to network2is a plurality of messaging applications or clients15through30, which may be any type of device or software which wishes to send and receive messages, with the message delivery to the one or more recipients being assured by network2. Note that while only a small number of clients is shown, such a delivery network can support a large number of clients, such as millions, and can scale to a large number of message routers.

FIG. 1also shows an example of a message31being submitted by client15. This example message results in a copy31A being delivered to client30, a copy31B being delivered to client19, a copy31C being delivered to client20, a copy31D being delivered to client23, and a copy31E being delivered to client25.

The message31can be routed to the set of interested destinations based on destination queues or topics as is known in the art, but preferentially is routed based on the content of the message using content routing techniques. An example of a method for content routing of messages is detailed in U.S. application Ser. No. 11/012,113 (PCT application PCT/CA2004/002157), the contents of which are incorporated herein by reference. As a short summary of the routing method detailed in this reference, the inbound router3ofFIG. 1, upon receiving message31, determines the set of local clients interested in the message (client30), as well as the set of remote message routers interested in the message (4and10). When the message is sent onwards to message router4and10, a shared copy of the message may be forwarded upon common routes. In the example of network2, the preferential route to routers4and10from router3is via router5, so a single copy of message31is sent towards router5, indicating a destination list of router4and10. Router5, upon receiving the message, sees that it is not in the destination list for the message, and so simply forwards the message onwards towards routers4and10, with the route to both being via the link to router4. Upon receiving the message, router4can immediately forward the message onwards to router10(via router7), after removing itself from the destination list, and then, since router4appears in the destination list, router4can process the message for delivery to interested local clients (19and20). Router7simply forwards the message onwards to router10. Router10processes the message since it is in the destination list, and will send the message to interested clients23and25.

It should be noted that in addition to the distributed message delivery system1shown inFIG. 1, a hub-and-spoke model can also be utilized where the clients are connected to a single router (or a pair of routers for redundancy). Moreover, the message routing can be based on destination queues or topics instead of, or in addition to, content-based routing. Also note that different routing schemes can be utilized other than the example scheme described above, without affecting the applicability of this invention.

FIG. 2shows prior-art methods of storage for messaging for assured delivery. Message routers71and72require disk storage to temporarily store messages for which assured delivery is required. Message routers71and72act as a redundant pair, such that if one of the message routers fails, the other message router can take over the processing load. The message routers71and72preferentially operate in an active-active mode, whereby each serves a separate set of clients, but if one of the message routers fails, the other message router takes over the clients from the failed router. During such a switchover, no assured delivery messages can be lost, and any messages stored by one message router must be accessible by the other message router. Note that instead of an active-active mode, an active-standby mode could be used instead.

One method commonly utilized is to use an external shared persistent storage device73, which may be directly connected to the message routers71and72or accessible over a Storage Area Network (SAN). Each message router71and72connects to the shared storage73over redundant access links74, examples of which are Fiber Channel, Ethernet, etc. Shared storage device73is known in the art and available commercially from many vendors. An example of such technology is disclosed in U.S. Pat. No. 7,055,001, the contents of which are incorporated herein by reference. When message router71stores messages and associated delivery state on shared storage73and subsequently becomes unavailable, message router72can access this information to take over delivery responsibility for these messages (and vice versa).

Another alternative is for messages router71to use a local hard disk (or disks)75to store assured messages in progress and their associated delivery state, and for message router72to similarly use a local disk(s)76to store it's assured messages in progress and their associated delivery state. Disks75and76typically utilize techniques such as RAID, as known in the art, to increase reliability. However, should message router71or72become unavailable, the other message router must be able to access the in-progress assured messages and associated state to take over the delivery function. Thus, the two message routers71and72must communicate, over a connection77, to replicate the in-progress messages and associated state between each other so that they can take over from each other when required. This can be done over communications link77, which can be a link such as an Ethernet link or any other communications means. Note that link77can be redundant, and can be a direct connection or through an underlying network connecting the two message routers71and72. This method poses an extra burden on the message routers71and72as they have to replicate the messages to each other in addition to their other processing functions. Moreover, if a message router72if offline or otherwise not available when message router71is processing messages and updating its disk75, when message router72comes back on-line, message router71must update message router72with the updates that were made to disk75while message router72was not available, to allow message router72to update its disk76and bring the two message routers back to a synchronized state.

FIG. 3shows a block diagram of an exemplary device40(representing a device such as an individual message router from the set of 3 through 10) of the present invention, which includes a (or many) central processing unit (CPU)42, also called a processor, with associated memory41, persistent storage43, a plurality of communication ports44(which may just do basic input/output functions, leaving the protocol processing to CPU42, or which may have specialized processors such as networks processors or other hardware devices to do protocol processing as well, such as IP processing, UDP or TCP processing, HTTP processing, etc), and a communication bus45. Either integrated into communications port network processors44, or CPU42or a separate device off the communication bus45is a SSL termination processor48. For an example application of content routing, the processor42is responsible for tasks such as running content routing protocols XLSP and XSMP (as per U.S. application Ser. No. 11/012,113), computing routing tables, processing received documents or messages and routing them based on content (which may involve specialized hardware assist46which is outside the scope of this invention), transforming the content of messages from one format to another (which may involve specialized hardware assist47which is outside the scope of this invention), carryout out the logic to ensure assured message delivery, which includes use of the non-volatile storage engine54, and other router tasks known in the art. The associated memory41is used to hold the instructions to be executed by processor42and data structures such as message routing tables and protocol state. The persistent storage43is used to hold configuration data for the router, event logs, programs for the processor42, as well as to hold state required for assured message delivery for longer-term storage. The persistent storage43may be redundant hard disks, flash memory disks or other similar devices. The communication ports44are the ports which the router uses to communicate with other devices, such as other routers and hosts (messaging clients). Many different technologies can be used, such as Ethernet, Token Ring, SONET, etc. The communications bus45allows the various router components to communicate with one another, and may be a PCI bus (with associated bridging devices) or other inter-device communication technologies known in the art, such as a switching fabric. Communications bus45may also be redundant.

Optionally, shared persistent storage51, which is shared among two or more message routers which are acting to back each other up to provide redundancy, and may also be shared with other message routers, may also be utilized to provide longer-term storage of messages and state associated with assured delivery. In this case, a storage communication port49(or multiple for redundancy), utilizing technology such as Fiber Channel, SCSI, Ethernet, etc. is used to connect to shared persistent storage51. An external, shared persistent storage,51, connected over link50(or multiple for redundancy), can be used to store shared state, such as assured messages and their state information. Storage51is connected to one or more other mate message routers53(e.g. via link(s)52), and thus if a message router completely fails, the shared storage51, and the assured messages and state stored on it, is not affected.

Mate message router53preferentially has the same blocks as message router40, but these details other than the mate's non-volatile storage engine56are not shown inFIG. 3.

If shared persistent storage51is not utilized, then when an assured message and its state information is written to storage43in a message router, the same information is preferentially synchronized with a backup message router, so that in the case of the complete failure of a message router, the backup message router can take over and continue to take care of the assured message(s) from the failed router.

Refer to U.S. application 60/696,790, the contents of which are incorporated herein by reference, for a technique of router redundancy in message routing networks.

Non-volatile storage engine54is used for shorter-duration persistent storage of assured delivery messages and their associated state. It provides consistent low-latency and high throughput storage. Non-volatile storage engine54is connected, preferentially through redundant links55, to the mate non-volatile storage engine56in the mate message router53. This allows automatic replication of assured delivery messages and associated state between the interconnected non-volatile storage engines54and56.

It should be noted that instead of using two physically separate message routers40and53as shown inFIG. 3, redundancy can also be provided in an integrated system through hot-swappable cards in a chassis. For example, the message router can utilize redundant components such as redundant processing cards42with associated memory41, redundant content matching and forwarding engines46, redundant non-volatile storage engines54and56, etc. Interconnect45itself can be a redundant interconnection fabric. Links55can optionally be done via the redundant interconnection fabric45, or via dedicated interconnection lines on the system backplane. It will be understood that any discussion of a message router and a mate message router for the purposes of redundancy can also refer to redundancy provided through an integrated message router with redundant components. Shared persistent storage51can also be integrated into the same chassis, communicating with the rest of the system over the redundant interconnect fabric45or other dedicated communication channels provided on the system backplane, or be kept as an external device.

FIG. 4shows a block diagram of the non-volatile storage engine54. The purpose of the non-volatile storage engine54is to provide a very low-latency and high throughput non-volatile memory with automatic information replication to the mate non-volatile storage engine, and to provide off-loading of some of the state management associated with maintaining assured messages and associated state in non-volatile memory.

Power is provided to non-volatile storage engine54through redundant power feeds101and102. Note that a single power feed only may be utilized to non-volatile storage engine54, and redundant power supplies could be externally OR'ed together to supply this single feed, or a non-redundant feed could be utilized. These power feeds101and102are normally used to power all circuitry on non-volatile storage engine54. Power control unit103accepts power feeds101and102, monitors the feeds to detect if both feeds have failed, and adapt the power feeds to the voltages needed by the various circuitries on the card. Associated with power control unit103is a backup power supply104, which preferentially is a high capacity capacitor (or a group of capacitors), such as supercapacitor or an ultracapacitor. In place of a capacitor, a re-chargeable battery can be utilized. Power control unit103provides charging circuitry for backup power supply104, as well as can accept power from backup power supply104when both feeds101and102have failed. Power control unit103provides two sets of power outputs to the reset of the circuitry, a non-protected power feed106and a protected power feed105. Non-protected power feed106is used to power circuitry which is not required to function when the power feeds101or102have failed, while protected power feed105is used to power circuitry which must continue to function when power feeds101and102have both failed. Non-protected power feed106is only powered from power feed101or102. Protected power feed105is powered from power feed101or102, and when both101and102have failed, is powered from backup power supply104. Units memory117, memory controller107, backup logic108, storage interface109, and backup non-volatile storage116are powered from protected power feed105, and the other blocks are powered from non-protected power feed106. Note that other units can optionally be powered from protected backup feed105in place of non-protected power feed106, with a result in a shorter duration of the backup power being available due to the increased power loading.

It should be noted that capacitors are preferential over batteries for backup power supply104due to their longer lifetime. Rechargeable batteries have a limited lifetime and then must be replaced, increasing the operational expense of the equipment.

Memory117is high-performance, low latency memory such as DRAM. Other alternatives can also be utilized, such as SRAM, SDRAM, reduced latency DRAM, etc. The key criteria is for low power to minimize the power draw on backup power supply104when it is being used. Memory117is controlled by memory controller107. Due to the backup power, memory117acts as a non-volatile memory. Memory117is preferentially protected via error-correcting code (ECC) to protect the contents against corruption due to soft errors.

Backup non-volatile storage116is used to provide longer lasting backup storage for memory117. This storage is only utilized during a power failure of both feeds101and102(or removal of external power to non-volatile storage engine54for any reason) in order to store an image of memory117. In this way, protected power feed105is only required to be used for a short period of time, as explained further below. Backup non-volatile storage116is controlled by storage interface109. Preferentially, backup non-volatile storage116is a Flash Disk (Flash EEPROM), but other non-volatile technology can be used in place, such as a disk drive, magnetic RAM (MRAM), ferroelectric RAM (FeRAM), or Ovonic Unified Memory (OUM). Preferentially, the backup-non volatile storage is removable from the non-volatile storage engine54, such that in the event of a complete failure of the card, and if a mate router is also not available, the messages stored on the card can be recovered.

Backup logic108is used to copy the contents of memory117to backup non-volatile storage116when the power feeds101and102have both failed and power is only available from backup power supply104. In this way, backup power supply104only needs to power blocks117,107,108,109and116for the duration of time needed to copy the memory117to backup non-volatile storage116. This allows the backup power supply104to only require a small capacity.

System interface111couples the assured deliver engine54to the system communication bus45. For example, if the communications bus45is a PCI-X bus, then the system interface111is a PCI-X interface. This allows the processor42, or a DMA engine260, to transfer data to and from the non-volatile storage engine54, and also allows the non-volatile storage engine to transfer data to and from the memory41. In a similar manner, the non-volatile storage engine can also communicate with other system components over communications bus45.

The control logic110controls the overall operation of the assured delivery card54under normal operation, and is described further below.

Link interface112allows the non-volatile storage engine to communicate with the mate non-volatile storage engine56, via a dual physical layer interface block113, which in turn interfaces with two ports114and115, which in turn connect to redundant links55. Ports114and115preferentially use small form-factor pluggable modules, to allow the interface to be selected between copper and optical interfaces, and to allow the ports to be swapped out if failed.

The operation of non-volatile storage engine54in the context of assured delivery of messages in network2is now described. For a description of the operation of an exemplary network-wide assured delivery service, to which this invention can be applied, refer to co-filed U.S. patent application 60/745,456, the contents of which are incorporated herein by reference. Note that the non-volatile storage engine54can be utilized in other ways to achieve an assured delivery service.

When content router40receives a message which it must deliver in an assured manner, it must first ensure that the message is stored in a guaranteed persistent manner before acknowledging the message to the sender. In this way, the message router40will take responsibility for the delivery of the message in an assured manner, and the sender, once an acknowledgement is received, can assume that the message will be delivered without loss. The processing logic used by message router40is shown inFIG. 5.

Message router40receives a message for assured delivery at step150. It first determines the required set of recipients for the message at step151, either via the destination queue that has been specified, or by determining the set of recipients based on destination topic or topics for the message (through subscriptions to the topic(s)), or by examining the content of the message and determining the set of recipients interested in the content of the message, using the content matching and forwarding engine46, or via a set of recipients explicitly indicated by the message sender, or by any other means. Message router40can also have other meta-data associated with the message, such as message length, message priority, sequence number, expiry time, etc., which may have been included with the message from the message sender, or may be determined by message router40, or a combination. At step152, a check is made to see if there are any destinations for the message. If not, step153is reached, where an acknowledgement is returned to the message sender, and processing completes at step154.

If there is at least one destination at step152, then step155is reached, where the message is placed into non-volatile storage, along with the destination list and other associated meta-data. This is done using the non-volatile storage engine54, as described below. Once the assured delivery message (and associated meta-data and destination list) is in non-volatile memory117on non-volatile storage engine54, step156is reached, and an acknowledgement is sent to the message sender to indicate that the message router40has now taken responsibility for the message and will deliver it to any required destinations. At step155, the non-volatile storage engine54, when storing data into memory117, also sends the data across link(s)55to the mate non-volatile storage engine56for storage in its memory117. This replication is automatically carried out by control logic110, freeing up the processor42from this task.

At step157, the message is sent to required next-hop destinations. Note that where possible the message will remain in memory41and be delivered to any next hop destinations from memory41. In the preferred case, the message will never need to be retrieved from memory117. Even with the assistance of DMA engine260message transfer across system bus45is relatively expensive. In the example stated previously (FIG. 1), with respect the message router3, a copy of the message is delivered to client30, and a copy is delivered to message router5for onwards delivery to message routers4and10.

At step158, message router40waits for an acknowledgment from each entity to which it sent a copy of the message.

At step159, an acknowledgement is received for the message from a given destination. This leads to step160, which removes that destination from the list which is maintained against the message (described above in step155) in memory117. Then, at step161, a check is performed to see if an acknowledgement has now been received for all destinations. If not, step158is reached to wait for further acknowledgements. When all acknowledgements for the message have been received, step162is reached, where the messages and the associated meta-data can be removed from non-volatile storage117, and then the process completes at step154. It should be noted at step162, the resources can be immediately freed from memory117for the message and associated data, or the resources can be freed as a background operation.

At step158, if a timeout occurs when waiting for all the acknowledgements for the message to arrive, indicating that all the acknowledgements have not been received in a small period of time, such as four seconds, then step163is reached. This indicates that at least one message recipient is not acknowledging the message in a timely manner, and thus delivery of this particular message will not be finalized to all recipients in a small amount of time. In this case, processing proceeds to step164, where the message, and the associated destination list and meta-data is moved from memory117to a higher-capacity persistent storage43or51. Note that the destination list will only contain the destinations which have not yet acknowledged the message. Then, processing proceeds to step162where the message, destination list and associated meta-data can be removed from memory117as described above. Then, the process completes at step154.

Step163and step164can alternatively be triggered by the amount of free memory resources in memory117falling below a configurable threshold rather than being based on a timeout waiting for acknowledgements. That is, messages that have not been fully acknowledged can reside in memory117for an extended period of time as long as memory117has sufficient free resources to handle newly published messages.

The above-described flow is only with respect to a single message, and the message router40performs such logic for many messages in parallel.

Thus, as described inFIG. 5, persistent messages and associated data are stored temporarily in non-volatile memory117, which can be done with consistently very low latency and with very high throughput, due to the high memory bandwidth of memory117and the high bandwidth of communications bus45. However, memory117has limited capacity, and thus if a given message is not acknowledged by all recipients in a timely manner, the message and associated data is migrated to a higher-capacity persistent storage. This migration does not affect the delivery latency to recipients who were available to receive the message quickly, and does not affect the publisher of the message as the message has been previously acknowledged to the publisher.

At step160, as an alternative to removing a destination which has acknowledged the message from the destination list stored in memory117, other state can be stored in memory117for each subscriber, such as the most recently acknowledged message sequence number, which means that that messages and all previous messages sent to that subscriber have been acknowledged. Thus, at step161, this additional state can be referenced to determine if all the destinations for a particular message have acknowledged receipt of that message.

The required capacity of memory117can be determined based on the average message size, the desired message rate to be supported, the maximum amount of time for “normal” message delivery, and also accounting for the data replication that occurs between non-volatile storage engine54and mate non-volatile storage engine56. Referring toFIG. 6, non-volatile memory117is separated into two parts. The first part180stores messages and associated data (destination list and other meta-data or other state data such as per-subscriber and per-publisher state as described above) for the message router40, while the other part181stores messages and associated data and other state information from the mate message router53. Preferentially,180and181are of equal size. Segment180is controlled by non-volatile storage engine54, while section181is controlled via mate non-volatile storage engine56and populated via communications between the two non-volatile storage engines54and56over link(s)55.

As an example, given an average assured delivery message size of 1000 bytes, and allowing for 500 bytes for the destination list and associated meta-data for the message, each message requires 1500 bytes of storage in memory117. Another factor is the maximum amount of time a given message can live in memory117; an example value being five seconds. A third factor is the expected peak message rate for assured delivery messages which is to be sustained by message router40. A fourth factor is the doubling of memory required to hold both segments180and181. This yields:

In the above example, memory117can be provisioned as 1 Gigabyte of memory. It should be noted that the 5 second time must account for any time required to process received acknowledgements, and to migrate messages and associated data to higher-capacity persistent storage43or51as needed. If acknowledgements are expected within 3.5 seconds, this gives a further 1.5 seconds for the other operations.

Similarly, the required bandwidth of link55in a given direction can be determined by the amount of data that must be transferred between non-volatile storage engines54and56, namely:

Some additional overhead must be accounted for any additional framing or other communications protocol overhead between the two engines, as well as messages to update the contents of the memory (i.e. when an acknowledgement is received or when an entry can be freed). In the above example, a link of a Gigabit per second is suitable, and thus a link based on the gigabit Ethernet PHY or similar can be utilized. Note that any type of link protocol may be utilized between the two engines.

Another factor is the memory bandwidth needed into memory117from memory controller107. Memory bandwidth is needed to store messages and associated data from this message router40and the mate message router53, as well as updates to the data structures as destination lists are modified for messages, updates to data structures as messages are removed to free up resources, and bandwidth to copy out any messages and associated data that must be moved onto persistent storage43or51as explained above. The dominant factor is placing messages into the RAM, the rate of which will be double the 90,000,000 bytes/second computed above (to account for entries from both message routers), plus bandwidth to account for every message being moved back to disk in the worst case. The resulting required bandwidth is low compared to the bandwidth available for memories such as DRAM.

Backup non-volatile storage116must be sized to be at least as big as memory117, for example, 1 Gigabyte as per the calculation above.

Memory117can be used to store other state data that needs to be non-volatile, accessed with low-latency and high throughput, and made redundant via synchronization with the mate non-volatile storage engine56. For example, state can be maintained on a per-publisher basis, such as the last message identifier number received from each publisher. State can also be maintained on a per-subscriber basis, such as the last message identifier number sent to the subscriber, and the last message identifier number acknowledged be the subscriber (which indicates that this message and all previous messages have been acknowledged). Such state information is automatically synchronized to the mate non-volatile storage engine56as described above. However, such information may never need to migrate to persistent storage43or51, since by its nature it is of fixed size (as opposed to being based on the number of outstanding messages) and thus a fixed portion of segment180and segment181can be reserved for this data. If such data is of highly variable size, it can be migrated to external storage43or51as needed. The memory117must be sized to take into account any such usage in addition to the calculation performed above for message storage.

Backup power supply104must be sized to support the power draw for the blocks using protected power feed105for the duration of the time needed to for backup logic108to copy the contents of memory117to backup non-volatile storage116. If block116uses technology such as NAND Flash, write speeds of 20 Mbytes per second are available. Given a memory capacity of 1 Gigabyte, this transfer will take 50 seconds. So, backup power supply104only has to be sized to power the circuitry for a modest period of time, such as two minutes (to provide an adequate safety margin). It should be noted that only a small amount of circuitry is being protected by power supply104, as opposed to trying to use an external uninterruptible power supply to protect the entire message router40.

It should be noted that the non-volatile storage engine54can be sized to support higher message rates or larger averages messages sizes by adjusting the size of memory117, the size of backup non-volatile storage116, the bandwidth of link(s)55, and the capacity of backup power supply104. The communications bus45must also have sufficient bandwidth to support the transactions to and from the non-volatile storage engine54.

Control logic110also sends period heartbeat messages over both links55to the mate non-volatile storage engine56, and monitors links55for incoming heartbeat messages. This allows each message router to determine whether the mate message router is connected.

FIG. 7shows one method for managing the segment180in memory117. WhileFIG. 7shows the entire segment180being used for messages and associated meta-data, it will be understood that a portion of segment180(and181) can be reserved for other uses, such as state data associated with publishers and subscribers as described above. With this method, arriving messages are kept in a circular queue in segment180, with the oldest message present pointed by first used location pointer201, and the first free location in segment180pointed to by first free location pointer202. Thus, the available free area208is indicated. In the example, three messages are currently present, namely209,210,211. It will be understood that a very large number of such messages can be present. At step155, when a new message is to be placed into memory117, the message is placed starting at the location specified by the first free location pointer202. The message consists of a header204, which can contain data such as an overall length of the information block for a message, and can also contain validation information such as a checksum or CRC across the data. In this storage scheme, it is critical that message boundaries are always known even in the case of non-correctable corruption, so duplicate information can be encoded to ensure that messages can always be delineated in memory117. The destination message list is encoded in field205, any message meta-data such as message headers or other internal information such as a timestamp of when the message was received is stored in field206, and the message itself is stored in field207.

At step160, when an acknowledgement is received for a given destination and the destination list is to be updated, the message entry is located in memory segment180and the destination list of field205is updated to show that the destination has acknowledged the message. This can use, for example, an associated flag with each destination in the list to indicate that the destination has acknowledged the message. Or, the destination information can be replaced with a reserved value indicating a null destination.

To locate the message for which an acknowledgement applies, CPU42can keep tracking data structures in memory41for the location of each message in memory117, or control logic block110can track this structure using internal memory and thus offload CPU42from this location task.

Step162involves removing messages for which all destinations have acknowledged the message, and step164involves moving messages which have not received all acknowledgements in a timely manner to persistent storage43or51. One algorithm which can be utilized is for control logic110to periodically scan the stored messages starting at pointer203, and examining each message in turn to see if the message has been in segment180for too long (as per step163). Alternatively, control logic110can perform the scanning operation in response to the available free space208falling below a configurable threshold. For each message examined, if all acknowledgements have been received, and there are no previous non-acknowledged messages, pointer203(and pointer201if equal to pointer203) can be advanced to free up the space. When a message is found that has been waiting too long for all acknowledgements, logic DMA engine260transfers the messages and associated data from memory117to memory41, and then informs processor42(e.g. via an interrupt or other such means) of the presence of such transferred messages. Pointer203is advanced after such a DMA transfer to keep track of which messages have been transferred to memory41. Processor42can then store such messages and related data, in a bulk manner as a group, into storage43or51, and then inform control logic block110when such transfer is complete (with such data being physically transferred onto the physical storage medium or onto a non-volatile cache associated with such storage medium). Then, first used location pointer201can be advanced to free up memory for all such messages which have been transferred. The process of looking for expired messages (or older messages due to the amount of free space208falling below a configurable threshold) can continue until a message is found which has not yet expired, or until free space208as grown large enough, or until the first free location pointer202is reached.

Note that the decision of when messages need to migrate from memory117to storage43or51can also be made by processor42in place of control block110, or the two units can work together to make the determination.

Note that segment181can be utilized in a similar manner, but its contents are remotely managed by the mate non-volatile storage engine56to mirror the contents of its segment180, and vice versa.

The above scheme does not maximize the free space available in segment180, since a given message slot is not freed up, even if all acknowledgements have been received, until all previous messages have been acknowledged fully or have been transferred to persistent storage43or51.

Another example technique is shown inFIG. 8. Segment180(or a subset of segment180which is allocated for messages storage and associated meta-data) is broken down into a number of allocation blocks233, and when non-volatile storage engine54is first initialized with previously stored states in backup non-volatile storage116, all such allocation blocks are placed onto the free list230. Upon a restart of non-volatile engine54, the state of memory117is restored from backup non-volatile storage116.

At step155, when a new message and associated data is to be stored, the required number of block needed to store the information are removed from free list230and added to the end of allocated list231, and the information is stored, including portions204,205,206and207described above. At step162, when a message and associated data is to be removed, due to receiving all acknowledgements for the message or the message having been transferred to non-volatile storage43or51, the associated blocks can be removed from allocated list231and placed back onto free list230, thus immediately freeing up the resources upon the receipt of the last acknowledgement for the message.

For step163, upon the free list230having an amount of free memory which is below a configurable threshold, the allocated list can be scanned to find messages that are too old as described before. The handling of such messages (i.e. DMA into memory41) is as before, but the associated blocks can be moved onto list232. As acknowledgment of storage into persistent storage43or51are received, the blocks in question can then be moved from list232onto list230and thus freed.

With the technique ofFIG. 8, messages can reside in memory117for a longer period of time, and only have to be migrated from memory117to persistent store43or51in response to the amount of free memory on free list230falling below a threshold. While the technique ofFIG. 7can also trigger a transfer based on the amount of free space208falling below a threshold, that technique may not free up memory as quickly since if a message has not been fully acknowledged and thus the associated memory cannot be freed up, the memory for any later messages that have been fully acknowledged cannot be freed up until the preceding unacknowledged message is migrated to storage43or51. In comparison, in the technique ofFIG. 8, memory associated with a message can be moved from the allocated list231to the free list230as soon as all acknowledgements have been received, independently of the state of any other message.

It will be understood that many other techniques can be utilized for management of segment180.

FIG. 9shows an alternative block diagram of the non-volatile storage engine54with the interface to shared persistent storage integrated onto the engine, as opposed to being accessed by ports49on a different assembly as shown inFIG. 3. Elements in common withFIG. 4carry the same label and are not described again.

In place of backup non-volatile storage116, redundant ports251and252are provided for access to the shared persistent storage51. Ports251and252are accessed via the dual physical interface block250to provide access to the external storage from backup logic block108, control logic block110and system interface block111. In this way, the external physical storage remains accessible to CPU42, and blocks on the assured delivery card54can also access storage51. Blocks250,251and252are powered from protected feed105so that they continue to function during loss of both power feeds101and102.

When both power feed101and102fails, backup logic108copies the contents of memory117to the external persistent storage instead of using Flash EEPROM device. As an option, in order for the backup logic108to not have to understand file systems, a portion of the external storage can be reserved as a raw set of disk blocks, allowing backup logic108to use a simple method to backup the contents of memory117.

Additionally, at step164, the control logic block110can directly access persistent storage51to manage the movement of messages and associated data from memory117to storage51, instead of processor42doing part of the task. It should be noted that even if the scheme ofFIG. 9is utilized, the migration of messages from memory117to storage51can still be done with the involvement of processor42as previously described. As another alternative, control logic110can include a CPU with the software logic to control a file system on shared persistent storage51, allowing non-volatile storage engine54to independently access a full file system on storage51.

It will be appreciated that while the use of the non-volatile storage engine54has been described in the context of an assured delivery application, this engine can be used for many other applications. For example, in an apparatus being used to process messages for the Financial Information eXchange (FIX) protocol, there is also a need for very low-latency, high throughput handling of messages, in which messages need to be placed into non-volatile storage in a redundant manner while maintaining the lowest possible latency and highest possible throughput. Non-volatile storage engine54can be used in a similar manner to that described above for this purpose, but the meta-data associated with the message will be different. As another example, for processing of stock exchange feeds in a redundant manner, the non-volatile storage engine can be used to efficiently synchronize required non-volatile state between a redundant pair of routers performing such processing.

It will be appreciated that an exemplary embodiment of the invention has been described, and persons skilled in the art will appreciate that many variants are possible within the scope of the invention.

All references mentioned above are herein incorporated by reference.