Apparatus and methods, including computer program products, for providing a network-accessible queue. The queue is stored on a network-accessible file system having a locking mechanism providing strictly-enforced, network-wide file locking. The data structures of the queue are stored in the file system. The file system is preferably implemented on a network accessible RAID array storage device providing a native CIFS file system for storing queue entries received over a network from sender clients and for delivery of such queue entries to receiver clients. Synchronization is implemented using file locks enforced by the file system, so there is no need for a master synchronization process. Notification of the availability of queue entries to receiver clients is also done by a decentralized process.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A system, comprising: file system maintaining files on a fault-tolerant platform, the file system coupled for communication with a network operable to perform file operations requested over the network, the file system providing strictly enforced, network-wide file locks; queue implemented in queue data structures stored in the file system, wherein the queue data structures comprise (i) a directory for storing queue entry files, (ii) a kernel file, the kernel file including a header and a plurality of slots, each slot potentially representing an entry in a queue entry file, and (iii) a notification file; plurality of clients on the network coupled to the file system by the network, each client operable to add an entry to a queue, to remove and process an entry from the queue, or both to add and to remove and process entries from the queue, wherein each client that is operable to add an entry is configured to invoke separately from other clients an add method, and each client that is operable to remove and process an entry is configured to invoke separately from other clients a remove method; and a notification mechanism by which each client is registered for changes in the notification file when the client removes an entry from the queue, the notification mechanism notifying and waking each registered client when an entry is added to the queue and an attribute of the notification file is changed; wherein: the file system file locks are used to synchronize access to the queue data structures by the clients without use of a master synchronization process.
2. The system of claim 1 , wherein: the file system implements a CIFS protocol.
3. The system of claim 1 , wherein: the file system is a CIFS file system implemented as a native file system on a fault tolerant, network attached storage (NAS) device.
4. The system of claim 3 , wherein the NAS device is a RAID device and the CIFS file locks are maintained on the RAID controller.
5. The system of claim 1 , wherein: the queue is a time queue; each queue entry is a message; each queue entry file is a message file; each queue entry has a queue priority, the queue priority being a delivery time of the queue entry message; and the directory for storing queue entry files is a message directory.
6. The system of claim 5 , wherein the notification mechanism sends a notification to registered clients upon expiration of the unread message having an earliest delivery time.
7. The system of claim 1 , wherein the kernel file header includes: a count of the number of empty slots in the kernel file, a count of the number of slots being filled or processed in the kernel file, a count of the total number of slots in the kernel file, an offset of the first slot that is ready to be processed by a client acting as a receiver, an offset of the first empty slot, and a queue priority of the first slot that is waiting to be processed.
8. The system of claim 1 , wherein the kernel file slots are organized into three virtual groups: a group for empty slots that are empty and ready to receive a message, a group for unread slots that each contain an unread message waiting to be processed by a client, and a group for pending slots that are either being filled by a client or are being processed by a client.
9. The system of claim 1 , wherein the remove method is operable to perform the operations of: attempting to lock the kernel header to prevent simultaneous access by other clients, obtaining a lock of the kernel header, retrieving a first unread queue entry, unlocking the kernel header, and processing the first unread queue entry.
10. The system of claim 1 , wherein each client that is operable to remove and process an entry is configured to invoke separately from other clients an acknowledge method, the acknowledge method being operable to perform the operations of: marking the slot of a queue entry that has been processed by a client as an empty slot that is ready to receive a queue entry.
11. The system of claim 1 , wherein the add method is operable to perform the operations of: receiving a new queue entry; storing the new queue entry in a queue data structure stored in the file system; posting a notification; and placing the new queue entry in a list of unread queue entries.
12. The system of claim 11 , wherein: the queue is a time queue; the new queue entry is a message having a desired delivery time; and the new message is stored in a list of unread messages, the unread messages being ordered by their delivery times from earliest to latest, the list of unread messages being a time queue data structure stored in the file system.
13. A system, comprising: a file system maintaining files on a fault-tolerant platform, the file system coupled for communication with a network operable to perform file operations requested over the network, the file system providing strictly enforced, network-wide file locks; a queue implemented in queue data structures stored in the file system, wherein the queue data structures comprise (i) a directory for storing queue entry files, (ii) a kernel file, the kernel file including a header and a plurality of slots, each slot potentially representing an entry in a queue entry file, and (iii) a notification file; a plurality of clients on the network coupled to the file system by the network, each client operable to add an entry to a queue, to remove and process an entry from the queue, or both to add and to remove and process entries from the queue, wherein each client that is operable to add an entry is configured to invoke separately from other clients an add method, and each client that is operable to remove and process an entry is configured to invoke separately from other clients a remove method and an acknowledge method; and a notification mechanism responsive to the remove method, the remove method operating to register its client with the notification mechanism, the notification mechanism notifying and waking each registered client when an entry is added to the queue; wherein the file system file locks are used to synchronize access to the queue data structures by the clients without use of a master synchronization process; and wherein the kernel file header includes: a count of the number of empty slots in the kernel file, a count of the number of slots being filled or processed in the kernel file, a count of the total number of slots in the kernel file, an offset of the first slot that is ready to be processed by a client acting as a receiver, an offset of the first empty slot, and a queue priority of the first slot that is waiting to be processed.
14. The system of claim 13 , wherein the kernel file slots are organized into three virtual groups: a group for empty slots that are empty and ready to receive a message, a group for unread slots that each contain an unread message waiting to be processed by a client, and a group for pending slots that are either being filled by a client or are being processed by a client.
15. The system of claim 13 , wherein the add method is operable to perform the operations of: receiving a new queue entry; storing the new queue entry in a queue data structure stored in the file system; posting a notification; and placing the new queue entry in a list of unread queue entries; and wherein: the queue is a time queue; the new queue entry is a message having a desired delivery time; and the new message is stored in a list of unread messages, the unread messages being ordered by their delivery times from earliest to latest, the list of unread messages being a time queue data structure stored in the file system.
16. The system of claim 15 , wherein the kernel file slots are organized into three virtual groups: a group for empty slots that are empty and ready to receive a message, a group for unread slots that each contain an unread message waiting to be processed by a client, and a group for pending slots that are either being filled by a client or are being processed by a client.
17. The system of claim 15 , wherein the add method is operable to perform the operations of: receiving a new queue entry; storing the new queue entry in a queue data structure stored in the file system; posting a notification; and placing the new queue entry in a list of unread queue entries; and wherein: the queue is a time queue; the new queue entry is a message having a desired delivery time; and the new message is stored in a list of unread messages, the unread messages being ordered by their delivery times from earliest to latest, the list of unread messages being a time queue data structure stored in the file system.
18. A system, comprising: a file system maintaining files on a fault-tolerant platform, the file system coupled for communication with a network operable to perform file operations requested over the network, the file system providing strictly enforced, network-wide file locks; a queue implemented in queue data structures stored in the file system, wherein the queue data structures comprise (i) a directory for storing queue entry files, (ii) a kernel file, the kernel file including a header and a plurality of slots, each slot potentially representing an entry in a queue entry file, and (iii) a notification file; a plurality of clients on the network coupled to the file system by the network, each client operable to add an entry to a queue, to remove and process an entry from the queue, or both to add and to remove and process entries from the queue, wherein each client that is operable to add an entry is configured to invoke separately from other clients an add method, and each client that is operable to remove and process an entry is configured to invoke separately from other clients a remove method and an acknowledge method; and a notification mechanism responsive to the remove method, the remove method operating to register its client with the notification mechanism, the notification mechanism notifying and waking each registered client when an entry is added to the queue; wherein the file system file locks are used to synchronize access to the queue data structures by the clients without use of a master synchronization process; and wherein the remove method is operable to perform the operations of: attempting to lock the kernel header to prevent simultaneous access by other clients, obtaining a lock of the kernel header, retrieving a first unread queue entry, unlocking the kernel header, and processing the first unread queue entry.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
August 31, 2001
April 6, 2004
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.