1.1.1

Table Of Contents
Example: Multiple Servers Using Default Multicast Port for Peer Discovery
-- start a server using default mcast-port (10334) for
discovery,
-- with current directory as the working directory, and
network server
- running on default localhost:1527
sqlf server start
- start a second server talking to the first with dir2 as
working directory;
- network server is started explicitly on localhost:1528
sqlf server start -dir=dir2 -client-port=1528
- start another server talking to the first two with dir3
as working
- directory; network server is disabled explicitly
sqlf server start -dir=dir3 -run-netserver=false
- check from the SQLFire command shell
sqlf
sqlf> connect client 'localhost:1527';
sqlf> select ID from sys.members;
- output will show three members in the distributed system
- stop everything
sqlf> quit;
sqlf server stop -dir=dir3
sqlf server stop -dir=dir2
sqlf server stop
Example: Servers and Client Using Locator
- start a locator for peer discovery on port 3241
-- listening on all addresses
sqlf locator start -peer-discovery-port=3241
- start three servers as before using different client ports
-- and using the above started locator
sqlf server start -dir=dir1 -locators=localhost:3241
-client-port=1528
sqlf server start -dir=dir2 -locators=localhost:3241
-client-port=1529
sqlf server start -dir=dir3 -locators=localhost:3241
-client-port=1530
- check from the SQLFire command shell
- connect using the locator's client-port (default 1527)
-- for load balanced connection to one of the servers
-- transparently and for reliable failover in case the
-- server goes down
sqlf
sqlf> connect client 'localhost:1527';
sqlf> select ID, KIND from sys.members;
- output will show four members with three as data stores
-- and one as locator
- stop everything
sqlf> quit;
sqlf server stop -dir=dir3
sqlf server stop -dir=dir2
sqlf server stop -dir=dir1
sqlf locator stop
vFabric SQLFire User's Guide398
vFabric SQLFire Reference