From 354be49b97f0f7aa9ab1ed405da547de5fb4ffcd Mon Sep 17 00:00:00 2001 From: kishoramballi Date: Thu, 8 Oct 2009 07:24:40 +0000 Subject: [PATCH] Update in sync with enterprise version. --- README | 124 ++++++++++++++++++++++++++++----------------------------- build.ksh | 2 +- csql.conf | 64 ++++++++++++++++++++++++----- csqltable.conf | 3 +- 4 files changed, 120 insertions(+), 73 deletions(-) rewrite README (63%) diff --git a/README b/README dissimilarity index 63% index 5986875d..15642bfd 100644 --- a/README +++ b/README @@ -1,62 +1,62 @@ -Introduction ------------- - CSQL is a fast, multi-threaded SQL main memory database engine. It works in embedded mode, where database client and server run in the same host, avoiding network latency. It provides very high throughput of 100,000 selects/sec and 50,000 updates/sec. Applications shall access csql through standard interfaces, ODBC or JDBC. It also provides proprietary APIs to access SQL engine and Storage engine directly. - It aids in the development of high performance, fault-resilent applications requiring concurrent access to the shared data. - - CSQL shall also be used as client side caching mechanism for any database system without compromising on transactional properties and indexed access. This is achieved by using CSQL-main memory database to cache the data from the target database (any traditional disk based database system). - This solution has been designed with modern database requirements in mind, and particularly for use within high-volume environment that requires high performance, while still supporting the transactional properties. Applications shall use this caching solution with no or minimal application code changes. - Perfomance benchmarking reveals that application throughput may increase by a factor of 20 to 100 by incorporating data caching in its architecture. - It is a free software, licensed with the GNU GENERAL PUBLIC LICENSE, http://www.gnu.org/. Refer COPYING file for Licensing information. - -Platforms Supported -------------------- -Linux - -Compilers Supported -------------------- -g++ in linux - -Compiling from source (If you have downloaded with source) ----------------------------------------------------------- -Go to the root directory and enter the following commands. - -$ export JDK_HOME= -$ export PATH=$PATH:$JDK_HOME/bin -$ ./build.ksh - -This will create "install" directory under the current directory and places all the executables created in bin directory and libraries in lib directory. -If you want to install in some other directory then change the directory in --prefix option in build.ksh file before executing build.ksh script. - -Available Documentation ------------------------ -1.User Manual is available under the docs directory -2.SQL API, ODBC, JDBC, ISQL example programs under the examples directory -3.Wisconsin benchmark and cache demo under the demo directory - -Starting the Server -------------------- -Note: kernel.shmmax should be set to more than 500 MB before starting the server - -In linux for setting 1GB enter -$sysctl -w kernel.shmmax=1000000000 - -setupenv.ksh script is available at the root directory which shall be used to -set the necessary environment variables. - -$. ./setupenv.ksh - -Start the server using csqlserver executable -$./csqlserver - -This starts the server and creates the database file. -Use csql tool to execute SQL statements interactively, -$csql -CSQL> - -Note: -Refer UserManual.pdf available in docs folder to know how to work with csql - -Shutting down the Server ------------------------- -Pressing Ctrl-C on the terminal where csqlserver is running, -is safe and will stop the server gracefully by removing the database file. +Introduction +------------ + CSQL is a fast, multi-threaded SQL main memory database engine. It works in both embedded mode (database client and server run in the same host) and client/server mode. It provides very high throughput of 100,000 selects/sec and 50,000 updates/sec from standard interface such as JDBC and ODBC. It aids in the development of high performance, fault-resilent applications requiring concurrent access to the shared data. + + CSQL shall also be used as client side caching mechanism for any database system without compromising on transactional properties and indexed access. This is achieved by using CSQL-main memory database to cache the data from the target database (any traditional disk based database system). + + This solution has been designed with modern database requirements in mind, and particularly for use within high-volume environment that requires high performance, while still supporting the transactional properties. Applications shall use this caching solution with no or minimal application code changes. Application throughput may increase by a factor of 20 to 100 by incorporating data caching in its architecture. + + It comes in dual license, GPL for open source community edition and commercial license for enterprise edition. + +Platforms Supported +------------------- +Linux - x86, x86_64 +Solaris - x86, sparc32, sparc64 + +Compilers Supported +------------------- +g++ in Linux +CC in Solaris + +Available Documentation +----------------------- +1.User Manual +2.Programmer's Guide +3.Cache Guide +4.Replication Guide + +All the manuals are available under the docs directory + +Starting the Server +------------------- +setupenv.ksh script is available at the root directory which shall be used to +set the necessary environment variables for CSQL. + +$. ./setupenv.ksh + +Start the server using csqlserver executable +$csqlserver + +This starts the server and creates the database file. + +Interacting with Server using csql client +----------------------------------------- +Open another terminal and run setupenv.ksh script to set the necessary +environment variables for CSQL. + +$. ./setupenv.ksh + +Run csql tool to get the CSQL prompt + +$csql +CSQL> + +You can execute DDL and DML statements on CSQL prompt. + +Note: +Refer UserManual.pdf available in docs folder for details on working with CSQL + +Shutting down the Server +------------------------ +Pressing Ctrl-C on the terminal where csqlserver is running, +is safe and will stop the server gracefully. diff --git a/build.ksh b/build.ksh index 5c26e980..0c12ade0 100755 --- a/build.ksh +++ b/build.ksh @@ -5,7 +5,7 @@ then echo "Please set JDK_HOME" exit 1 fi - +make -f Makefile.cvs ./configure --prefix=`pwd`/install CXXFLAGS="-g -I$JDK_HOME/include -I$JDK_HOME/include/linux" #./configure --prefix=`pwd`/install CXXFLAGS="-g -I$JDK_HOME/include -I$JDK_HOME/include/linux -Wno-write-strings" #./configure --prefix=`pwd`/install CXXFLAGS=-g diff --git a/csql.conf b/csql.conf index 183aead6..0ab34ceb 100644 --- a/csql.conf +++ b/csql.conf @@ -1,6 +1,10 @@ # CSQL System Configuration File #####################################Server Section######################## + +# Site ID for this CSQL server +SITE_ID=1 + #Important: For Server section parameters, make sure that the value is same for the # server process and all the csql client process which connects to it. otherwise, # behavior is undefined @@ -25,6 +29,9 @@ SYS_DB_KEY=2222 #Shared memory key to be used by the system to create and locate user database. USER_DB_KEY=3333 +#Log level 0->no logging 1->Fine 2->Finer 3->Finest +LOG_LEVEL=0 + #Give full path for the log file where important system actions are stored. LOG_FILE=/tmp/csql/log/log.out @@ -35,13 +42,27 @@ MAP_ADDRESS=400000000 # Whether to enable durability DURABILITY=false +# Whether to enable memory map architecture for user database +MMAP=false + +# Specifies the durability mode for redo log generation +# Valid values are +# 1 ->uses standard redo logging with O_APPEND mode +# 2 ->uses standard logging with serialization +# 3 ->uses O_SYNC flag +# 4 ->uses O_DIRECT flag + +DURABLE_MODE=1 + #Give full path for the database file where table and record information will #be stored for durability DATABASE_FILE=/tmp/csql/db -#Important: For Server section parameters, make sure that the value is same for the -# server process and all the csql client process which connects to it. otherwise, -# behavior is undefined +#Important: For Server section parameters, make sure that the value is same for the server process and all the csql client process which connects to it. otherwise, behavior is undefined + +# Give full path for the std error file to store all the errors during database operations +STDERR_FILE=stderr + #####################################Client Section######################## #Mutex timeout interval seconds @@ -59,19 +80,17 @@ LOCK_TIMEOUT_RETRIES=10 #Whether to enable caching of tables from target database CACHE_TABLE=false -#Set cache id for multiple bidirectional cache node for single data source -CACHE_ID=1 - #DSN Name to connect to the target database. #This should be present in ~/odbc.ini file DSN=myodbc3 +# Whethere to enable bidirectional updates for cached tables. ENABLE_BIDIRECTIONAL_CACHE=false CACHE_RECEIVER_WAIT_SECS=10 -#Give full path for the file where all the table information is stored -TABLE_CONFIG_FILE=/tmp/csql/csqltable.conf +#Mode of operation SYNC or ASYNC +CACHE_MODE=SYNC ##########################SqlNetworkServer Section######################## @@ -81,6 +100,33 @@ CSQL_SQL_SERVER=false #Set port for Network access PORT=5678 -ID_SHM_KEY=1947 +# Max number of seconds that the network layer waits to receive a pkt +NETWORK_RESPONSE_TIMEOUT=3 + +# Max number of seconds that the network layer waits to connect to sql server +NETWORK_CONNECT_TIMEOUT=5 + +#Give full path for the file where all the table information is stored +TABLE_CONFIG_FILE=/tmp/csql/csqltable.conf +#Give full path of the file where all the DSN information is stored +DS_CONFIG_FILE=/tmp/csql/csqlds.conf + +# Give full path for conflict Resolution file +CONFL_RESOL_FILE=/tmp/csql/conflResoFile.txt + +# MSGKEY for creating msg queue for MsgQueue Server +MSG_KEY=2525 + +# Maximum message that the message queue server is able to handle for +# asynchronous updates. This value is is default value of 'kernel.msgmax' +# parameter. +ASYNC_MSGMAX=8192 + +# Maximum number of messages that the message queue server will hold for a site +# that is down in the replication group. +MAX_QUEUE_LOGS=100 + +# Shared memory key for id generators +ID_SHM_KEY=1947 #####################################End Section######################## diff --git a/csqltable.conf b/csqltable.conf index cec0b1a6..707aef37 100644 --- a/csqltable.conf +++ b/csqltable.conf @@ -1 +1,2 @@ -1:t1 +# : +1:t1 NULL NULL NULL -- 2.11.4.GIT