The Development Environment

An efficient app development workflow first tests the app in a local development environment. Development continues by pushing the app to a Pivotal Platform space for production testing with a Pivotal Cloud Cache service instance. Local development shortens the design loop by eliminating the time it takes to push the app to the Pivotal Platform environment.

The Local Cluster Environment

To develop locally, you will need access to a cluster that acts as a stand-in for a Cloud Cache service instance. A Pivotal GemFire cluster works well as a stand-in. Instantiation and configuration of a GemFire cluster uses gfsh, a command-line configuration tool distributed with GemFire.

Follow these steps to obtain, install, and instantiate a GemFire cluster:

  1. Download the Pivotal GemFire distribution artifact from Pivotal’s proprietary GemFire repository. To ease the development effort, choose a version of GemFire that matches the version of GemFire within your version of Cloud Cache, as the gfsh command line interface has version matching restrictions. You can find the GemFire version within Cloud Cache in the Product Snapshot for your version of Cloud Cache.

  2. Install GemFire following the directions at Installing Pivotal GemFire.

  3. Use gfsh to instantiate and configure the local GemFire cluster. Follow any of the examples in the GitHub node-examples repository. Each example contains a scripts directory with a script that starts up a local GemFire cluster and creates the regions using gfsh. Copy and modify one of these scripts for use with your custom environment.

The Pivotal Platform Environment

Use the directions in Create or Delete a Service Instance to instantiate a Cloud Cache service instance. A dev plan will be sufficient for running any of the examples. Directions in View Available Plans describe how to see the plans available for your custom environment.

Your app will will do CRUD operations on data in regions. Create those regions on the servers within the Cloud Cache service instance by using gfsh. First, connect to the service instance using gfsh. Then, create the region using gfsh.

The instructions within Accessing a Service Instance describe these steps for connecting to the Cloud Cache service instance:

  1. Create a service key. The service key will contain the gfsh command needed to connect to the Cloud Cache service instance.
  2. Run gfsh.
  3. Connect using the gfsh command from the service key.

Once connected, use gfsh create the regions needed by your app. Create Regions details how to create a region.