SQLFire is a memory-optimized, distributed database
management system designed for applications that have demanding scalability and
availability requirements. SQLFire offers some of the best features usually
only seen in NoSQL databases, such as horizontal scalability, shared-nothing
persistence and built in fault tolerance, but does it all while providing a
real SQL interface. Applications can manage database tables entirely in memory,
or they can persist tables to disk to reload the data after restarting the
system. A SQLFire distributed system can be easily scaled out using commodity
hardware.
In this post we’ll see how to setup and start a cluster of
multiple SQLFire servers.
A SQLFire deployment consists of distributed member
processes that connect to each other to form a peer-to-peer network, also known
as a distributed system or SQLFire cluster. A server is a process that hosts
data and is a member of a peer-to-peer distributed system.
The connection management to the available servers is done
using a locator. A locator maintains a list of available servers in the
cluster, and updates that list as servers join and leave the cluster. Locators
also load balance client connections across all available servers.
To create a locator you can use the sqlf locator command as
given below.
sqlf locator start -dir=MyServerLocator -peer-discovery-address=localhost
-peer-discovery-port=10101 -client-bind-address=localhost -client-port=1527
Where MyServerLocator is
the folder created at the executing directory for the locator.
By starting the locator member first, the locator can manage
cluster membership from the start as new servers join and leave the distributed
system.
Use the sqlf server start command to start the servers and
join them to the distributed system by specifying the locator as given below.
sqlf server start -dir=MyServer1 -locators=localhost[10101] -bind-address=localhost
-client-port=1528
sqlf server start -dir=MyServer2 -locators=localhost[10101] -bind-address=localhost
-client-port=1529
To connect to the SQLFire cluster using the JDBC thin client
driver, use the connect client command and specify the host and port number of
the SQLFire locator as
connect client
'localhost:1527';
No comments:
Post a Comment