1.1.1

Table Of Contents
Example: Servers and Accessors with Server Groups and Locator
- start a locator for peer discovery on port 3241
sqlf locator start -peer-discovery-port=3241
- start three servers using different client
-- ports and using the above started locator
-- using two server groups (ordersdb and
-- customers) with one server in both
-- the groups
sqlf server start -dir=dir1 -locators=localhost:3241
-client-port=1528 -server-groups=ordersdb
sqlf server start -dir=dir2 -locators=localhost:3241
-client-port=1529 -server-groups=customers
sqlf server start -dir=dir3 -locators=localhost:3241
-client-port=1530 -server-groups=ordersdb,customers
- start a couple of peers that will
-- not host data but in both server
-- groups; using server groups in
-- accessors is only useful if
-- executing data-aware procedures
-- targeted to those members
sqlf server start -dir=dir4 -locators=localhost:3241
-client-port=1531 -host-data=false
-server-groups=ordersdb,customers
sqlf server start -dir=dir5 -locators=localhost:3241
-client-port=1532 -host-data=false
-server-groups=ordersdb,customers
- check from the SQLFire command shell
- connect using the locator's client-port
-- (default 1527) for load balanced
- connection to one of the servers/accessors
-- transparently and for reliable
-- failover in case the server/accessor
-- goes down
sqlf
sqlf> connect client 'localhost:1527';
sqlf> select ID, KIND from sys.members;
- example output
ID |KIND
-----------------------------------------------
pc29(23372)<v0>:28185/36245 |locator(normal)
pc29(23742)<v3>:19653/33509 |datastore(normal)
pc29(23880)<v4>:37719/51114 |accessor(normal)
pc29(23611)<v2>:52031/53106 |datastore(normal)
pc29(24021)<v5>:58510/43678 |accessor(normal)
pc29(23503)<v1>:30307/36105 |datastore(normal)
6 rows selected
-- also check for server groups
sqlf> select ID, KIND, SERVERGROUPS from sys.members;
401
sqlf Launcher Commands