Specify a name for the locator that you wish to start on the localhost. If you do not specify the member name, gfsh will automatically pick a random name. This is useful for automation.
The server's cache.xml declares a cache-server element, which identifies the JVM as a server in the distributed system.
Once the locator and server are started, the locator tracks the server as a peer in its distributed system and as a server listening for client connections at port 40404.
The client's cache.xml <client-cache> declaration automatically configures it as a standalone GemFire application.
Declares a single connection pool with the locator as the reference for obtaining server connection information.
Creates cs_region with the client region shortcut configuration, CACHING_PROXY. This configures it as a client region that stores data in the client cache.
There is only one pool defined for the client, so the pool is automatically assigned to all client regions.
With this, the client is configured to go to the locator for the server connection location. Then any cache miss or put in the client region is automatically forwarded to the server.
The following API example walks through the creation of a standalone publisher client and the client pool and region.
This API example creates a standalone subscriber client using the same connectStandalone method as the previous example.
You can specify a static server list instead of a locator list in the client configuration. With this configuration, the client's server information does not change for the life of the client member. You do not get dynamic server discovery, server load conditioning, or the option of logical server grouping. This model is useful for very small deployments, such as test systems, where your server pool is stable. It avoids the administrative overhead of running locators.
This model is also suitable if you must use hardware load balancers. You can put the addresses of the load balancers in your server list and allow the balancers to redirect your client connections.
The client's server specification must match the addresses where the servers are listening. In the server cache configuration file, here are the pertinent settings.
The client's cache.xml file declares a connection pool with the server explicitly listed and names the pool in the attributes for the client region. This XML file uses a region attributes template to initialize the region attributes configuration.