View Source

These examples demonstrate how to implement specific functionality in GemFire.

h3. How the Examples Work
Besides showing a specific GemFire feature, every example program follows the standard startup and shutdown steps for a GemFire system member. Each example:

* Initializes its cache and data regions using a declarative XML configuration file. The cache creation automatically creates the distributed system connection with any running members.
* Does its work.
* Closes its cache and exits.

Related Javadocs are listed for each example.

[Read more about creating and closing a cache|http://www.gemstone.com/docs/6.5.0/product/docs/html/Manuals/wwhelp/wwhimpl/js/html/wwhelp.htm#href=DevelopersGuide/AppConfiguration.4.9.html].

{anchor:SettingUpTheEnvironment}
h3. Setting Up the Environment
# If you have not already done so, install and configure GemFire Enterprise and the product examples:
#* [Setting Up GemFire|Setting Up GemFire]
#* [Setting Up the Product Examples|Setting Up the Product Examples]
# Start two terminal sessions with their environments set up for GemFire and the product examples.
# In both sessions, change directory (cd) to the quickstart directory under your examples installation.

If you have problems running the examples, see the [troubleshooting checklist|Troubleshooting Checklist].

h3. Example Files
Source and configuration files are located under the examples installation quickstart directory:
* gemfire.properties, used by all of the examples
* Java source files in the quickstart subdirectory
* XML cache configuration files in the xml subdirectory

For descriptions and example walkthroughs for these different file types, see the [Walkthrough of the Example Files in the Hello World Example|Hello World Example#WalkthroughOfTheExampleFiles].

h3. Example Documentation
The table provides links to documentation for each Quick Start example.

|| Example documentation \\ || Description \\ ||
| [Replicated Caching|Replicated Caching Example] | Automatically replicate all data in the distributed region into your local application. \\ |
| [Server-Managed Caching|Server-Managed Caching Example] | Use the client/server topology to scale your application vertically, with many clients benefiting from centralized server-side data management. \\ |
| [Partitioned Data Caching|Partitioned Data Caching Example] | Split large data sets between members, with the data seen by all members as a unified set. \\ |
| [Reliable Event Notifications |Reliable Event Notifications Examples] | Configure automatic key\- and query-based event notifications from server to client. Designate critical event sets as durable, so the server stores events while the client is disconnected and replays them when the client reconnects. \\ |
| [Persisting Data to Disk|Persisting Data to Disk Example] | Store data to disk for backup and persistence. \\ |
| [Overflowing Data to Disk|Overflowing Data to Disk Example] | Overflow data to disk when a region reaches capacity in memory. \\ |
| [Cache Expiration|Cache Expiration Example] | Ensure an up-to-date data set and help control region size by removing old or unused data entries. \\ |
| [Cache Eviction|Cache Eviction Example] | Manage region size by removing least-used data entries to make way for new queries. \\ |
| [Querying|Querying Example] | Run object-based OQL queries against your data. \\ |
| [Transactions|Transactions Example] | Combine data operations into logical units that succeed or fail together. \\ |
| [Delta Propagation|Delta Propagation Example] | Distribute only the changes to your object - the deltas - instead of the entire object. \\ |
| [Function Execution|Function Execution Example] | Distribute function execution to the members hosting your function's data. \\ |
| [Secure Client|Secure Client Example] | Run your client/server installation with secure access. \\ |
| [Multiple Secure Clients|Multiple Secure Client Example] | Run your client/server installation with secure access for multiple secure users inside a single client application. \\ |
| [Distributed Locking |Distributed Locking Example] | Coordinate efforts between applications using a distributed locking service. \\ |
| [Product Benchmarks|Benchmark Examples] | Run peer-to-peer and client/server benchmark tests that measure the product's distribution speeds. \\ |
h3. Building Highly Scalable Applications with Spring GemFire Integration
After you familiarize yourself with basic GemFire Enterprise functionality, you'll probably want to check out [Spring GemFire Integration|http://www.springsource.org/spring-gemfire]. Use Spring GemFire Integration with GemFire as a distributed data management platform to build Spring-powered, highly scalable applications.