Method and system for generating domain specific in-memory database management system
Abstract
A concurrent graph DBMS allows for representation of graph data structures in memory, using familiar Java object navigation, while at the same time providing atomicity, consistently, and transaction isolation properties of a DBMS, including concurrent access and modification of the data structure from multiple application threads. The concurrent graph DBMS serves as a “traffic cop” between application threads to prevent them from seeing unfinished and inconsistent changes made by other threads, and atomicity of changes. The concurrent graph DBMS provides automatic detection of deadlocks and correct rollback of a thread's incomplete transaction when exceptions or deadlocks occur. The concurrent graph DBMS may be generated from a schema description specifying objects and relationships between objects, for the concurrent graph DBMS.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for generating source code for a concurrent graph in-memory database management system (DBMS), the method comprising:
receiving a schema description of a concurrent graph data structure, wherein the schema description specifies one or more concurrent object classes, relationships among the one or more object classes, and at least a primary key used to identify instance of each of the one or more object classes; generating, for each of the one or more concurrent object classes, source code implementing the one or more concurrent object class as specified by the schema description; generating, for the concurrent graph data structure, source code implementing an object factory class, wherein the object factory class is configured to instantiate instances of the one or more object classes in response to requests from a thread in the multithreaded application; and generating, for the in-memory DBMS, source code to provide concurrency control to each instance of the one or more object classes instantiated by the object factory in the concurrent graph data structure.
2 . The method of claim 1 , further comprising, packaging the generated source code implementing the one or more concurrent object classes, the source code implementing the object factory class, and the source code to provide the concurrency control in a source code package.
3 . The method of claim 1 , wherein the concurrency control is maintained via a two-level lock, including a read lock and a write lock for each instantiated instance of the one or more object classes, wherein multiple concurrent read locks may be obtained by threads of the multithreaded application and only a single write lock may be obtained by the threads during execution of the multithreaded application.
4 . The method of claim 1 , further comprising, generating a transaction pattern for an application thread to perform a transaction against the instantiated instances of the one or more object classes.
5 . The method of claim 4 , wherein the transaction pattern identifies an atomic work unit for the concurrent graph data structure.
6 . The method of claim 1 , wherein the object factory class includes source code for maintaining a map of threads waiting for a lock associated with one of the instances of the one or more objects instantiated by the multithreaded application.
7 . The method of claim 1 , wherein the schema description further specifies source code for a method for at least one of the one or more concurrent object classes.
8 . The method of claim 1 , wherein the object factory class includes source code for resolving deadlocks occurring between two or more threads waiting for a lock associated with two or more instances of the one or more object classes instantiated by the multithreaded application.
9 . A computer-readable storage medium storing instructions, which, when executed on a processor, performs an operation for generating source code for a concurrent graph in-memory database management system (DBMS), the operation comprising:
receiving a schema description of a concurrent graph data structure, wherein the schema description specifies one or more concurrent object classes, relationships among the one or more object classes, and at least a primary key used to identify instance of each of the one or more object classes; generating, for each of the one or more concurrent object classes, source code implementing the one or more concurrent object class as specified by the schema description; generating, for the concurrent graph data structure, source code implementing an object factory class, wherein the object factory class is configured to instantiate instances of the one or more object classes in response to requests from a thread in the multithreaded application; and generating, for the in-memory DBMS, source code to provide concurrency control to each instance of the one or more object classes instantiated by the object factory in the concurrent graph data structure.
10 . The computer-readable storage medium of claim 9 , wherein the operation further comprises, packaging the generated source code implementing the one or more concurrent object classes, the source code implementing the object factory class, and the source code to provide the concurrency control in a source code package.
11 . The computer-readable storage medium of claim 9 , wherein the concurrency control is maintained via a two-level lock, including a read lock and a write lock for each instantiated instance of the one or more object classes, wherein multiple concurrent read locks may be obtained by threads of the multithreaded application and only a single write lock may be obtained by the threads during execution of the multithreaded application.
12 . The computer-readable storage medium of claim 9 , wherein the operation further comprises, generating a transaction pattern for an application thread to perform a transaction against the instantiated instances of the one or more object classes.
13 . The computer-readable storage medium of claim 12 , wherein the transaction pattern identifies an atomic work unit for the concurrent graph data structure.
14 . The computer-readable storage medium of claim 9 , wherein the object factory class includes source code for maintaining a map of threads waiting for a lock associated with one of the instances of the one or more objects instantiated by the multithreaded application.
15 . The computer-readable storage medium of claim 9 , wherein the schema description further specifies source code for a method for at least one of the one or more concurrent object classes.
16 . The computer-readable storage medium of claim 9 , wherein the object factory class includes source code for resolving deadlocks occurring between two or more threads waiting for a lock associated with two or more instances of the one or more object classes instantiated by the multithreaded application.
17 . A system, comprising:
a processor and a memory hosting an code generation tool, which, when executed on the processor, performs an operation for generating source code for a concurrent graph in-memory database management system (DBMS), the operation comprising:
receiving a schema description of a concurrent graph data structure, wherein the schema description specifies one or more concurrent object classes, relationships among the one or more object classes, and at least a primary key used to identify instance of each of the one or more object classes,
generating, for each of the one or more concurrent object classes, source code implementing the one or more concurrent object class as specified by the schema description,
generating, for the concurrent graph data structure, source code implementing an object factory class, wherein the object factory class is configured to instantiate instances of the one or more object classes in response to requests from a thread in the multithreaded application, and
generating, for the in-memory DBMS, source code to provide concurrency control to each instance of the one or more object classes instantiated by the object factory in the concurrent graph data structure.
18 . The system of claim 17 , wherein the operation further comprises, packaging the generated source code implementing the one or more concurrent object classes, the source code implementing the object factory class, and the source code to provide the concurrency control in a source code package.
19 . The system of claim 17 , wherein the concurrency control is maintained via a two-level lock, including a read lock and a write lock for each instantiated instance of the one or more object classes, wherein multiple concurrent read locks may be obtained by threads of the multithreaded application and only a single write lock may be obtained by the threads during execution of the multithreaded application.
20 . The system of claim 17 , wherein the operation further comprises, generating a transaction pattern for an application thread to perform a transaction against the instantiated instances of the one or more object classes.
21 . The system of claim 20 , wherein the transaction pattern identifies an atomic work unit for the concurrent graph data structure.
22 . The system of claim 17 , wherein the object factory class includes source code for maintaining a map of threads waiting for a lock associated with one of the instances of the one or more objects instantiated by the multithreaded application.
23 . The system of claim 17 , wherein the schema description further specifies source code for a method for at least one of the one or more concurrent object classes.
24 . The system of claim 17 , wherein the object factory class includes source code for resolving deadlocks occurring between two or more threads waiting for a lock associated with two or more instances of the one or more object classes instantiated by the multithreaded application.Join the waitlist — get patent alerts
Track US2013097135A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.