Csql Cache Presentation


Published on

CSQL Caching enables applications to significantly improve its throughput. As data is cached on the main-memory database, cache delivers a real-time, dynamic, updatable cache for frequently accessed data in the disk based databases such as Oracle, MySQL or

Published in: Technology
1 Comment
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Csql Cache Presentation

  1. 1. CSQL DATABASE CACHE Bijaya Kumar Sahu Database Developer Lakshya Solutions Pvt Ltd [email_address]
  2. 2. What Is Next… <ul><li>CSQL Cache Functionalities </li></ul><ul><li>CSQL Cache Configuration </li></ul><ul><li>Cache Tools </li></ul>Information About :
  3. 3. What is CSQL Cache ? CSQL Cache is a client side caching mechanism for any disk-based database which increase the throughput of existing applications without requiring any application changes.
  4. 4. CSQL Cache Functionalities <ul><li>Updateable Cache Tables </li></ul><ul><li>Bi-Directional Updates </li></ul><ul><li>Synchronous and Asynchronous update propagation </li></ul>Cont…
  5. 5. CSQL Cache Functionalities <ul><li>Partial cache Updates </li></ul><ul><li>Multiple cache granularity </li></ul><ul><li>Recovery for cached tables </li></ul>Cont…
  6. 6. CSQL Cache Functionalities <ul><li>Tools to validate the coherence of cache </li></ul><ul><li>Transparent access to non-cached tables </li></ul><ul><li>Horizontally Scalable </li></ul><ul><li>Transparent Fail over </li></ul>
  7. 7. CSQL Cache Configuration <ul><li>CACHE_TABLE </li></ul><ul><li>CACHE_ID </li></ul><ul><li>DSN </li></ul><ul><li>ENABLE_BIDIRECTIONAL_CACHE </li></ul><ul><li>CACHE_RECEIVER_WAIT_SECS </li></ul><ul><li>TABLE_CONFIG_FILE </li></ul>For CSQL Cache Configuration , Following flag need to be set which is present in “ csql.conf ” file.
  8. 8. Unidirectional Cache Configuration <ul><li>CACHE_TABLE = true </li></ul><ul><li>CACHE_ID = 1 </li></ul><ul><li>DSN = <Dsn name of target database>* </li></ul><ul><li>ENABLE_BIDIRECTIONAL_CACHE = false </li></ul><ul><li>CACHE_RECEIVER_WAIT_SECS = 10 </li></ul><ul><li>TABLE_CONFIG_FILE = <path of table configure file>** </li></ul>For Unidirectional Caching, Set flags as below Cont…
  9. 9. Unidirectional Cache Configuration <ul><li>For Unidirectional Caching, Be sure that </li></ul><ul><li>CSQL server and target database is running. </li></ul><ul><li>Isql tool for target database working properly. </li></ul><ul><li>Use cache tool to cache table to Cache node. </li></ul>
  10. 10. Bi-Directional Cache Configuration For Bi-Directional Caching, Set flags as below <ul><li>CACHE_TABLE = true </li></ul><ul><li>CACHE_ID = 1 </li></ul><ul><li>DSN = <Dsn name of target database>* </li></ul><ul><li>ENABLE_BIDIRECTIONAL_CACHE = true </li></ul><ul><li>CACHE_RECEIVER_WAIT_SECS = 10 </li></ul><ul><li>TABLE_CONFIG_FILE = <path of table configure file>** </li></ul>Cont… * For MySql := myodbc3, For Postgres : = psql etc. ** By default path /tmp/csql/csqltable.conf
  11. 11. Bi-Directional Cache Configuration Create log table in target database. For MySql : create table csql_log_int ( tablename char(64), pkid int, operation int , cacheid int, id int not null unique auto_increment) engine=‘innodb’ ; For Postgres : create table csql_log_int( tablename varchar(64), pkid int, operation int,cacheid int); alter table csql_log_int add id serial; Cont…
  12. 12. Bi-Directional Cache Configuration <ul><li>For Bi-directional Caching, </li></ul><ul><li>Run Trigger on key field of cached table. </li></ul><ul><li>Configure Isql tool for target database </li></ul><ul><li>Be sure CSQL server and target database server are running </li></ul><ul><li>Use cache tool to cache table to Cache node. </li></ul>
  13. 13. Multiple Cache Node Configuration <ul><li>For Multiple Cache Node Configuration </li></ul><ul><li>Change CACHE_ID in the csql.conf file as unique id for different cache </li></ul><ul><li>node. </li></ul><ul><li>Configure as per Bi-directional Cache Node. </li></ul><ul><li>Be sure CSQL server in each node and target database server are running. </li></ul><ul><li>Use cache tool to cache table into each Cache Node . </li></ul><ul><li>Make appropriate changes in trigger file. </li></ul>
  14. 14. Cache Tools CSQL Cache have following Cache tools. <ul><li>cachetable </li></ul><ul><li>cacheverify </li></ul>Cont…
  15. 15. Cache Tools ( cachetable ) <ul><li>Full Caching </li></ul><ul><li>Partial Caching ( Record based & Field based ) </li></ul><ul><li>Caching with Direct Updates </li></ul>CSQL supports three ways of caching mode Cont… To cache table from target database to cache node.
  16. 16. Cache Tools ( cachetable ) Usage cachetable [-U username] [-P password] -t tablename [-D] -c &quot;condition&quot; -f &quot;selected field names&quot; -p fieldname [-R] [-s] [-r] username -> username to connect with csql. password -> password for the above username to connect with csql. tablename -> table name to be cached in csql from target db. Cont…
  17. 17. Cache Tools ( cachetable ) fieldname -> field name to be specified for the bidirectional caching on which trigger to be run . R -> Recover all cached tables from the target database. s -> Load only the records from target db. Assumes table is already created in csql r -> Reload the table. get the latest image of table from target db Cont…
  18. 18. Cache Tools ( cachetable ) u -> Unload the table. if used with -s option, removes only records and preserves the schema D -> Enable direct option. For any non select SQL statement directly interact with target database. no option -> Get table definition and records from target db and create in csql.
  19. 19. Cache Tools ( cacheverify ) Usage cacheverify [-U username] [-P password] -t tablename [-p] [-f] username -> username to connect with csql. password -> password for the above username to connect with csql. Display the consistency in the specified cached table in between cache node and target database. Cont…
  20. 20. Cache Tools ( cacheverify ) tablename -> cached table name in csql from target db. p -> verification at primary key field level f -> verification at record level ?-> help
  21. 21. For More Information Visit… http://sourceforge.net/projects/csql/ http://www.csqlcache.com/ http://www.csqldb.com/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.