Sequoia (JDBC-based database cluster middleware) User Manual

Source: Internet
Author: User
Tags microsoft help
Sequoia (JDBC-based database cluster middleware) User Manual
1. Getting Started

1.1. What is Sequoia?

Sequoia is a database cluster middleware that enables any Java-based application.Program(Single-Host application, Servlet
Or EJB containers). You do not need to modify the client program or application service.
Or database server software. You only need to ensure that any access to the database is performed through Sequoia.

Sequoia is a free, open source project. It is a continuation of the objectweb Consortium's C-JDBC project. Sequoia uses Apache V2 authorization protocol while C-JDBC is lgpl authorized.

Sequoia also provides drivers for non-Java programs. The carob project is responsible for this development. The Oak project also provides an Eclipse plug-in for Sequoia.

1.2. What are the requirements for using Sequoia?

To use Sequoia, You need:
A client application that accesses the database through the JDBC driver
Java virtual machine compatible with jdk1.4 or later
Database with type 1, 2, 3 or 4 JDBC drivers or ODBC drivers that can be connected through a JDBC-ODBC Bridge
A network that supports TCP/IP protocol and is used to connect nodes in a cluster.

NOTE: If your client application does not use the JDBC driver, you can use the C ++ API provided by the carob project.
Or ODBC driver.

1.3. Why Sequoia?

If your Java application or Java-based application server software needs to access one or more databases, then the database
The server either becomes the bottleneck of your system, or is prone to single point of failure, or both. Sequoia can use the following
Function helps you solve the above problems:

Improve system performance by adding database nodes and Server Load balancer Technology
Ensures high reliability of the database layer. For example, when a database crashes, the database replication technology is used to transparently recover from the fault.
Performance is greatly improved through the well-designed query cache and transparent connection pool technology
Provides SQL statistics logs for ease of analysis and management
Supports cluster creation on different database engines

1.4. Working Principle

The flexible Sequoia architecture makes your database layer highly scalable, highly reliable, and fault recovery. Sequoia implements
For example, the system described in raidb concept: Redundant Array of cheap databases (see Chapter 9th, "basic concepts of raidb ").
Nodes are distributed and deployed, and Sequoia implements load balancing on these nodes.

Sequoia provides a common JDBC driver for the client (See Chapter 5th, "Sequoia driver ").
The Sequoia Controller is responsible for sending SQL requests to the Sequoia controller (See Chapter 7th, "Sequoia controller ").
Balanced to the Database Cluster (read operations are balanced, write operations are broadcast). Sequoia can integrate any JDBC
Driven relational data management systems, that is, most open-source or commercial database products today. Figure 1, "Sequoia principles"
Shows the overview of Sequoia.

Figure 1 Sequoia Principle

Sequoia allows you to create any cluster configuration, including mixing the database engines provided by different vendors.
It is characterized by performance scalability, fault tolerance, and reliability. At the same time, sequoia is managing, logging, and SQL requests.
Cache also provides good support.

The Sequoia architecture is very open, allowing you to freely add request queues, Server Load balancer, connection management, and CacheAlgorithm
And so on.

1.5, cost ry?
From the software point of view, sequoia is an open-source software based on the Apache V2 authorization protocol. It can be used in personal or commercial projects.
Free to use. If you need to use a commercial relational database management system to build your cluster, you need
Additional Authorization for product purchase. However, you may be able to use open-source databases (usually free of charge ).

If you need higher performance and better fault recovery capabilities, you need to purchase more hardware. sequoia is designed
It can work well on common workstations to provide cheap open-source database cluster solutions. Of course, it
It can also be deployed on a large server with a symmetric multi-processor. standard Ethernet enables it to provide services more efficiently.

1.6. What transplantation work is required?
You hardly need to modify your application or database.
You only need to update the JDBC driver configuration of your application (normally, this only needs to update a configuration file ),
Configure the Sequoia configuration file (See Chapter 10th, "virtual database configuration ")

2. How to obtain Sequoia
Cumentation and other tools such
As the Sequoia administration console.
Sequoia's binary distribution package can be downloaded from Sequoia's website (http://sequoia.continuent.org/), mainly
Includes Sequoia drivers, controllers, documents, and tools such as management terminals.

Note:
Sequoia also provides source code distribution packages. AllCodeYou can download the package from a CVS server that allows anonymous access. For more information, see the Sequoia developer guide. Most users only need binary distribution packages.

The distribution package has the following formats (x. y indicates the Sequoia version number)
Sequoia-x.y-bin-installer.jar:
Java graphical installer (using izpack (http://www.izforge.com/izpack/) Technology)
Sequoia-x.y-bin.tar.gz:
Binary compressed packages in UNIX format
Sequoia-x.y-bin.zip:
Binary compressed packages for Windows Platforms

We strongly recommend that you use a distribution package in the Java installer format because it can automatically configure scripts based on your system.

Note:
All distribution packages contain user documents.

3. Install
3.1. Sequoia Controller
3.1.1. Use Java graphical installation program

The simplest way to install sequoia is to use a graphical installer. This requires that you have installed the Java Virtual Machine. UNIX
You can start the installer by typing the following:
Bash> JAVA-jar sequoia-x.y.bin-installer.jar
Windows users can use the same command, or, if your JRE environment is correctly installed, simply double-click the JAR File
Run it.

3.1.2 carefully installed using binary distribution packages
If you want to install programs in other formats (for example, you have not installed JVM, or your system does not support graphical interfaces ),
You must extract the downloaded package to a directory and set the environment variable "sequoia_home ".
Note:
If you are using a Java installer, you do not need to set any environment variables, because the installer automatically calls
The entire STARTUP script.

To set the environment variable "sequoia_home ":
Unix users can do the following:
Bash> mkdir-P/usr/local/Sequoia
Bash> Cd/usr/local/Sequoia
Bash> tar xfz/path-to-Sequoia-bin-Dist/sequoia-x.y-bin.tar.gz
Bash> export sequoia_home =/usr/local/Sequoia
Note:
In this example, we assume that you install Sequoia to the/usr/local/Sequoia directory.

You can modify your shell configuration file (. bashrc, or. cshrc) to set the environment variable permanently.

For Windows, you need to decompress the file using a tool such as WinZip.
Different, select the following step to set the environment variable "cjdb_home ":

Windows 95 or 98: You must insert the following line in the autoexec. BAT file:
Set sequoia_home = "C: \ Program Files \ Sequoia"
Win95 or Win98 users: Add the following sentence to the autoexec. BAT file:
Set sequoia_home = "C: \ Program Files \ Sequoia"

Windows ME: Choose "start"> "program"> "attachment"> "System Tools"> "system information". The title "Microsoft Help and Support" is displayed"
In the left-side Navigation Pane, choose Main Menu> Tools> system configuration tools> environment variables, click "add", and enter
"Sequoia_home", "variable value", input "C: \ Program Files \ Sequoia". After setting, the system will prompt you
Restart.

Windows NT: Start Menu-> Settings-> Control Panel-> system-> environment variables, click "add", and enter the variable name
"Sequoia_home", "variable value", enter "C: \ Program Files \ Sequoia ".

Windows 2000: Choose Start> Settings> Control Panel> system> advanced. Click Add and enter the variable name
"Sequoia_home", "variable value", enter "C: \ Program Files \ Sequoia ".

Windows XP: Choose Start> Settings> Control Panel> system> advanced. Click Add and enter the variable name
"Sequoia_home", "variable value", enter "C: \ Program Files \ Sequoia ".

Note:
In this example, we assume that you install Sequoia to the "C: \ Program Files \ Sequoia" directory.
Note:
Do not forget to add double quotation marks to your path. Otherwise, the startup script will cause an error because it cannot identify the path with spaces.

3.2. Sequoia driver

After the Sequoia controller is installed, you can find
Jar package.

To install the Sequoia driver, you just need to add the sequoia-driver.jar file to the class path of the client application.
The driver will replace the original database-specific driver of the client application. Therefore, the Sequoia driver and
The controller can be seen as a proxy between the client application and the dedicated database driver.

3.3. Unveil Sequoia

Run the demo-raidb1.sh or demo-raidb1.bat under the demo directory under the Sequoia installation directory to start
A hypersonic Database Cluster demo with RAIDb-1 configuration.

If you are still unfamiliar with clusters or Sequoia, this demo is quite useful. The demo is installed as follows:
Enable two hypersonic databases to listen on ports 9001 and 9002 respectively.
Another one is on port 9003 and is used as a log database for fault recovery.

The Sequoia controller has been configured to automatically load Virtual databases containing the above two databases. The controller configuration file is
Sequoia_home/config/controller/controller-raidb1.xml, the virtual database configuration file is
Sequoia_home/config/virtualdatabase/hsqldb-raidb1.xml.

After the RAIDb-1 cluster is started, you can connect to Sequoia using iSQL (a graphical SQL terminal distributed along with Sequoia.
Run the script iSQL. Sh or iSQL. BAT to start iSQL.

The username used to log on to sequoia is "user", and the password is blank. The account used to log on to two hsql databases is "test", and the password is also
Null.
Tip:
The online documentation on the Sequoia website contains a tutorial on how to use the demo.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.