# Patent

## Title
System and method for storing data streams in a distributed environment

## Abstract

Systems, methods and computer readable medium for storing data elements transmitted via data streams received from distributed devices connected via a network. The received data elements may be stored in block stores on the distributed devices. The stored data elements may be allocated to data blocks of a block store that have assigned block identifiers and further allocated to events of the data blocks. Stream schema of the received plurality of data streams may have the same stream schema, and indices may be generated indices based on the order of the event allocated data elements. Stream schema of the received data streams may comprise a list of token names. Token names may be assigned to the event allocated data elements. Indices may be generated for the event allocated data elements based on the stream schema.

## Background
This non-provisional continuation-in-part patent application claims priority to, and incorporates herein by reference, both U.S. Provisional Patent Application No. 61/489,546 which was filed May 24, 2011, and U.S. patent application Ser. No. 13/479,772 which was filed May 24, 2012.


This application includes material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office files or records, but otherwise reserves all copyright rights whatsoever.
FIELD OF THE INVENTION
The presently disclosed invention relates in general to the field of storing and retrieving data, and in particular to systems and methods for storing data streams in a distributed computing environment and for querying, retrieving, accessing, updating, and deleting stored data.
BACKGROUND OF THE INVENTION
Systems for storing and retrieving streams of data are known in the art. Such systems have been used for identifying intrusions in a network monitoring system. Such systems, however, do not scale well in distributed environments. The presently disclosed invention addresses that limitation by providing a block storage system and method that is both flexible and efficient, as well as being highly distributable.
SUMMARY OF THE INVENTION
The presently disclosed invention may be embodied in various forms, including a system, a method or computer readable medium for storing data.
An embodiment of such a system may comprise, inter alia, block-stores that are stored on distributed devices. The distributed devices may be adapted to communicate via a network. The block-stores may store data-elements that are received via data-streams from the distributed devices.
In such a system, block-identifiers may be assigned to each of data-blocks of the block-stores. Such block-identifiers may be globally unique. Each of the block-stores may comprise one or more data-blocks. The stored data-elements may be allocated to the one or more data-blocks of the block-stores. Further, each data-block may comprise the stored data-elements of only one of the received data-streams. The data-blocks of a single data-stream may be logically grouped. In addition, each of the data-blocks may be read and written as a single unit.
The system may further comprise events of one or more data-blocks. The block-allocated data-elements may be further allocated to the events of the data-blocks. Each of the data-blocks may comprise one or more events. Each of the events may comprise the block-allocated data-elements of the corresponding data-block. In addition, indices may be generated for the event-allocated data-elements. The system may further comprise stream-schema of the received data-streams. In an embodiment, each of the received data-streams may have the same or identical stream-schema. In such an embodiment, the generated indices may be based on the order of the event-allocated data-elements in each event.
In some embodiments where each of the received data-streams has a stream-schema, each stream-schema may comprise a list of token-names for the event-allocated data-elements of the corresponding data-stream. The event-allocated data-elements of the corresponding data-stream may be capable of being identified based on the list of token-names. Each stream-schema may further comprise an index-definition for configuring generated indices for each corresponding data-stream.
The system may comprise token-names which may be assigned to each of the event-allocated data-elements. Each of the event-allocated data-elements may have a token-name. The token-names may be human-readable names. The generated indices may be based on the corresponding index-definition and the corresponding list of token-names.
Similarly, an embodiment of a method for the presently disclosed invention may include the step of receiving data-streams from distributed devices. The distributed devices may be connected via a network. Each of the data-streams may comprise data-elements.
The method may include the step of storing the data-elements of the received data-streams. The stored data-elements may be stored in block-stores. The block-stores may be stored on the distributed devices.
The method may also include assigning a block-identifier to each of the data-blocks. The block-identifier may be globally unique. Each of the block-stores may comprise one or more data-blocks. The data-blocks of a single data-stream may be logically grouped. Each of the data-blocks may be read and written as a single unit.
Further, the method may include the step of allocating the stored data-elements to data-blocks of the block-stores. Each of the block-stores may comprise one or more data-blocks. Each data-block may comprise the stored data-elements of only one of the received data-streams.
The method may also include the step of allocating the block-allocated data-elements to events of the data-blocks. Each of the data-blocks may comprise one or more events. Each of the events may comprise the block-allocated data-elements of the corresponding data-block. In addition, the method may comprise generating indices for the event-allocated data-elements.
In some embodiments of the method, each of the received plurality of data-streams may have the same stream-schema. The indices may be generated based on the order of the event-allocated data-elements in each event.
In some embodiments, the method may comprise the step of reading stream-schema of the received data-streams. Each stream-schema may comprise a list of token-names for the event-allocated data-elements of the corresponding data-stream. The event-allocated data-elements of the corresponding data-stream may be capable of being identified based on the list of token-names. The method may further comprise the step of assigning to each of the event-allocated data-elements a token-name. The token-names may be human-readable names. The indices may be generated based on the stream-schema.
Further disclosed is an embodiment of a computer readable medium for the presently disclosed invention comprising computer readable instructions stored thereon for execution by a processor. The instructions on the computer-usable medium may be adapted to receive data-streams. The data-streams may be received from distributed devices. The distributed devices may be connected via a network. Each one of the data-streams may comprise data-elements. The instructions may be further adapted to store the data-elements of the received data-streams. The stored data-elements may be stored in block-stores. The block-stores may be stored on the distributed devices.
Further, the instructions on the computer-usable medium may be adapted to assign block-identifiers to data-blocks of the block-stores. The block-identifiers may be globally unique. Each of the block-stores may comprise one or more data-blocks. The data-blocks of a single data-stream may be logically grouped. Each of the data-blocks may be read and written as a single unit. The instructions may be further adapted to allocate the stored data-elements to the data-blocks of the block-stores. Each data-block may comprise the stored data-elements of only one of the received plurality of data-streams. The block-allocated data-elements may be further allocated to events of the data-blocks. Each of the data-blocks may comprise one or more events. Each of the events may comprise the block-allocated data-elements of the corresponding data-block. The instructions may be further adapted to generate indices for the event-allocated data-elements.
In embodiments of the above-disclosed computer readable medium, methods and systems, the generated indices may have index-pages and index-sets based on stream-schema of the received data-streams. In some embodiments, a query of the event-allocated data-elements may be executed based on a generated index. Event-allocated data-elements may be retrieved based on results from the executed query. In certain embodiment, each of the block-stores may store the stored data-elements of two or more of the received data-streams.
In some embodiments of the above-disclosed computer readable medium, methods and systems, each stream-schema may further comprise an index-definition for configuring generated indices for each corresponding data-stream. The generated indices may have index-pages and index-sets based on index-definitions of the corresponding stream-schema In certain embodiments, each of the index-pages may further comprise data-block references based on the block-identifiers for the corresponding data-blocks. In some embodiments, the index-page may further comprise page-data summarized-information of the data-blocks of the corresponding data-stream, and the index-set may further comprise root-data summarized-information of the index-pages of the corresponding index-definition.
In some of the embodiments, the data-elements may have a common structure. In certain embodiments, the common structure of the data-elements may be an unrestricted-structure. In some embodiments, the data-elements may have a common structure and each stream-schema may correspond to a common structure of each of the events of the corresponding data-stream.
In other embodiments, the data-elements may have different structures. Each stream-schema may correspond to the varying structures of the events of the corresponding data-streams.
In some embodiments, the stored data-elements may comprise compound-data. The compound-data may be selected from a group consisting of lists and objects.
In certain embodiments, the block-stores may support concurrent readers and writers. In some embodiments, the data-elements that are received from a distributed device may be stored in a targeted block-store only if the distributed device has write-access to a file-system utilized by the targeted block-store.
The computer readable medium, method or system, in accordance with certain embodiments, may further include the steps of receiving a request to write data of a data-stream from a distributed device, reading the stream-schema of the received data-stream, allocating local-memory to buffer each of the events of the corresponding data-stream, and caching metadata of the stream-schema.
In some embodiments, the computer readable medium, method or system may further comprise caching metadata of the stream-schema of the received data-streams. Each stream-schema may comprise metadata for the corresponding data-stream.
The computer readable medium, method or system embodiments may further comprise filling a buffer until the buffer reaches a maximum block-size provided by the block-size information for the data-blocks of the corresponding data-stream. Each stream-schema may comprise block-size information for the data-blocks of the corresponding data-stream. The block-size information may provide a maximum block-size for data-blocks within the corresponding data-stream. Further, the embodiments may comprise flushing the buffer into a file-system utilized by the targeted block-store. The buffer may be capable of being reused for the data-elements of the received data-streams.
In some embodiments, a computer readable medium, method or system may further comprise allocating more than one buffer to a single data-stream, wherein concurrent-writers may be utilized in the same distributed device.
A computer readable medium, method or system embodiments may comprise the step of performing a transaction on the event-allocated data-elements. The transaction may be selected from the group consisting of querying, retrieving, accessing, updating, and deleting.
Some embodiments further comprise executing a query of the event-allocated data-elements based on a Boolean-expression, and retrieving a result set of event-allocated data-elements based on results of the executed query. In certain embodiments, the Boolean-expression may be a product-of-sums expression or a sum-of-products expression.
In some embodiments, the step of executing a query may comprise identifying the index-definitions which reference token-names that match token-name constraints of a Boolean-expression of a query for the event-allocated data-elements. The index-definitions may reference a subset of the list of token-names of the corresponding stream-schema. The referenced token-names of the index-definitions may be compared to the token-name constraints of the Boolean-expression. Further, the embodiments may comprise determining a candidate set of index-pages based on the identified index-definitions. The index-sets of the generated indices that match the configuration of the corresponding identified index-definitions may be compared to index-set constraints of the Boolean-expression. In addition, the embodiments may comprise determining a candidate set of data-blocks based on the candidate set of index-pages. The candidate set of index-pages may be compared to index-page constraints of the Boolean-expression. The embodiments may further comprise determining the result set of event-allocated data-elements based on the candidate set of data-blocks. The candidate set of data-blocks may be compared to data-blocks constraints of the Boolean-expression. The result set of event-allocated data-elements may comprise a maximal set of event-allocated data-elements that satisfy the Boolean-expression of the executed query.
Certain embodiments further comprise setting a candidate set of data-blocks to comprise all data-blocks in the corresponding data-stream, only if the referenced token-names of the index-definitions fail to match the token-name constraints of the Boolean-expression.
Some embodiments further comprise evaluating the candidate set of data-blocks based on the Boolean-expression, and ignoring false-positives returned from the executed query. Event-allocated data-elements that fail to satisfy the Boolean-expression may be removed from the result set of event-allocated data-elements.
In certain embodiments of the computer readable medium, method or system, the steps may further comprise updating at least one of the candidate set of data-blocks. The index-page referencing the candidate set of data-blocks may be updated. Further, the index-set referencing the updated index-page may be updated. In addition, the data-elements of the result set of event-allocated data-elements may be updated. The update for the data-element may be: a deletion of an event-allocated data-element, an insertion of an event-allocated data-element, or a modification of an event-allocated data-element.
In an embodiment, the computer readable medium, method or system may further comprise the step of using the results from the at least one query as input to a streaming-query. The streaming-query may provide join and windowing operations for event-allocated data-elements of the received data-streams.
An embodiment may comprise the step of removing data-blocks based on a file-deletion operation and updated indices that reference that data block. The file-deletion operation may be a batched operation or a subsequent index-update operation.
In an embodiment, a block-store may require a file-system that supports concurrent updates to directory-structures. The block-store may require atomic writes to data-blocks. The data-blocks of the block-store may be consistent for each query performed after new data-blocks are written. A locking service may be utilized by the file-system. Such a locking service may be utilized in certain embodiments except when the writes to the data-blocks are atomic and writers are notified when a read-update-write transaction fails due to a concurrent write. In some embodiments, a locking service is not utilized.
In some embodiments, a computer readable medium, method or system may comprise flushing pending data-blocks and corresponding index-pages and index-sets. In an embodiment, a block-store may have unconstrained concurrency. The unconstrained concurrency of the block-store may be limited by file-system capabilities.
In an embodiment, a computer readable medium, method or system may further comprise the steps of: compressing the data-blocks, the index-pages, and the index-sets; flushing the compressed data-blocks, index-pages, and index-sets; and decompressing the flushed data-blocks, index-pages, and index-sets.
In accordance with certain embodiments, at least one of the distributed devices may be a distributed storage device, a sensor, or infrastructural equipment. Further, at least one of the indices may be a hash-index, a range-index, an interval-index, or a full-text index. At least one of the block-stores may store data based on an encoding standard or message-transfer syntax. In some embodiments, an Abstract Syntax Notation One (ASN.1) encoding standard or a Distinguished Encoding Rules (DER) message-transfer syntax may be implemented. The Distinguished Encoding Rules (DER) message-transfer syntax may be based on a X.690 International Telecommunication Union (ITU)-T recommendation.
In some embodiments, the computer readable medium, method or system may further comprise the step of filling a buffer with data-elements of the received plurality of data-streams. In addition, the computer readable medium, method or system may comprise the step of flushing the buffer into a file-system. Further, the computer readable medium, method or system may comprise the step of writing the data-elements into the file-system.



BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other objects, features, and advantages of the invention will be apparent from the following more particular description of embodiments as illustrated in the accompanying drawings, in which reference characters refer to the same parts throughout the various views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating principles of the invention.
FIG. 1 is a block diagram illustrating components of an embodiment of a data storing system, in accordance with certain embodiments of the invention.
FIG. 2 is a block diagram illustrating a data-block, in accordance with certain embodiments of the invention.
FIG. 3 is a block diagram illustrating a stream-schema, in accordance with certain embodiments of the invention.
FIG. 4 is a flowchart illustrating index generation and query execution, in accordance with certain embodiments of the invention.
FIG. 5 is a flowchart illustrating steps of an embodiment of a data storing method, in accordance with certain embodiments of the invention.
FIG. 6 is a flowchart illustrating steps of an embodiment of a data storing method, in accordance with certain embodiments of the invention.
FIG. 7 is a flowchart illustrating steps of an embodiment of a data storing method, in accordance with certain embodiments of the invention.
FIG. 8 is a flowchart illustrating steps of an embodiment of a method for querying data-elements based on an index, in accordance with certain embodiments of the invention.
FIG. 9 is a flowchart illustrating steps of an embodiment of a method for filling and flushing a buffer and writing to shared storage, in accordance with certain embodiments of the invention.



DETAILED DESCRIPTION OF THE EMBODIMENTS
Reference will now be made in detail to the embodiments of the presently disclosed invention, examples of which are illustrated in the accompanying drawings.
The term “data element” shall mean a set of binary data containing a unit of information. Examples of data elements include, without limitation, a packet of data flowing across a network; a row returned from a database query; a line in a digital file such as a text file, document file, or log file; an email message; a message system message; a text message; a binary large object; a digitally stored file; an object capable of storage in an object-oriented database; and an image file, music file, or video file. Data elements often, but do not always, represent physical objects such as sections of a DNA molecule, a physical document, or any other binary representation of a real world object.
The term “instructions” shall mean a set of digital data containing steps to be performed by a computing device. Examples of “instructions” include, without limitation, a computer program, macro, or remote procedure call that is executed when an event occurs (such as detection of an input data element that has a high probability of falling within a particular category). For the purposes of this disclosure, “instructions” can include an indication that no operation is to take place, which can be useful when an event that is expected, and has a high likelihood of being harmless, has been detected, as it indicates that such event can be ignored. In certain preferred embodiments, “instructions” may implement state machines.
The term “machine readable storage” shall mean a medium containing random access or read-only memory that is adapted to be read from and/or written to by a computing device having a processor. Examples of machine readable storage shall include, without limitation, random access memory in a computer; random access memory or read only memory in a network device such as a router switch, gateway, network storage device, network security device, or other network device; a CD or DVD formatted to be readable by a hardware device; a thumb drive or memory card formatted to be readable by a hardware device; a computer hard drive; a tape adapted to be readable by a computer tape drive; or other media adapted to store data that can be read by a computer having appropriate hardware and software.
The term “network” or “computer network” shall mean an electronic communications network adapted to enable one or more computing devices to communicate by wired or wireless signals. Examples of networks include, but are not limited to, local area networks (LANs), wide area networks (WANs) such as the Internet, wired TCP and similar networks, wireless networks (including without limitation wireless networks conforming to IEEE 802.11 and the Bluetooth standards), and any other combination of hardware, software, and communications capabilities adapted to allow digital communication between computing devices.
The term “operably connected” shall mean connected either directly or indirectly by one or more cable, wired network, or wireless network connections in such a way that the operably connected components are able to communicate digital data from one to another.
The term “output” shall mean to render (or cause to be rendered) to a human-readable display such as a computer or handheld device screen, to write to (or cause to be written to) a digital file or database, to print (or cause to be printed), or to otherwise generate (or cause to be generated) a copy of information in a non-transient form. The term “output” shall include creation and storage of digital, visual and sound-based representations of information.
The term “server” shall mean a computing device adapted to be operably connected to a network such that it can receive and/or send data to other devices operably connected to the same network, or service requests from such devices. A server has at least one processor and at least one machine-readable storage medium operably connected to that processor, such that the processor can read data from that machine-readable storage.
The term “system” shall mean a plurality of components adapted and arranged as indicated.
The meanings and definitions of other terms used herein shall be apparent to those of ordinary skill in the art based upon the following disclosure.
One of the objects of the present system and method may be an application in which streams of similar data values having a like internal structure are persisted for later retrieval, query and modification. The object for certain embodiments may concern the identification of intrusions in a network monitoring system. Embodiments may not be limited, however, to any one example application. Instead, the embodiments may be applicable in virtually any application in which a substantial stream of discrete units of input data having a common structure are persisted for later retrieval, updating, and deletion. The embodiments of the present system and method are well suited for implementation in a distributed environment in which streams of data are persisted across multiple data storage nodes connected in a network.
FIG. 1 is a block diagram illustrating components of an embodiment of a data storing system, in accordance with certain embodiments of the invention. As shown, such an embodiment may comprise block-stores 1 stored on distributed devices 2. The distributed devices 2 may be adapted to communicate via a network 3. Data-streams 4 may be received from the distributed devices 2. Each of the data-streams 4 may comprise data-elements 5, which may be transmitted via the network 3. The block-stores 1 may store the data-elements 5 of the received data-streams 4. Such stored data-elements 5 may comprise digital copies of the transmitted data-elements 5.
The stored data-elements 5 may be allocated to data-blocks 6 of a block-store 1, as illustrated in FIG. 1. Such block-allocated data-elements 5 may be logically grouped. Each of the block-stores 1 may comprise one or more data-blocks 6. Further, each data-block 6 may comprise the stored data-elements 5 of only one of the received data-streams 4. In addition, the data-blocks 6 of a single data-stream 4 may be logically grouped.
As shown in FIG. 2, a block-identifier 7 may be assigned to each of the data-blocks 6. Such a block-identifier 7 may be globally unique.
The data-blocks 6 may comprise events 8. The block-allocated data-elements 5 may be further allocated to the events 8 of the data-blocks 6. Such event-allocated data-elements 5 may be logically grouped. Each of the data-blocks 6 may comprise one or more events 8. Each of the events 8 may comprise the block-allocated data-elements 5 of the corresponding data-block 6. These event-allocated data-elements 5 may comprise the stored data-elements 5 of only one of the received data-streams 4.
Token-names 9 may be assigned to each of the event-allocated data-elements 5. Each of the event-allocated data-elements 5 may have a token-name 9. The token-names 9 may be human-readable names.
Each of the data-streams 4 may have a stream-schema 10, shown in FIG. 3. Further, each stream-schema 10 may comprise a list 11 of token-names 9 for the event-allocated data-elements 5 of the corresponding data-stream 4. While the list 11 of token-names 9 may be stored in each of the stream-schema 10, the token-names 9 may merely be assigned to the event-allocated data-elements 5 of corresponding data-blocks 6 as opposed to being stored in the data-blocks 6. The event-allocated data-elements 5 of the corresponding data-stream 4 may be capable of being identified based on the list 11 of token-names 9. Each stream-schema 10 may further comprise an index-definition 12 for each corresponding data-stream 4.
In some embodiments, it is unnecessary to store the token-names 9 in the data-blocks 6 because each data-block 6 corresponds to exactly one stream-schema 10, which contains a list 11 of token-names 9. In such embodiments, the identities of the data-elements 5 in each of the events 8 in the data-blocks 6 can be inferred based on the ordering of the data-elements 5 within the event 8 and the ordering of the token-names 9 in the list 11.
FIG. 4 depicts the generation 13 of indices 14 for the event-allocated data-elements 5 based on the corresponding index-definition 12 and the corresponding list 11 of token-names 9. Further, execution 15 of a query 16 for the event-allocated data-elements 5 may be executed in order to retrieve 17 data-elements 5 of the received data-streams 4. Such a query 16 may be based on at least one of the indices 14.
FIG. 5 is a flowchart illustrating steps of an embodiment of a data storing method, in accordance with certain embodiments of the invention. As shown, such an embodiment may comprise the step of receiving 501 data-streams 4 from distributed devices 2. The distributed devices 2 may be connected via a network 3. Each of the data-streams 4 may comprise data-elements 5.
The method may include the step of storing 502 the data-elements 5 of the received data-streams 4. The stored data-elements 5 may be stored in block-stores 1 which may be stored on the distributed devices 2.
Further, the method may include the step of allocating 503 the stored data-elements 5 to data-blocks 6 of the block-stores 1. Each of the block-stores 1 may comprise one or more data-blocks 6. Each data-block 6 may comprise the stored data-elements 5 of only one of the received data-streams 4. The data-blocks 6 of a single data-stream 4 may be logically grouped together. Each of the data-blocks 6 may be read and written as a single unit.
The method may also include assigning 504 a block-identifier 7 to each of the data-blocks 6. The block-identifier 7 may be globally unique.
Further, the method may include allocating 505 the block-allocated data-elements 5 to events 8 of the data-blocks 6. Each of the data-blocks 6 may comprise one or more events 8. Each of the events 8 may comprise the block-allocated data-elements 5 of the corresponding data-block 6.
In addition, the method may include the step of assigning 506 a token-name 9 to each of the event-allocated data-elements 5. Each of the event-allocated data-elements 5 may have a token-name 9. The token-names 9 may be human-readable names.
The method may also comprise reading 507 stream-schemas 10 of the received data-streams 4. Each of the received data-streams 4 may have a stream-schema 10. Each stream-schema 10 may further comprise a list 11 of token-names 9 for the event-allocated data-elements 5 of the corresponding data-stream 4. The event-allocated data-elements 5 of the corresponding data-stream 4 may be capable of being identified based on the list 11 of token-names 9. Each stream-schema 10 may further comprise an index-definition 12 for each corresponding data-stream 4.
In addition, the method may comprise generating 508 indices 14 for the event-allocated data-elements 5 based on the stream-schema 10 of the corresponding data-block 6. This may be based on the corresponding index-definition 12 and the corresponding list 11 of token-names 9 of the stream-schema 10. The method may include the step of executing 509 a query 16 of the event-allocated data-elements 5 based on an index 14, and the step of retrieving 510 the event-allocated data-elements 5 based on results from the query 16. A detailed description of certain embodiments is further discussed below.
Although FIG. 5 illustrates a number of steps in a particular order, steps which are not order-dependent may be reordered and other steps may be combined or broken out. While some reordering or other groupings are specifically mentioned, others will be apparent to those of ordinary skill in the art and so do not present an exhaustive list of alternatives.
For example, FIG. 6 illustrates a flowchart for another embodiment of a data storing method which contains a varied combination of steps. Such an embodiment may comprise the step of receiving 601 data-streams 4 from distributed devices 2. The distributed devices 2 may be connected via a network 3. Each of the data-streams 4 may comprise data-elements 5. The method may include the step of storing 602 the data-elements 5 of the received data-streams 4. The stored data-elements 5 may be stored in block-stores 1. The block-stores 1 may be stored on the distributed devices 2.
The method may also comprise reading 603 stream-schemas 10 of the received data-streams 4. Each of the received data-streams 4 may have a stream-schema 10. Each stream-schema 10 may further comprise a list 11 of token-names 9 which may be allocated for the event-allocated data-elements 5 of the corresponding data-stream 4. The event-allocated data-elements 5 of the corresponding data-stream 4 may be capable of being identified based on the list 11 of token-names 9. Each stream-schema 10 may further comprise an index-definition 12 for each corresponding data-stream 4.
The method may also include assigning 604 a block-identifier 7 to each of the data-blocks 6. The block-identifier 7 may be globally unique.
Further, the method may include the step of allocating 605 the stored data-elements 5 to data-blocks 6 of the block-stores 1. Each of the block-stores 1 may comprise one or more data-blocks 6. Each data-block 6 may comprise the stored data-elements 5 of only one of the received data-streams 4. The data-blocks 6 of a single data-stream 4 may be logically grouped together. Each of the data-blocks 6 may be read and written as a single unit.
Further, the method may include allocating 606 the block-allocated data-elements 5 to events 8 of the data-blocks 6. Each of the data-blocks 6 may comprise one or more events 8. Each of the events 8 may comprise the block-allocated data-elements 5 of the corresponding data-block 6.
In addition, the method may include the step of assigning 607 a token-name 9 to each of the event-allocated data-elements 5. Each of the event-allocated data-elements 5 may have a token-name 9. The token-names 9 may be human-readable names.
In addition, the method may comprise updating or generating 608 indices 14 for the event-allocated data-elements 5 based on the stream-schema 10 of the corresponding data-block 6. This may be based on the corresponding index-definition 12 and the corresponding list 11 of token-names 9 of the stream-schema 10.
In some embodiments, the method may also include the step of executing a query 16 of the event-allocated data-elements 5 based on an index 14, and the step of retrieving the event-allocated data-elements 5 based on results from the query 16. These steps may be performed independently for the steps described above and illustrated in FIG. 6. The steps may be reordered and may be combined or broken out, as would be apparent to those of ordinary skill in the art. The embodiments illustrated in the figures do not present an exhaustive list of alternatives.
In yet another embodiment, a data storing method may comprise the steps shown in FIG. 7. These steps include receiving 701 data-streams 4 from distributed devices 2; storing 702 the data-elements 5 of the received data-streams 4; and, assigning 703 a block-identifier 7 to each of the data-blocks 6. Further, the steps may include allocating 704 the stored data-elements 5 to data-blocks 6 of the block-stores 1 and allocating 705 the block-allocated data-elements 5 to events 8 of the data-blocks 6. In addition, the method may include the step of updating or generating 706 indices 14 for the event-allocated data-elements 5 based on the order of the event-allocated data-elements 5 in each event 8. In such an embodiment, the data-streams 4 may have only one stream-schema 10 and token-names 9 may not necessarily need to be assigned to the event-allocated data-elements 5 of corresponding data-blocks 6. The identity of stored data-elements 5 of the received data-streams 4 may be inferred from the order of the event-allocated data-elements 5 in each event 8.
Streaming Block Store
The streaming block store 1 may be embodied in a system or method for persisting stream-oriented data in a highly scalable, efficient manner while retaining the ability to efficiently retrieve data previously written. While this write-optimized store 1 may be designed to work over any kind of file system, the internal indexing structures and algorithms may be designed to work well with distributed file systems.
A block store 1 may comprise multiple data streams 4. A data stream 4 may be conceptually similar to a table in a traditional SQL database in that a stream houses related data having some known structure. Each stream 4 consists of multiple events 8, which may be individual items within the stream 4. Each event 8 within the stream 4 follows a schema 10 that describes the structure of events 8 within the stream 4 and contains metadata about the stream 4. For each stream 4, the schema 10 defines a list 11 of token names 9 that allow accessing data elements 5 within an event 8 by a human-readable name. An event 8 therefore can be thought of as data structure that maps token names 9 to data values. Unlike a traditional SQL database, there may be no type restrictions for data values, as data values between events 8 in a stream 4 may vary by type and data values may contain compound data such as lists or even full objects.
A core concept of the streaming block store 1 is the data block 6, the minimal data unit that may be processed by the block store 1. Similar to blocks in traditional file systems, a data block 6 may contain a logical grouping of data from a single stream 4 that may be kept together and read/written as a single unit. Upon creation of a data-block 6, a writer 21 assigns each data block 6 a globally unique identifier known as the block identifier 7.
As the block store 1 may be designed for distributed systems, it may support concurrent readers 22 and writers 21. In the block store 1, any node in the distributed system may insert data into the store 1 as long as that node has write access to the underlying file system used by the block store 1. In an embodiment, when a node receives a request to write data from a particular stream, the node may first read schema information 10 for the stream 4 and may allocate local memory to buffer incoming events for that stream 4. Each node may cache stream-schema metadata 10 so that subsequent write requests for a stream 4 do not incur reads from the underlying file system.
Nodes acting as writers 21 continually fill local buffers 20 until they reach the block size, a configurable per-stream parameter that specifies the maximum size for data blocks 6 within a stream 4. After the buffer 20 is full, it may be flushed out to the underlying file system or shared storage and may be reused for any new incoming data. A pending buffer 20 may also be flushed 902 in order to make the data in the pending buffer 20 visible to other nodes, as described below. For each stream 4, nodes may choose to allocate more than one buffer 20 to each stream 4 to accommodate concurrent writers 21 within the same node.
Data Indexes
Contained within the stream schema 10 may be an index definition 12 for each index 14 configured for the stream 4. These indexes 14 may be analogous to their counterparts in traditional SQL databases. Nodes may use these indexes 14 to efficiently trim down the set of data blocks 6 that are to be read to satisfy a given query 16.
As shown in FIG. 8, indexes 14 which may be used to query 802 and retrieve 803 data-elements may be updated or generated 801 with two-tiers of special data blocks 6: index-pages 18 and index-sets 19. Both of these types of data blocks 6 also follow the block size constraint set in the stream-schema 10. Index pages 18 may be maintained by each writer 21 and contain summarized data for each completed data block 6. In order to minimize the amount of data read by querying nodes, index pages 18 summarize data for more than one data block 6. When index pages 18 are full or flushed out to the underlying file system, a summary of the index page 18 may be added to the top-level index set 19 that contains root-level summary information for all index pages 18 for that writer 21.
Querying Data
The block store structure does not limit what types of query mechanisms can be provided. The block store 1 may provide a “NoSQL”-type interface by exposing an API for directly manipulating data or a more traditional query interface created by translating string expressions into a sequence of operations that satisfy a query 16.
In the block store 1, any node in the distributed system may act as a query processor as long as the node can access index sets 19, index pages 18, and data blocks 6 in the underlying file system.
The mechanism for querying data may be straightforward. Each query 16 has a set of constraints that control which data in the stream 4 is returned. A query processor may translate these constraints in the form of a Boolean expression in either product-of-sums or sum-of-products form so that each individual expression may be processed independently. For each expression in the constraint, the query processor will analyze the expression to see if an index 14 can be used to provide a set of candidate data blocks 6 that contain matching events 8 for that expression. If an index 14 cannot be used for the expression, the candidate set of data blocks 6 for the expression may be set to all available data blocks 6 in the stream 4. Once the query processor has assembled the entire set of candidate data blocks 6, it fetches those data blocks 6 and evaluates the entire query expression against the data set.
In addition to the straightforward query mechanism described above, the output of a query 16 may be used as input to a streaming query processing system to provide join and windowing operations over the persisted stream data.
Deleting Data
Writers 21 that need to remove data from the block store 1 may do so by extending the query procedure above with an additional step where an updated version of the data block 6 with some events removed may be rewritten to the underlying file system. This operation does not need to rewrite any index pages 18 as any false positives of candidate data blocks 6 returned from the index 14 will be ignored once the query expression is evaluated against the actual data block 6.
The block store 1 supports a more efficient removal operation in the form of removing whole data blocks 6. This deletion operation requires a file deletion operation in the underlying file system along with an update of all indexes that reference that data block 6. For efficiency, the index update operation may be batched or performed lazily on the next index update operation. This operation can be very advantageous for systems that receive incoming data in temporal order and have strict time-based data retention requirements.
Underlying File System Requirements
The block store 1 requires the underlying file system support concurrent updates to directory structures without corrupting data. For proper query operations, the block store 1 requires that writes to data blocks 6 are atomic so that other query nodes do not see data blocks 6 in an inconsistent state after new data blocks are written.
In some embodiments, m-file systems support these constraints directly or with the addition of an optional locking service. The block store 1 may be usable with a wide variety of file system implementations.
Consistency Model
The block store 1 provides clients with a relaxed consistency model for events 8 spanning multiple data blocks 6 and writers 21. The additional layers of buffering will cause data to become available only after each data block 6 reaches the block size and is flushed to disk. Data which remains buffered for a long period of time may not be visible to other nodes. To avoid such situations, writers 21 can optionally flush pending data blocks 6 along with appropriate index page 18 and index set 19 updates to the underlying file system.
In an embodiment shown in FIG. 9, a writer 21 may fill 901 a buffer 20 with data-elements 5 of the received data-streams 4. When the buffer 20 is full, the buffer 20 may be flushed 902 out to the underlying file system. A pending buffer 20 may also be flushed 902 in order to make the data in the pending buffer 20 visible to other nodes, as described above. The buffer 20 may be flushed 902 by the writer 21. The method may also include the step of writing 903 data-elements 5 into the file-system, shared storage or data-stream 4. The data may be written 903 to the shared storage by the writer 21.
The previously described steps of generating or updating 508, 608 and 706 indices 14 may occur after a data-block 6 or buffer 20 is full and the data is published to a stream 4. Alternatively, this step of generating or updating indices 14 may occur independently and concurrently with changes to individual data blocks 6.
The exact nature of the visibility of writes depends on the behavior of the underlying file system. Most common file systems will provide an “eventual consistency” model.
A writer 21 may provide sequential consistency to clients for data residing on a single data block 6 by using standard locking mechanisms. In an embodiment, locking mechanisms may be an optional service so long as writes are atomic and writers 21 are notified if a read-update-write transaction fails due to a concurrent write. In some embodiments, a locking service may be not utilized.
Concurrency
The block store 1 provides no constraints on concurrency in terms of the number of concurrent readers 22 and writers 21 operating on streams. In practice, the concurrency of the block store 6 will be limited by the capabilities of the underlying file system.
Compression
For certain types of stream data it may be advantageous to compress data blocks 6, index pages 18, and index sets 19. This can be done before flushing each of these items to the underlying file system and by decompressing each item when it is read out of the underlying file system.
Index Types
The block store 1 supports any type of index 14 that conforms to the requirements listed above. The following index types are known to work well in the block store 1.
Hash Index:
A hash index 14 tracks values within a stream 4 and can be used to efficiently fetch all events 8 containing a particular value. Index pages 18 for this type may comprise a list of data values, where each data value may be associated with a list of data block identifiers for data blocks 6 containing that data value. Index sets 19 for this type may comprise a list of index page 18 identifiers associated with a Bloom filter that encodes which data values are reachable from the given index page 18.
Range Index:
A range index 14 tracks value ranges within a stream 4 and can be used to efficiently fetch all events 8 that lie between two particular values. Index pages 18 for this type may comprise a list of data values, where each data value may be associated with a list of data block identifiers for data blocks 6 containing that data value. Index sets 19 for this type may comprise a list of index page 18 identifiers associated with the minimum and maximum data values reachable from the given index page 18.
Interval Index:
An interval index 14 tracks events 8 associated with some interval and can be used to efficiently fetch all events 8 that intersect some given range. Index pages 18 and index sets 19 for this type may be any appropriate hierarchical multidimensional index 14, where the index sets 19 contain root-level information and index pages 18 contain subsequent children for the root-level information in the index 14.
Full-Text Index:
A full-text index 14 tracks textual information within a stream 4 and can be used to efficiently perform keyword searches on stream data. Index pages 18 for this type contain an inverted index that maps keywords to data block identifiers for data blocks containing that keyword, along with any other ranking metadata needed by the information retrieval library being used. Index sets 19 for this type contain a list of index page 18 identifiers and any available root-level aggregation structure supported by the information retrieval library.
Serialized Data Representation
For storing data inside data blocks 6, index pages 18, and index sets 19 in certain embodiments, the block store 1 may make use of an encoding standard or message-transfer syntax. In some embodiments, the encodings may use an Abstract Syntax Notation One (ASN.1) encoding standard or may use the Distinguished Encoding Rules (DER) message-transfer syntax defined in a X.690 International Telecommunication Union (ITU)-T recommendation.
Within the underlying file system, the block store 1 may store data blocks 6 of the above types in well-known directories. In accordance with embodiments of the block store 1, each stream 4 may be housed in a directory underneath a main Streams directory with the directory name indicating the name of the stream 4. Within the Streams directory, schema metadata 10 may be stored in a file named schema. Data blocks 6 may be stored underneath the stream directory in a directory named blocks.
In an embodiment, index data may be stored underneath the stream directory in a directory named index. Each index 14 defined in the schema 10 may be assigned a number and all data for that index 14 resides underneath the index directory in a directory with the name of the index number. Index pages 18 may be stored underneath each index directory in a directory named data. Index sets 19 may be stored as files with the name of the file set to the globally unique identifier of the writer 21 for that index. These index set files may be stored in a directory named sets underneath each index directory.
In an embodiment, in order to reduce overhead of maintaining directory listings for streams 4 consisting of large numbers of data and index pages 18, the block store 1 may shard the block identifiers across multiple directories. This is especially effective for file systems whose performance degrades after tens of thousands of files are present in a single directory.
It will be understood by those of ordinary skill in the art that the pseudo-embodiments described herein are representative of preferred embodiments of the present invention and are not limitative thereof.
In an embodiment, a system for persisting streams 4 of data in a distributed computing environment may comprise a plurality of data storage devices 2. Each device 2 may be connected to a network 3 and may comprise a processor and a data store 1. The processors may be adapted to store a plurality of data streams 4 in block stores 1 on the data storage devices 2. Each block store 1 may comprise data blocks 6. The blocks 6 may have a globally unique block identifier 7. The data blocks 6 may comprise a plurality of events 8. The events 8 may comprise a plurality of data elements 5 identified by token names 9. The block store 1 may further comprise a schema 10 identifying the data elements 5 and at least one index 14 based on the schema 10. The system may be capable of storing data elements 5 from the data streams 4 in a plurality of the blocks 6 and accessing and updating the data elements 5 through the index 14.
In an embodiment, a computer readable medium containing executable instructions for a system for persisting streams 4 of data in a distributed computing environment may comprise a plurality of data storage devices 2. Each device 2 may connect to a network 3 and may comprise a processor capable of executing said instructions. A data store 1 may comprise instructions directing the processors to store a plurality of data streams 4 in block stores 1 on the data storage devices 2. Each block store 1 may comprise data blocks 6. The blocks 6 may have a globally unique block identifier 7. The data blocks 6 may comprise a plurality of events 8. The events 8 may comprise a plurality of data elements 5 identified by token names 9. The block store 1 may further comprise a schema 10 identifying the data elements 5 and at least one index 14 based on the schema 10. The system may be capable of storing data elements 5 from the data streams 4 in a plurality of the blocks 6 and accessing and updating the data elements 5 through the index 14.
Although some of the drawings illustrate a number of operations in a particular order, operations which are not order-dependent may be reordered and other operations may be combined or broken out. While some reordering or other groupings are specifically mentioned, others will be apparent to those of ordinary skill in the art and so do not present an exhaustive list of alternatives. Moreover, it should be recognized that the stages could be implemented in hardware, firmware, software or any combination thereof. The term “adapted” when used in this application shall mean programmed, configured, dimensioned, oriented and arranged as appropriate to the purpose or function described.
While the invention has been particularly shown and described with reference to an embodiment thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

## Claims

1. A method for storing data, comprising the steps of:
receiving a plurality of data-streams, wherein the plurality of data-streams are received from a plurality of distributed devices, wherein the plurality of distributed devices are connected via a network, wherein each one of the plurality of data-streams comprise data-elements;
storing the data-elements of the received plurality of data-streams, wherein the stored data-elements are stored in a plurality of block-stores, wherein the block-stores are stored on the plurality of distributed devices;
assigning block-identifiers to data-blocks of the block-stores, wherein the block-identifiers are globally unique, wherein each of the block-stores comprises one or more data-blocks, wherein the data-blocks of a single data-stream are logically grouped, and wherein each of the data-blocks are read and written as a single unit;
allocating the stored data-elements to the data-blocks of the block-stores, wherein each data-block comprises the stored data-elements of only one of the received plurality of data-streams;
further allocating the block-allocated data-elements to events of the data-blocks, wherein each of the data-blocks comprise one or more events, wherein each of the events comprises the block-allocated data-elements of the corresponding data-block; and,
generating indices for the event-allocated data-elements.

2. The method of claim 1, wherein each of the received plurality of data-streams has a stream-schema, wherein each of the stream-schema is the same, and wherein the indices are generated based on the order of the event-allocated data-elements in each event.

3. The method of claim 1, further comprising the steps of:
reading stream-schema of the received plurality of data-streams, wherein each stream-schema comprises a list of token-names for the event-allocated data-elements of the corresponding data-stream, wherein the event-allocated data-elements of the corresponding data-stream are capable of being identified based on the list of token-names; and,
assigning to each of the event-allocated data-elements a token-name, wherein the token-names are human-readable names,
wherein the indices are generated based on the stream-schema.

4. The method of claim 1, wherein the generated indices have index-pages and index-sets based on stream-schema of the received plurality of data-streams.

5. The method of claim 1, further comprising the steps of:
executing at least one query of the event-allocated data-elements based on at least one of the generated indices; and,
retrieving the event-allocated data-elements based on results from at least one of the executed query.

6. The method of claim 1, wherein each of the plurality of block-stores stores the stored data-elements of two or more of the received plurality of data-streams.

7. The method of claim 3, wherein each stream-schema further comprises an index-definition for configuring generated indices for each corresponding data-stream, wherein the generated indices have index-pages and index-sets based on index-definitions of the corresponding stream-schema.

8. The method of claim 7, wherein each of the index-pages further comprises data-block references based on the block-identifiers for the corresponding data-blocks.

9. The method of claim 7, wherein the index-page further comprises page-data summarized-information of the data-blocks of the corresponding data-stream, and wherein the index-set further comprises root-data summarized-information of the index-pages of the corresponding index-definition.

10. The method of claim 1, wherein the data-elements have a common structure.

11. The method of claim 10, wherein the common structure of the data-elements is an unrestricted-structure.

12. The method of claim 10, wherein each stream-schema corresponds to a common structure of each of the events of the corresponding data-stream.

13. The method of claim 1, wherein the data-elements have different structures, wherein each stream-schema corresponds to varying structures of the events of the corresponding data-streams.

14. The method of claim 1, wherein the stored data-elements comprise compound-data.

15. The method of claim 14, wherein the compound-data is selected from a group consisting of lists and objects.

16. The method of claim 1, wherein the block-stores support concurrent readers and writers.

17. The method of claim 1, wherein the data-elements that are received from a distributed device are stored in a targeted block-store only when the distributed device has write-access to a file-system utilized by the targeted block-store.

18. The method of claim 3, further comprising the steps of:
receiving a request to write data of a data-stream from a distributed device;
reading the stream-schema of the received data-stream;
allocating local-memory to buffer each of the events of the corresponding data-stream; and
caching metadata of the stream-schema.

19. The method of claim 3, further comprising the step of:
caching metadata of the stream-schema of the received plurality of data-streams, wherein each stream-schema comprises metadata for the corresponding data-stream.

20. The method of claim 1, further comprising the steps of:
filling a buffer until the buffer reaches a maximum block-size provided by the block-size information for the data-blocks of the corresponding data-stream, wherein each stream-schema comprises block-size information for the data-blocks of the corresponding data-stream, wherein the block-size information provides a maximum block-size for data-blocks within the corresponding data-stream; and
flushing the buffer into a file-system utilized by the targeted block-store, wherein the buffer is capable of being reused for the data-elements of the received plurality of data-streams.

21. The method of claim 1, further comprising the step of:
allocating more than one buffer to a single data-stream, wherein concurrent-writers are utilized in the same distributed device.

22. The method of claim 1, comprising the step of:
performing a transaction on the event-allocated data-elements, wherein the transaction is one transaction selected from the group consisting of querying, retrieving, accessing, updating, and deleting.

23. The method of claim 7, further comprising the steps of:
executing a query of the event-allocated data-elements based on a Boolean-expression; and,
retrieving a result set of event-allocated data-elements based on results of the executed query.

24. The method of claim 23, wherein the Boolean-expression is selected from a group consisting of a product-of-sums expression and a sum-of-products expression.

25. The method of claim 23, wherein the step of executing a query comprises the steps of:
identifying the index-definitions which reference token-names that match token-name constraints of a Boolean-expression of a query for the event-allocated data-elements, wherein the index-definitions reference a subset of the list of token-names of the corresponding stream-schema, wherein the referenced token-names of the index-definitions are compared to the token-name constraints of the Boolean-expression;
determining a candidate set of index-pages based on the identified index-definitions, wherein the index-sets of the generated indices that match the configuration of the corresponding identified index-definitions are compared to index-set constraints of the Boolean-expression;
determining a candidate set of data-blocks based on the candidate set of index-pages; wherein the candidate set of index-pages are compared to index-page constraints of the Boolean-expression; and,
determining the result set of event-allocated data-elements based on the candidate set of data-blocks, wherein the candidate set of data-blocks are compared to data-blocks constraints of the Boolean-expression,
wherein the result set of event-allocated data-elements comprise a maximal set of event-allocated data-elements that satisfy the Boolean-expression of the executed query.

26. The method of claim 25, further comprising the step of:
only if the referenced token-names of the index-definitions fail to match the token-name constraints of the Boolean-expression, setting a candidate set of data-blocks to comprise all data-blocks in the corresponding data-stream.

27. The method of claim 25, further comprising the steps of:
evaluating the candidate set of data-blocks based on the Boolean-expression; and,
ignoring false-positives returned from the executed query, wherein event-allocated data-elements that fail to satisfy the Boolean-expression are removed from the result set of event-allocated data-elements.

28. The method of claim 25, further comprising the steps of:
updating at least one of the candidate set of data-blocks, wherein the index-page referencing the at least one of the candidate set of data-blocks is updated, wherein the index-set referencing the updated index-page is updated, wherein at least one of the data-elements of the result set of event-allocated data-elements is updated, wherein the update for the data-element is selected from a group consisting of a deletion of an event-allocated data-element, an insertion of an event-allocated data-element, or a modification of an event-allocated data-element.

29. The method of claim 5, further comprising the step of:
using the results from the at least one query as input to a streaming-query, wherein the streaming-query provides join and windowing operations for event-allocated data-elements of the received plurality of data-streams.

30. The method of claim 1, further comprising the step of:
removing data-blocks based on a file-deletion operation and updated indices that reference that data block.

31. The method of claim 30, wherein the file-deletion operation is a batched operation.

32. The method of claim 30, wherein the file-deletion operation is performed on a subsequent index-update operation.

33. The method of claim 1, wherein at least one of the block-stores requires a file-system that supports concurrent updates to directory-structures, wherein the at least one of the block-stores requires that writes to data-blocks are atomic, wherein the data-blocks of the at least one of block-stores are consistent for each query performed after new data-blocks are written.

34. The method of claim 33, wherein a locking service is utilized by the file-system.

35. A method of claim 34, wherein the locking service is utilized except when the writes to the data-blocks are atomic and writers are notified when a read-update-write transaction fails due to a concurrent write.

36. The method of claim 7, furthering comprising the step of:
flushing pending data-blocks and corresponding index-pages and index-sets.

37. The method of claim 1, wherein at least one of the block-stores has unconstrained concurrency, wherein the unconstrained concurrency of the at least one of the block-stores is limited by file-system capabilities.

38. The method of claim 1, further comprising the steps of:
compressing the data-blocks, the index-pages and the index-sets;
flushing the compressed data-blocks, index-pages and index-sets; and
decompressing the flushed data-blocks, index-pages and index-sets.

39. The method of claim 1, wherein at least one of the plurality of distributed devices is a distributed storage device.

40. The method of claim 1, wherein at least one of the plurality of distributed devices is a sensor.

41. The method of claim 1, wherein at least one of the plurality of distributed devices is an infrastructural equipment.

42. The method of claim 1, wherein at least one of the indices is a hash-index.

43. The method of claim 1, wherein at least one of the indices is a range-index.

44. The method of claim 1, wherein at least one of the indices is an interval-index.

45. The method of claim 1, wherein at least one of the indices is a full-text index.

46. The method of claim 1, wherein at least one of the block-stores stores data based on an encoding standard.

47. The method of claim 46, wherein the encoding standard is an Abstract Syntax Notation One (ASN.1) encoding standard.

48. The method of claim 1, wherein at least one of the block-stores stores data based on a message-transfer syntax.

49. The method of claim 48, wherein the message-transfer syntax is a Distinguished Encoding Rules (DER) message-transfer syntax.

50. The method of claim 49, wherein the Distinguished Encoding Rules (DER) message-transfer syntax is based on a X.690 International Telecommunication Union (ITU)-T recommendation.

51. The method of claim 1, further comprising the steps of:
filling a buffer with data-elements of the received plurality of data-streams;
flushing the buffer into a file-system; and,
writing the data-elements into the file-system.

52. A system for storing data, comprising:
a plurality of block-stores stored on a plurality of distributed devices, the plurality of distributed devices adapted to communicate via a network, the plurality of block-stores storing data-elements received via a plurality of data-streams from the plurality of distributed devices;
block-identifiers assigned to data-blocks of the block-stores, each of the block-stores comprising one or more data-blocks, the stored data-elements allocated to the one or more data-blocks of the block-stores, each data-block comprising the stored data-elements of only one of the received plurality of data-streams;
events of the one or more data-blocks, the block-allocated data-elements further allocated to the events of the data-blocks, each of the data-blocks comprise one or more events; and,
indices generated for the event-allocated data-elements.

53. The system of claim 52, the data-blocks of a single data-stream are logically grouped.

54. The system of claim 52, each of the data-blocks are read and written as a single unit.

55. The system of claim 52, the block-identifiers being globally unique.

56. The system of claim 52, further comprising:
stream-schema of the received plurality of data-streams, each of the received plurality of data-streams having the same stream-schema, the generated indices based on the order of the event-allocated data-elements in each event.

57. The system of claim 52, further comprising:
stream-schema of the received plurality of data-streams, each of the received plurality of data-streams having a stream-schema, each stream-schema comprising a list of token-names for the event-allocated data-elements of the corresponding data-stream, the event-allocated data-elements of the corresponding data-stream being capable of being identified based on the list of token-names, wherein each stream-schema further comprises an index-definition for configuring generated indices for each corresponding data-stream; and,
token-names assigned to each of the event-allocated data-elements, each one of the event-allocated data-elements has a token-name, the token-names being human-readable names, the generated indices based on the corresponding index-definition and the corresponding list of token-names.

58. A non-transitory computer readable medium having computer readable instructions stored thereon for execution by a processor, wherein the instructions on the non-transitory computer readable medium are adapted to:
receive a plurality of data-streams, wherein the plurality of data-streams are received from a plurality of distributed devices, wherein the plurality of distributed devices are connected via a network, wherein each one of the plurality of data-streams comprise data-elements;
store the data-elements of the received plurality of data-streams, wherein the stored data-elements are stored in a plurality of block-stores, wherein the block-stores are stored on the plurality of distributed devices;
assign block-identifiers to data-blocks of the block-stores, wherein the block-identifiers are globally unique, wherein each of the block-stores comprises one or more data-blocks, wherein the data-blocks of a single data-stream are logically grouped, and wherein each of the data-blocks are read and written as a single unit;
allocate the stored data-elements to the data-blocks of the block-stores, wherein each data-block comprises the stored data-elements of only one of the received plurality of data-streams;
further allocate the block-allocated data-elements to events of the data-blocks, wherein each of the data-blocks comprise one or more events, wherein each of the events comprises the block-allocated data-elements of the corresponding data-block; and,
generate indices for the event-allocated data-elements.