Programming Concepts
These concepts and definitions pave the way to a more detailed understanding of applications programming with ActiveSpaces software.
- Data Grid
- A distributed database, including all the component processes that implement it.
- Connection
- An application program connects to a data grid. A connection object is analogous to a traditional database connection.
- Session
- An application program interacts with a data grid through one or more
session objects. Each session insulates the data grid interactions within one program thread from the interactions in other threads.
A session can be transacted or non-transacted. Get, put, and delete operations in a transacted session occur within a transaction, and do not take effect until the program explicitly commits the transaction.
- Table
- An
ActiveSpaces data grid organizes and presents data as rows in tables, like a traditional relational database.
Administrators define tables within the data grid.
Programs can get a row from a table, put a row into a table, and delete a row from a table.
Programs can query a table for the rows that match a filter.
- Primary Key
-
Each table distinguishes a primary key, or more briefly, the key.
Values of the key are unique: no two rows in a table have the same key value.
- Secondary Index
-
A table can have zero or more secondary indexes, which facilitate queries. The tibdg tool can be used to create a secondary index on a table by using the index create command.
- Iterator
-
An iterator presents an application program with the results of a data grid query, one row at a time.
- Structuring Programs
These steps outline the main structural components of most application programs that access a ActiveSpaces data grid. - Querying a Data Grid Table
Application programs have the following options to query tables in a data grid. - Transaction Isolation
ActiveSpaces enforces the highest level of transaction isolation: serializable. As a result, serialization can delay database operations as transactions wait for other transactions to commit or roll back. - Listeners
Listeners are used to monitor events corresponding to changes in a table.