METHOD AND APPARATUS OF NON-VOLATILE MEMORY SYSTEM HAVING CAPABILITY OF KEY-VALUE STORE DATABASE
20180012033 · 2018-01-11
Inventors
Cpc classification
G06F21/6218
PHYSICS
International classification
Abstract
A computer system is coupled to one or more servers which run one or more applications. The computer system comprises: a memory storing key data, value data associated with each of the key data, and application mask data, the application mask data indicating, for each of the value data, which application is allowed to access said each value data based on the key data associated with the value data; and a processor configured to: receive a get operation which includes a first key data and a first application identifier, the first application identifier identifying a first application which issues the get operation; determine whether the first application is allowed to access a first value data associated with the first key data based on the application mask data; and return the first value data if the application mask data indicates the first application is allowed to access the first value data.
Claims
1. A computer system coupled to one or more servers which run one or more applications, the computer system comprising: a memory storing key data, value data which is associated with each of the key data, and application mask data, the application mask data indicating, for each of the value data, which application is allowed to access said each value data based on the key data associated with the value data; and a processor configured to: receive a get operation which includes a first key data and a first application identifier, the first application identifier identifying a first application which issues the get operation; determine whether the first application is allowed to access a first value data which is associated with the first key data based on the application mask data; and return the first value data associated with the first key data if the application mask data indicates the first application is allowed to access the first value data.
2. The computer system according to claim 1, wherein the processor is configured to: receive a put operation which includes a second key data, a second value data which is associated with the second key data, and a second application identifier identifying a second application which issues the put operation; search the application mask data to determine whether any application is allowed to access any existing value data associated with the second key data; and if no application is allowed to access any existing value data associated with the second key data, create and store in the memory a new entry of the second key data, the associated second value data, and the application mask data indicating that the second application is allowed to access the second value data, allocate a new value data area to store the second value data, and update in the memory a physical address of the value data based on the allocated new value data area.
3. The computer system according to claim 1, wherein the processor is configured to: receive a put operation which includes a second key data, a second value data which is associated with the second key data, and a second application identifier identifying a second application which issues the put operation; search the application mask data to determine whether any application is allowed to access any existing value data associated with the second key data; and if the second application is allowed to access existing value data associated with the second key data and no other application is allowed to access the existing value data associated with the second key data, overwrite the existing value data in the memory with the second value data which is associated with the second key data.
4. The computer system according to claim 1, wherein the processor is configured to: receive a put operation which includes a second key data, a second value data which is associated with the second key data, and a second application identifier identifying a second application which issues the put operation; search the application mask data to determine whether any application is allowed to access any existing value data associated with the second key data; and if the second application is allowed to access existing value data associated with the second key data and at least one other application is allowed to access the existing value data associated with the second key data, update the application mask data corresponding to the second application identifier and the second key data to remove access to the existing value data by the second application, create and store in the memory a new entry of the second key data, the associated second value data, and the application mask data indicating that the second application is allowed to access the second value data, allocate a value data area to store the second value data, and update in the memory a physical address of the value data based on the allocated new value data area.
5. The computer system according to claim 1, wherein the processor is configured to: receive a list operation which includes a second application identifier identifying a second application which issues the list operation; test the application mask data to identify all second value data which the second application is allowed to access; and create a list of second key data associated with the identified second value data.
6. The computer system according to claim 1, wherein the processor is configured to: receive a copy operation which includes a source application identifier identifying a source application, a destination application identifier identifying a destination application, and a list of key data for the copy operation; determine whether the source application is allowed to access value data which are associated with the key data in the list of key data based on the application mask data; if the source application is allowed to access all value data which are associated with the key data in the list of key data, update the application mask data to indicate that the destination application is allowed to access all value data which are associated with the key data in the list of key data; and if the source application is not allowed to access at least some value data which are associated with the key data in the list of key data, create a failed list of key data associated with value data which the source application is not allowed to access, and return a failure response with the failed list of key data.
7. The computer system according to claim 1, wherein the processor is configured to: receive a copy operation which includes a source application identifier identifying a source application and a destination application identifier identifying a destination application; create a list of key data which are associated with all value data which the source application is allowed to access based on the application mask data; and update the application mask data to indicate that the destination application is allowed to access all value data which are associated with the key data in the created list of key data.
8. The computer system according to claim 1, wherein the processor is configured to: receive a delete operation which includes a second application identifier and a list of key data for the delete operation; determine whether the second application is allowed to access value data which are associated with the key data in the list of key data based on the application mask data; if the second application is allowed to access all value data which are associated with the key data in the list of key data, update the application mask data to indicate that the second application is not allowed to access all value data which are associated with the key data in the list of key data; and if the second application is not allowed to access at least some value data which are associated with the key data in the list of key data, return a failure response.
9. The computer system according to claim 8, wherein the processor is configured, if the second application is allowed to access all value data which are associated with the key data in the list of key data, to: identify, from the list of key data, any key data for which the application mask data indicates no application is allowed to access the value data associated with the identified key data; if there are one or more identified key data for which the application mask data indicates no application is allowed to access the value data associated with the identified key data, delete from the memory the one or more identified key data, the value data associated with the one or more identified key data, and stored area of the value data associated with the one or more identified key data.
10. The computer system according to claim 1, wherein the computer system is coupled to a plurality of servers each running one or more applications, each application of the applications running on the plurality of servers being identified by a unique application identifier.
11. A method of operating a computer system coupled to one or more servers which run one or more applications, the computer system including a memory that stores key data, value data which is associated with each of the key data, and application mask data, the application mask data indicating, for each of the value data, which application is allowed to access said each value data based on the key data associated with the value data, the method comprising: receiving a get operation which includes a first key data and a first application identifier, the first application identifier identifying a first application which issues the get operation; determining whether the first application is allowed to access a first value data which is associated with the first key data based on the application mask data; and returning the first value data associated with the first key data if the application mask data indicates the first application is allowed to access the first value data.
12. The method according to claim 11, further comprising: receiving a put operation which includes a second key data, a second value data which is associated with the second key data, and a second application identifier identifying a second application which issues the put operation; searching the application mask data to determine whether any application is allowed to access any existing value data associated with the second key data; if no application is allowed to access any existing value data associated with the second key data, creating and storing in the memory a new entry of the second key data, the associated second value data, and the application mask data indicating that the second application is allowed to access the second value data, allocating a new value data area to store the second value data, and updating in the memory a physical address of the value data based on the allocated new value data area; if the second application is allowed to access existing value data associated with the second key data and no other application is allowed to access the existing value data associated with the second key data, overwriting the existing value data in the memory with the second value data which is associated with the second key data; and if the second application is allowed to access existing value data associated with the second key data and at least one other application is allowed to access the existing value data associated with the second key data, updating the application mask data corresponding to the second application identifier and the second key data to remove access to the existing value data by the second application, creating and storing in the memory a new entry of the second key data, the associated second value data, and the application mask data indicating that the second application is allowed to access the second value data, allocating a value data area to store the second value data, and updating in the memory a physical address of the value data based on the allocated new value data area.
13. The method according to claim 11, further comprising: receiving a copy operation; if the copy operation includes a source application identifier identifying a source application, a destination application identifier identifying a destination application, and a list of key data for the copy operation, then determining whether the source application is allowed to access value data which are associated with the key data in the list of key data based on the application mask data; if the source application is allowed to access all value data which are associated with the key data in the list of key data, updating the application mask data to indicate that the destination application is allowed to access all value data which are associated with the key data in the list of key data; and if the source application is not allowed to access at least some value data which are associated with the key data in the list of key data, creating a failed list of key data associated with value data which the source application is not allowed to access, and return a failure response with the failed list of key data; and if the a copy operation includes a source application identifier identifying a source application and a destination application identifier identifying a destination application, then creating a list of key data which are associated with all value data which the source application is allowed to access based on the application mask data; and updating the application mask data to indicate that the destination application is allowed to access all value data which are associated with the key data in the created list of key data.
14. The method according to claim 11, further comprising: receiving a delete operation which includes a second application identifier and a list of key data for the delete operation; determining whether the second application is allowed to access value data which are associated with the key data in the list of key data based on the application mask data; if the second application is allowed to access all value data which are associated with the key data in the list of key data, then updating the application mask data to indicate that the second application is not allowed to access all value data which are associated with the key data in the list of key data; identifying, from the list of key data, any key data for which the application mask data indicates no application is allowed to access the value data associated with the identified key data; and if there are one or more identified key data for which the application mask data indicates no application is allowed to access the value data associated with the identified key data, deleting from the memory the one or more identified key data, the value data associated with the one or more identified key data, and stored area of the value data associated with the one or more identified key data; and if the second application is not allowed to access at least some value data which are associated with the key data in the list of key data, returning a failure response.
15. A non-transitory computer-readable storage medium storing a plurality of instructions for controlling a data processor to operate a computer system including a memory that stores key data, value data which is associated with each of the key data, and application mask data, the application mask data indicating, for each of the value data, which application is allowed to access said each value data based on the key data associated with the value data, the plurality of instructions comprising: instructions that cause the data processor to receive a get operation which includes a first key data and a first application identifier, the first application identifier identifying a first application which issues the get operation; instructions that cause the data processor to determine whether the first application is allowed to access a first value data which is associated with the first key data based on the application mask data; and instructions that cause the data processor to return the first value data associated with the first key data if the application mask data indicates the first application is allowed to access the first value data.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
DETAILED DESCRIPTION OF THE INVENTION
[0035] In the following detailed description of the invention, reference is made to the accompanying drawings which form a part of the disclosure, and in which are shown by way of illustration, and not of limitation, exemplary embodiments by which the invention may be practiced. In the drawings, like numerals describe substantially similar components throughout the several views. Further, it should be noted that while the detailed description provides various exemplary embodiments, as described below and as illustrated in the drawings, the present invention is not limited to the embodiments described and illustrated herein, but can extend to other embodiments, as would be known or as would become known to those skilled in the art. Reference in the specification to “one embodiment,” “this embodiment,” or “these embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention, and the appearances of these phrases in various places in the specification are not necessarily all referring to the same embodiment. Additionally, in the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that these specific details may not all be needed to practice the present invention. In other circumstances, well-known structures, materials, circuits, processes and interfaces have not been described in detail, and/or may be illustrated in block diagram form, so as to not unnecessarily obscure the present invention.
[0036] Furthermore, some portions of the detailed description that follow are presented in terms of algorithms and symbolic representations of operations within a computer. These algorithmic descriptions and symbolic representations are the means used by those skilled in the data processing arts to most effectively convey the essence of their innovations to others skilled in the art. An algorithm is a series of defined steps leading to a desired end state or result. In the present invention, the steps carried out require physical manipulations of tangible quantities for achieving a tangible result. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals or instructions capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, instructions, or the like. It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining,” “displaying,” or the like, can include the actions and processes of a computer system or other information processing device that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system's memories or registers or other information storage, transmission or display devices.
[0037] The present invention also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may include one or more general-purpose computers selectively activated or reconfigured by one or more computer programs. Such computer programs may be stored in a computer-readable storage medium including non-transitory medium, such as, but not limited to optical disks, magnetic disks, read-only memories, random access memories, solid state devices and drives, or any other types of media suitable for storing electronic information. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general-purpose systems may be used with programs and modules in accordance with the teachings herein, or it may prove convenient to construct a more specialized apparatus to perform desired method steps. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein. The instructions of the programming language(s) may be executed by one or more processing devices, e.g., central processing units (CPUs), processors, or controllers.
[0038] Exemplary embodiments of the invention, as will be described in greater detail below, provide apparatuses, methods and computer programs for a memory system to manage KVS data that is shared by multiple KVS applications.
First Embodiment
[0039]
[0040]
[0041]
[0042]
[0043]
[0044] In step S504, the KVS program 23 reads the value data corresponding to the key data in a pair of the key data and value data using the physical address of the value data field 34, and then the memory system 2 returns the value data with a success response. In contrast, in step S505, since the KVS data store does not store the key data corresponding to the Get operation request issued by the KVS application, the memory system 2 returns NULL value data and error response with no match status.
[0045]
[0046] In step S603, the KVS program 23 tests the application number contained in the Put operation parameters and multiple entry of application bitmask for each matched entry which is searched in step S602. If the bit corresponding to the application number in the application bitmask is set to 1, so that the entry of key data is owned by the KVS application, then the next step is S604. If no application bitmask which is searched in step S602 is matched to the application number of the Put operation, so that all of the key data entries are not owned by the KVS application, then the next step is S607.
[0047] In step S604, the KVS program 23 tests any other application number except the application number contained in the Put operation parameters and the application bitmask which is tested in step S603. If any bit is set to 1, so that the entry of key data is shared by the other KVS application, then the next step is S606. If all bits excluding the application number of the Put operation are set to 0, so that the key data entry is not shared by the other KVS application, then the next step is S605.
[0048] In step S605, the KVS program 23 overwrites the value data contained in the Put parameters to the location of value data using the physical address of the value data field 34, and then the memory system 2 returns a success response. In step S606, the KVS program 23 clears the bit of the application number contained in the Put operation parameters in the application bitmask which is tested in step S604. The entry which is tested in step S604 is unregistered owner of the KVS application. Clearing the bit of the application number contained in the Put operation parameters in the application bitmask means setting the bit corresponding to the application number to zero for the application bitmask tested in step S604. This updates the application bitmask corresponding to the application number and the key data, to remove access to the existing value data associated with the key data by the application identified by the application number. Then the next step is S607.
[0049] In step S607, the KVS program 23 creates a new entry of the key data in the key mapping table 30, and then the KVS program 23 stores the key data and the bit corresponding to the application number in the application bitmask is set to 1. The entry is owned by the KVS application. In step S608, the KVS program 23 allocates a new value data area and stores the value data contained in the Put parameters to the allocated location of value data. The KVS program 23 updates the physical address of the value data field 34, and then the memory system 2 returns a success response.
[0050]
[0051]
[0052]
Second Embodiment
[0053]
Third Embodiment
[0054]
[0055]
[0056] The flow diagram 1210 is related to a Copy operation of the destination KVS application. In step S1211, the destination KVS application 4 issues a Copy List operation to the memory system 2 with a parameter of the identifier information which is received in step S1204. In step S1212, the KVS program 23 executes the Copy List operation using the result of list operation 110 stored in the memory system. The execution of the Copy List operation is similar to the execution of the Copy operation of
[0057]
[0058] Of course, the system configurations illustrated in
[0059] In the description, numerous details are set forth for purposes of explanation in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that not all of these specific details are required in order to practice the present invention. It is also noted that the invention may be described as a process, which is usually depicted as a flowchart, a flow diagram, a structure diagram, or a block diagram. Although a flowchart may describe the operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged.
[0060] As is known in the art, the operations described above can be performed by hardware, software, or some combination of software and hardware. Various aspects of embodiments of the invention may be implemented using circuits and logic devices (hardware), while other aspects may be implemented using instructions stored on a machine-readable medium (software), which if executed by a processor, would cause the processor to perform a method to carry out embodiments of the invention. Furthermore, some embodiments of the invention may be performed solely in hardware, whereas other embodiments may be performed solely in software. Moreover, the various functions described can be performed in a single unit, or can be spread across a number of components in any number of ways. When performed by software, the methods may be executed by a processor, such as a general purpose computer, based on instructions stored on a computer-readable medium. If desired, the instructions can be stored on the medium in a compressed and/or encrypted format.
[0061] From the foregoing, it will be apparent that the invention provides methods, apparatuses and programs stored on computer readable media for a memory system to manage KVS data that is shared by multiple KVS applications. Additionally, while specific embodiments have been illustrated and described in this specification, those of ordinary skill in the art appreciate that any arrangement that is calculated to achieve the same purpose may be substituted for the specific embodiments disclosed. This disclosure is intended to cover any and all adaptations or variations of the present invention, and it is to be understood that the terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification. Rather, the scope of the invention is to be determined entirely by the following claims, which are to be construed in accordance with the established doctrines of claim interpretation, along with the full range of equivalents to which such claims are entitled.