Running one container allows several clients to use the same grid, but doesn't offer much more than that. We are still limited to one JVM heap, one computer's CPU resources, and bandwidth. Starting additional containers is easy:
C:\wxs\ObjectGrid\bin>startOgServer.bat server1 -objectgridFile c:\wxs\workspace\PaymentProcessor\bin\jpa-objectgrid.xml -deploymentPolicyFile
c:\wxs\workspace\PaymentProcessor\bin\ogdeployment.xml
-catalogServiceEndPoints galvatron:2809 -jvmArgs -cp c:\jboss-4.2.2.GA\server\default\lib\*;c:\wxs\wor
kspace\PaymentProcessor\bin;c:\jboss-4.2.2.GA\lib\*
This is almost the same line used to start server0
. This gives us a second container to store objects in. We can start as many servers as we want with this command line by changing the server name each time we use it.
Remember that containers hold shards. A shard is the smallest unit of placement in the ObjectGrid, which means that a grid configured to use just one shard won't get any benefit...