The present technology pertains to storing state object data, and more specifically to tracking state object data at a high rate utilizing agnostic hardware and minimal storage space.
Tracking state object data can be difficult in different environments based on the number of state objects, rate of incoming state objects, data retention periods, purging state objects, data index, and hardware limitations, to name a few. In a networked forwarding environment, (e.g., Border Gateway Protocol (BGP) Monitoring Protocol (BMP)) an entire forwarding or routing table can be conveyed whenever a connection (e.g., peer) is established or refreshed. This can equate to duplicate entries along with changed entries. An average IPv4 Internet peer has over 700,000 Network Layer Reachability Information (NRLI). The average service provider transit peering router has approximately 25-50 peers. Over 17,500,000 NLRIs are sent when a connection is established. The average service provider can have hundreds of Internet transit and peering edge routers. The number of NLRIs to maintain are well into the billions when we maintained at a per router and per peer basis.
Further, memory costs more than disk and network implementers demand that memory usage be kept low (e.g., in the 1 GB or less range) without sacrificing real-time processing of incoming NLRI updates. There are currently no disk based trees or data store implementation able to maintain (e.g., search, insert, update, delete, etc.) millions of objects at sustained rates of 50,000 or greater per second.
In order to describe the manner in which the above-recited and other advantages and features of the disclosure can be obtained, a more particular description of the principles briefly described above will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. Understanding that these drawings depict only exemplary embodiments of the disclosure and are not therefore to be considered to be limiting of its scope, the principles herein are described and explained with additional specificity and detail through the use of the accompanying drawings in which:
Various embodiments of the disclosure are discussed in detail below. While specific implementations are discussed, it should be understood that this is done for illustration purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without parting from the spirit and scope of the disclosure.
Various embodiments of the disclosure are discussed in detail below. While specific implementations are discussed, it should be understood that this is done for illustration purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without parting from the spirit and scope of the disclosure. Thus, the following description and drawings are illustrative and are not to be construed as limiting. Numerous specific details are described to provide a thorough understanding of the disclosure. However, in certain instances, well-known or conventional details are not described in order to avoid obscuring the description. References to one or an embodiment in the present disclosure can be references to the same embodiment or any embodiment; and, such references mean at least one of the embodiments.
Reference to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the disclosure. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Moreover, various features are described which may be exhibited by some embodiments and not by others.
The terms used in this specification generally have their ordinary meanings in the art, within the context of the disclosure, and in the specific context where each term is used. Alternative language and synonyms may be used for any one or more of the terms discussed herein, and no special significance should be placed upon whether or not a term is elaborated or discussed herein. In some cases, synonyms for certain terms are provided. A recital of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification including examples of any terms discussed herein is illustrative only, and is not intended to further limit the scope and meaning of the disclosure or of any example term. Likewise, the disclosure is not limited to various embodiments given in this specification.
Without intent to limit the scope of the disclosure, examples of instruments, apparatus, methods and their related results according to the embodiments of the present disclosure are given below. Note that titles or subtitles may be used in the examples for convenience of a reader, which in no way should limit the scope of the disclosure. Unless otherwise defined, technical and scientific terms used herein have the meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. In the case of conflict, the present document, including definitions will control.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or can be learned by practice of the herein disclosed principles. The features and advantages of the disclosure can be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. These and other features of the disclosure will become more fully apparent from the following description and appended claims, or can be learned by the practice of the principles set forth herein.
The disclosed technology addresses the need in the art for fast and efficient storage of large quantities of state data that are constantly updated. The present technology involves systems, methods and computer-readable media for efficiently and effectively storing and updating state objects by utilizing an index file structure, data object structure and a modified ternary tree implementation.
A description of network environments and architectures for state object state store, as illustrated in
Cloud 102 can provide various cloud computing services via the Cloud Elements 104-116, such as storage as a service (STaaS) (e.g., hosted storage, etc.), software as a service (SaaS) (e.g., collaboration services, email services, enterprise resource planning services, content services, communication services, etc.), infrastructure as a service (IaaS) (e.g., security services, networking services, systems management services, etc.), platform as a service (PaaS) (e.g., web services, streaming services, application development services, etc.), and other types of services such as desktop as a service (DaaS), information technology management as a service (ITaaS), managed software as a service (MSaaS), mobile backend as a service (MBaaS), etc.
Client Endpoints 118 can connect with Cloud 102 to obtain one or more specific services from Cloud 102. Client Endpoints 118 can communicate with Elements 104-114 via one or more public networks (e.g., Internet), private networks, and/or hybrid networks (e.g., virtual private network). Client Endpoints 118 can include any device with networking capabilities, such as a router, a switch, a laptop computer, a tablet computer, a server, a desktop computer, a smartphone, a network device (e.g., an access point, a router, a switch, etc.), a smart television, a smart car, a sensor, a GPS device, a game system, a smart wearable object (e.g., smartwatch, etc.), a consumer object (e.g., Internet refrigerator, smart lighting system, etc.), a city or transportation system (e.g., traffic control, toll collection system, etc.), an internet of things (IoT) device, a camera, a network printer, a transportation system (e.g., airplane, train, motorcycle, boat, etc.), or any smart or connected object (e.g., smart home, smart building, smart retail, smart glasses, etc.), and so forth.
One such Application or Service 110 can include a State Object Data Store (SODS). SODS can be configured to store billions of objects through multiple SODS instances. SODS can store and track these objects at a high rate (e.g., 100,000 objects per second). SODS can store and track objects at the same rates across different hardware capabilities (e.g., hardware agnostic). Each SODS instance can run multiple threads, where a single thread can scale to 20,000 search/insert/update/delete operations per second while running on agnostic hardware (e.g., average inexpensive disks—7200 rpm to solid state drives). For example, based on the object alignment and strategies illustrated in
In a general sense, the object data is a current state and does not include historical data. For example, every time a new state comes in the current state can be replaced or updated (e.g., the data object is updated based on the previous object, such as updating a counter based on the previous value to the new value). In some examples, the object including the current state is retrieved and one or more operations can be performed with the current state and new state (e.g., received data). For example, a difference (e.g., diff) can be determined between the current state and the new state, with the difference being stored in place of the current state. In other non-limiting examples, the operation can be an absolute diff, subtraction, a replacement, delta, delete, non-operation (previous and new data the same) etc.
A seek or look-up of the object data can performed based on an index file, which is illustrated below in
The SODS tree implementation can be favored toward ‘in-place updates and deletions’ over ‘compression and balancing’. To achieve this, a ternary search tree can be modified by using two different type of nodes: an interim node and an a final node. Both node types are similar with the exception that the final node can have an extra 8 bytes to convey the data offset pointer. The data offset is an offset within the data file to read the data object. This enables direct location access (e.g., seek) to the data object within a potentially large data file.
The concept of a leaf node is not present in SODS tree implementation. A final node is not a leaf node as it can have children, but a final node will not have a down child as the final node is the last down node.
The SODS tree implementation enables simple and fast deleting keys/objects operations since re-pinning pointers to children nodes is not a requirement and the fixed size of the node enables re-use of the nodes.
Each node, in the SODS tree implementation, references other children nodes by indicating the file offset pointer, instead of memory pointer. While this is used for disk files, memory can still be used and the size of the pointer can be adjusted to a memory implementation.
In the SODS tree implementation, the index file is not expected to be greater than approximately 4 gigabytes (e.g., no data is stored in the index file). This enables 4-octet children file offset pointers. The data file is can to be larger than 4 GB, requiring the data offset pointer to be 8-octets. To save disk space, the final node is the only node that can contain the extra 8-octet data pointer (e.g., because that is where the data is stored).
Each node can have 3 offset pointers for children. For example, a down offset pointer (e.g., equal) to the next node in the key position level. A search moves to the next key by going down; a branch 1 next node (e.g., left) at the same key position level has a lower key than current node; and a branch 2 next node (e.g., right) at the same key position level that has a higher key than current node.
As shown in
In environments where large quantities of data are stored and updated, the ability for the data to grow opposed to being deleted and then reclaimed can add in storage efficiencies and speed. As shown in
For example, an AS_PATH might grow or shrink for a prefix. The frequent updates (and change in size) is enabled by introducing two length values for each data object. Each data object can have a ‘length used’ value and a ‘length allocated’ value. The actual disk size of the data object is based on the allocated length. For example, AS_PATH can initially be 100 bytes, the ‘length used’ would be 100, but since the path is expected to grow and shrink the allocation could be 300 bytes. The disk usage for the data object would include 300 bytes for data. Subsequently, the object can be updated where the object can grow up to 300 bytes (and shrink as well).
The size of the ‘length allocated’ can be based on the implementation of the data type (e.g., needs and/or expectations). The implementation can dynamically size the ‘length allocated’ based on ‘length used’ in order to not waste disk space. In some examples, the ‘length allocated’ can be determined by a growth factor (e.g., a number times the ‘length used’ value). For example, a growth size of 2× and ‘length used’ of 5 bytes would equate to a ‘length allocated’ of 10 bytes. It is important to determine the appropriate ‘length allocated’ because and over estimate can waste storage space and an under estimate objects will have to be moved to accommodate outgrowing the ‘length allocated.’
Index Node 334 can include a plurality of field descriptions as illustrated in
The Type field can include 1-octet type describes the value encoding for the object. The Flag field can include 1-octet used for flags, for example, Bit 7: Object is marked for deletion. The Key Count field can include 1-octet value indicating the number of keys present. The Length Used field can include 4-octet unsigned 32 bit integer defines the actual size for the value in octets. In some examples, this value defines the value size. When, for example, this is ZERO then the object value allocation is free to be reused or deleted. The Length Allocated field can include 4-octet unsigned 32 bit integer defines the maximum value size in octets that can be used. In some examples, the next object value object starts after this size. The Reference Count field can include 4-octet reference count value indicates the number of other objects that are referencing this object. In some examples, the value is an unsigned 32 bit integer. In some examples, a value of ZERO means that no other object is referencing this object, which may be normal depending on the type of object. The Keys field can include variable length number of keys. In some examples, the total size is key count*key size. In some examples, first key is required, making the minimum value the size of the key (e.g. 16 bytes for 128 bit key). The Data field can include a data value of variable length and is the size of length allocated. In some examples, the data value should be zero padded when the length used is less than length allocated.
Since the key is stored in the data object as well as the index file, an inaccessible index file (e.g., corrupted, missing, etc.) does not mean the data object is unavailable. For example, the data can still be accessed through the key in the data object. The index file is needed to update data and maintain performance (e.g., speed), but not required to access the data. In situations where the index file is missing or needs to be rebuilt (e.g., migration, recovery, etc.) the index file can be easily rebuilt from the keys in the data object.
The method shown in
Each sequence shown in
At sequence 516, a more details analysis of the data object can be performed by running a parser (e.g., chosen based on the type of data object identified in sequence 514). The parser can identify key, action, callback and algorithm associated with the data object as shown in data object 508. In some examples, the parser can also maps out locations of SODS instances based on key and hash map.
At sequence 518, a determination is made on whether the action associated with the data object is a delete action. For example, the action associated with the data object identified from the detailed analysis (e.g., at sequence 516). When the action is a delete action, the method can proceed to sequence 526. When the action is not a delete action, the method can proceed to sequence 520.
At sequence 520, a determination of the data size needed to store the data object is made. For example, based on the type of data object, size of data object, etc. In some examples, extra data size (greater than actual data object size) is allocated, as previously described. The data object with the allocated size is shown at 510.
At sequence 522 a determination is made on whether the data object should be compressed. For example, based on data object type, data object size, etc. When the data object is to be compressed, the method can proceed to sequence 524 where the data object is compressed. The method can then process to sequence 528. At sequence 528, a SODS instance can be located or created. For example, the SODS instance can be looked-up in a database or hash table (e.g., created by the parser in sequence 516). When a SODS instance cannot be located, a new SODS instance can be created. In some examples, a SODS instance can include one index and one data file, each data file configured to store millions of data objects. At sequence 530, the data object is inserted into the SODS instance. For example, the refrigerator state data and metadata can be written to the data store. In some examples, the data object is a new data object which is written to data storage (e.g., Storage 116) at sequence 532. In other examples, the data object is an update of a previously store data object (e.g., updated state data). At sequence 534, the previously stored data object is obtained. At sequence 536, a callback can be performed. For example, an insert of a new data object or an update of the previously stored data object with the new data object (e.g., diff, absolute diff, subtraction, a replacement, delta, etc.). At sequence 538, method 500 can end.
The method shown in
Each sequence shown in
At sequence 610, a delete function can be executed. For example, begin the process of deleting a currently stored refrigerator state data (e.g., data object). At sequence 612, the index file can be searched by the key of the data object to locate a currently stored version of the data object. For example, refrigerator can have key ‘abcd’, as shown in
At sequence 616, the data of the currently stored version of the data object can be written with a NULL (e.g., deleted). For example, deleting the refrigerator state data. At sequence 618, index nodes can be recursively marked as deleted (e.g., if no down, left or right associated after the deletion). For example, the nodes in the path of the refrigerator key (e.g., level 1 node ‘a’; level 2 node ‘b’; level 3 node ‘c’; level 4 node ‘d’). At sequence 620, the data object can be marked deleted if reference count is equal to zero (e.g., when all nodes reference keys have been removed). For example, the memory offsets of index nodes can be tracked and data objects that are marked as deleted. This can be tracked in two in-memory lists. These two lists can be consulted when adding new index nodes and data object (e.g., how data is reused for deleted items). When the SODS index and data file are opened, in the case it exists when first opening it, the in-memory lists will populated to track offsets of the free index nodes and data objects.
At sequence 622, the index nodes and data object can be added to a free/available list (e.g., available for new data objects to be written). For example, the location in Storage 116 where the refrigerator data used to be stored. At sequence 624, a list containing active records for the SODS instance can be decremented (e.g., to account for the removed data object). At sequence 626, method 600 can stop.
At sequence 628, the index file can be searched by the key of the data object to locate a currently stored version of the data object. For example, refrigerator key (e.g., ‘abcd’) can be used to search the index file to locate the currently stored refrigerator state data. At sequence 630, a determination is made as to whether the currently stored version of the data object was found. When a currently stored version of the data object was found, method 600 can proceed to sequence 634. When a currently stored version of the data object was not found, method 600 can proceed to sequence 632.
At sequence 632, the data object was not found (e.g., the currently stored data object is equal to NULL and the new data object is equal to the stored in the received data object). For example, the refrigerator state data was not found. At sequence 634, the data object was found (e.g., the currently stored data object is equal to the previously received data of the data object and the new data object is equal to the stored in the received data object). For example, the refrigerator state data was found.
At sequence 636 a callback is executed (e.g., insert, update, etc.). When sequence 636 is reached from sequence 632, an insert (e.g., write) call back function can be executed. For example, the received refrigerator state data is written to Storage 116. When sequence 636 is reached from sequence 634, an update (e.g., diff, absolute diff, subtraction, a replacement, delta, etc.) call back function can be executed. For example, the received refrigerator state data is compared to the currently stored refrigerator state data and the result written to Storage 116. In some examples, the data from 634 can be similar and then an update would not be required (e.g., diff, etc.).
At sequence 638, index nodes can be identified (e.g., for key searching). For example, the location, using refrigerator key ‘abcd’ where the state data can be stored (as shown in
The disclosure now turns to
The interfaces 702 are typically provided as modular interface cards (sometimes referred to as “line cards”). Generally, they control the sending and receiving of data packets over the network and sometimes support other peripherals used with the network device 700. Among the interfaces that may be provided are Ethernet interfaces, frame relay interfaces, cable interfaces, DSL interfaces, token ring interfaces, and the like. In addition, various very high-speed interfaces may be provided such as fast token ring interfaces, wireless interfaces, Ethernet interfaces, Gigabit Ethernet interfaces, ATM interfaces, HSSI interfaces, POS interfaces, FDDI interfaces, WIFI interfaces, 3G/4G/5G cellular interfaces, CAN BUS, LoRA, and the like. Generally, these interfaces may include ports appropriate for communication with the appropriate media. In some cases, they may also include an independent processor and, in some instances, volatile RAM. The independent processors may control such communications intensive tasks as packet switching, media control, signal processing, crypto processing, and management. By providing separate processors for the communications intensive tasks, these interfaces allow the master microprocessor 604 to efficiently perform routing computations, network diagnostics, security functions, etc.
Although the system shown in
Regardless of the network device's configuration, it may employ one or more memories or memory modules (including memory 706) configured to store program instructions for the general-purpose network operations and mechanisms for roaming, route optimization and routing functions described herein. The program instructions may control the operation of an operating system and/or one or more applications, for example. The memory or memories may also be configured to store tables such as mobility binding, registration, and association tables, etc. Memory 706 could also hold various software containers and virtualized execution environments and data.
The network device 700 can also include an application-specific integrated circuit (ASIC), which can be configured to perform routing and/or switching operations. The ASIC can communicate with other components in the network device 700 via the bus 710, to exchange data and signals and coordinate various types of operations by the network device 700, such as routing, switching, and/or data storage operations, for example.
To enable user interaction with the computing device 800, an input device 845 can represent any number of input mechanisms, such as a microphone for speech, a touch-sensitive screen for gesture or graphical input, keyboard, mouse, motion input, speech and so forth. An output device 835 can also be one or more of a number of output mechanisms known to those of skill in the art. In some instances, multimodal systems can enable a user to provide multiple types of input to communicate with the computing device 800. The communications interface 840 can generally govern and manage the user input and system output. There is no restriction on operating on any particular hardware arrangement and therefore the basic features here may easily be substituted for improved hardware or firmware arrangements as they are developed.
Storage device 830 is a non-volatile memory and can be a hard disk or other types of computer readable media which can store data that are accessible by a computer, such as magnetic cassettes, flash memory cards, solid state memory devices, digital versatile disks, cartridges, random access memories (RAMs) 825, read only memory (ROM) 820, and hybrids thereof.
The storage device 830 can include services 832, 834, 836 for controlling the processor 810. Other hardware or software modules are contemplated. The storage device 830 can be connected to the system connection 805. In one aspect, a hardware module that performs a particular function can include the software component stored in a computer-readable medium in connection with the necessary hardware components, such as the processor 810, connection 805, output device 835, and so forth, to carry out the function.
For clarity of explanation, in some instances the present technology may be presented as including individual functional blocks including functional blocks comprising devices, device components, steps or routines in a method embodied in software, or combinations of hardware and software.
In some embodiments the computer-readable storage devices, mediums, and memories can include a cable or wireless signal containing a bit stream and the like. However, when mentioned, non-transitory computer-readable storage media expressly exclude media such as energy, carrier signals, electromagnetic waves, and signals per se.
Methods according to the above-described examples can be implemented using computer-executable instructions that are stored or otherwise available from computer readable media. Such instructions can comprise, for example, instructions and data which cause or otherwise configure a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. Portions of computer resources used can be accessible over a network. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, firmware, or source code. Examples of computer-readable media that may be used to store instructions, information used, and/or information created during methods according to described examples include magnetic or optical disks, flash memory, USB devices provided with non-volatile memory, networked storage devices, and so on.
Devices implementing methods according to these disclosures can comprise hardware, firmware and/or software, and can take any of a variety of form factors. Typical examples of such form factors include laptops, smart phones, small form factor personal computers, personal digital assistants, rackmount devices, standalone devices, and so on. Functionality described herein also can be embodied in peripherals or add-in cards. Such functionality can also be implemented on a circuit board among different chips or different processes executing in a single device, by way of further example.
The instructions, media for conveying such instructions, computing resources for executing them, and other structures for supporting such computing resources are means for providing the functions described in these disclosures.
Although a variety of examples and other information was used to explain aspects within the scope of the appended claims, no limitation of the claims should be implied based on particular features or arrangements in such examples, as one of ordinary skill would be able to use these examples to derive a wide variety of implementations. Further and although some subject matter may have been described in language specific to examples of structural features and/or method steps, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to these described features or acts. For example, such functionality can be distributed differently or performed in components other than those identified herein. Rather, the described features and steps are disclosed as examples of components of systems and methods within the scope of the appended claims.
Claim language reciting “at least one of” refers to at least one of a set and indicates that one member of the set or multiple members of the set satisfy the claim. For example, claim language reciting “at least one of A and B” means A, B, or A and B.
Number | Name | Date | Kind |
---|---|---|---|
8868493 | Serlet | Oct 2014 | B2 |
9176951 | Patrudu | Nov 2015 | B2 |
9195937 | Deninger et al. | Nov 2015 | B2 |
9313232 | Ahuja | Apr 2016 | B2 |
9374225 | Ahuja | Jun 2016 | B2 |
9430564 | Ahuja | Aug 2016 | B2 |
9552548 | Brestoff | Jan 2017 | B1 |
9794254 | Ahuja | Oct 2017 | B2 |
10367786 | Gaitonde | Jul 2019 | B2 |
20100199257 | Biggerstaff | Aug 2010 | A1 |
20100332401 | Prahlad | Dec 2010 | A1 |
20170185625 | Cheru et al. | Jun 2017 | A1 |
20170366327 | Kim | Dec 2017 | A1 |
20180150548 | Shah | May 2018 | A1 |
Entry |
---|
International Search Report and Written Opinion from the International Searching Authority, dated Oct. 5, 2018, 10 pages, for corresponding International Patent Application No. PCT/US2018/043432. |
Number | Date | Country | |
---|---|---|---|
20190034472 A1 | Jan 2019 | US |