solidDB Help : Samples : Grid sample
  
Grid sample
This sample shows how to use the solidDB Grid functionality.
The files for the sample are located in the soliddb-installdir\samples\grid directory. For general information about running the samples, see Samples.
The sample creates a grid from an initial solidDB server, adds additional nodes to the grid and demonstrates how non-partitioned (shared) and partitioned tables are populated, replicated, and queried in a grid.
Running the sample
Run the runme script or runsample (on Windows, runme.bat or runsample.bat) to perform the following steps. The runsample scripts do not require the make or nmake utility:
1 Start a standard server (to use as the first server in the grid) and three other servers that are configured so that they can be added to a grid.
2 Create a table on the standard server and add some data (step runs normal.sql).
3 Create a grid from the standard server and use ADMIN COMMAND 'grid' commands to check the status of the grid.
4 Create a non-partitioned (shared) table on the standard server (grid node) and add some data (step runs shared1.sql).
5 Add the other three servers to the grid, check the status of the grid, and show that both of the tables (and data) are present on all servers (nodes) in the grid.
6 Create another non-partitioned table on one of the grid nodes, add some data, and show that the table and data is present on all nodes in the grid (step runs shared2.sql).
7 Create a partitioned table on one of the grid nodes (step runs create_partitioned.sql).
8 Add data to the partitioned table by using the grid-aware driver so that each row of data is routed to the correct node (step runs insert_partitioned.sql).
9 Select data from the grid; the result returns all the rows that were added.
10 Select data from each local node (by using SET GRID READ LOCAL); the results show that not all rows are present on every node (step runs local_read_partitioned.sql).
11 Connect to each node in turn and (by not using SET GRID READ LOCAL) show that each node reports the same number of rows in the table (even though the node might only host a subset of the rows).
Go up to
Samples