Thursday, September 25, 2008

CSQL - Open Source main memory database cache

CSQL is divided into two deployment option,

  • CSQL MMDB
  • CSQL CACHE

CSQL MMDB :

CSQL main memory database is highly efficient and convenient C++ interface. CSQL will provide you all functionality supported by Query language, transactions, concurrent access to the data, online backups, recovery after faults.

CSQL does not support client server architecture and all application using CSQL should run at the same host. So by the elimination of datatransfer overhead, the query execution could make faster.The database file is mapped to the virtual memory space of each application working with the database. So the query is executed in the context of the application, requiring no context switching and data transfer.

Synchronization of concurrent database access is implemented in CSQL by means of atomic instructions adding no overhead to query processing. CSQL assumes that whole database present in RAM and optimizes the search algorithms and structure according to this assumption.

Moreover, CSQL has no overhead caused by database buffer management and needs no data transfer between a database file and buffer pool,all data cached in buffer pool. Conventional disk based database systems are optimized for the particular characteristics of disk storage mechanisms. Memory resident system, on the other hand, use different optimizations to structure and organise data, as well as to make it reliable. CSQL is enhanced by sorting, storing and retrieving specific data entirely in memory, rather than going to disk.

CSQL is 10 to 20 times faster than any other disk based database. It provides 100,000k selects/sec and 50,000k inserts/sec. This dramatic performance is because of the main memory resident.

Database as a whole fits into the physical memory of the computer, if the size exceeds, the standard OS mechanism will work.But all CSQL search algorithms and structures are optimized under the assumption of residence of all data in memory, so the efficiency for swapped out data will not be very high.

Now-a-days the Industries like Telecomcommunication, Healthcare, Process control, etc., needs real-time database access. CSQL is became popular in this areas mainly.


CSQL CACHE :

CSQL offers a cache product that interoperates with MySql, Postgres, Oracle, etc bakcend, to cache frequently used data in CSQL. Data can be loaded into the cache on demand and can be changed in the cache, with being propagated synchronously and asynchronously back to target DB.

It sits in between application and backend database to provide a faster access to the data in demand basis. At the first shot CSQL cached the data at table level and record level from the backend and now application fetches those required data from CSQL other than backend . So, fetching from memory is quite faster( 20 times) than fetching from backend and cache acts as a main source DB for the application. In a Literal sense CSQL Cache is middle tier, updateable bi-directional caching for any DBMS. Since all your data would disappear if the power wentout, CSQL uses the backend database for recovery. In that configuration, you could send UPDATE and INSERT statements directly to target database but perform all your SELECT against MMDB.

Current Feature List :
# Atomicity : Physical and logical undo logging
# Constraints : Primary key, Not Null, Unique
# Isolation : Read Uncommitted, Read committed, Read repeatable
# Hash Index : for point look up
# Tree Index : for range look up
# Data Type Supports : All primitive type, Date, Time ,Time Stamp
# Primitive SQL Support : Insert, Update, Select, Delete, Create table | Index
# SELECT on single tables, grouping.
# Caching for MySql and Postgres

Platform supported : Linux, Solaris
Standard Supported : ODBC, JDBC, SQL92.

This blog is intended to give a overall idea about "CSQL main memory database cache" to the readers. Please comments on this blog.
CSQL Web Page:
Open Source page :