|
The K2 Persistent State Service (PSS) is a fully
compliant implementation of OMG's specification
for Persistent State Service. It presents persistent
information as storage objects stored in storage
homes which themselves are stored in datastores,
an entity that manages data, for example a database,
a set of files, a schema in a relational database.
The Persistent State Service provides a language
for describing the states to persist in a datastore.
This language is called as Persistent State Definition
Language(PSDL). PSDL is a superset of OMG IDL,
and is a declarative language like IDL.
The K2 Persistent State Service provides two
ways to define the datastore schema and the
application programming interface of storage object
instances in a datastore with this
schema:
- Using the Persistent State Definition Language
(PSDL)
- Transparent Persistence using C++.
The state information
to persist is defined using PSDL language. The
K2 Persistent State Service provides a PSDL compiler
for programmers to generate persistent code for
state information. The K2 PSDL compiler generates
database independent code for various database
like Berkley DB , Oracle etc.
The fundamental concept of Persistent State Service
is defined using few constructs like abstract
storagetype , abstract
storagehome, storagetype,
storagehome
and catalog.
A storagetype
definition is like a storage object instance (
like a programming language ( c++, Java) class
instances. This storage object instance is bound
to a single record in a database table and provides
direct access to the state
information.
Similarly, storagehome definition is like a language
class instance which is provided by the catalogs.
To access a storage object, you need a logical
connection between your process and Datastore
that contains the storagehome of this storage
object type.
Features
of K2 Persistent State Service
- Support for Oracle connector.
An application can persist its data in Oracle
Database, through Oracle connector.
- Support for BerkleyDB Connector
An application can persist its data in BerkleyDB
Database, through BerkleyDB connector
- Support for embedded storage objects.
The relationship between different tables in
a RDBMS which doesn't have a primary key, can
be specified by embedding one storage objects
inside another.
- Support for reference to another storage object.
The relationship between different tables in
a RDBMS can be specified by storing a reference
of one storage object inside another storage
object through the ref keyword.
- InMemory Caching mechanism
The persisted data is cached in memory, for
higher efficiency and improve data access performance.
- Delayed writing to the database
Several storage object can be modified and flushed
to the database in single call, This reduces
the access frequency to the datastores.
- Logging mechanism
Application specific messages can be logged
in a file or to the console as desired.
- PSDL compiler
The K2PSDL compiler generates database independent
persistence code. So the developer need not
be concerned of specific database vendors while
developing the application.
|