Newer Version Available

This content describes an older version of this product. View Latest

Deploy a Sample Project to Your Org

Use Workbench to copy all project components to your org.
  1. Download the Salesforce Durable Streaming Demo .zip file from the developerforce github repository.
    If you want, you can browse the contents of the project at https://github.com/developerforce/SalesforceDurableStreamingDemo. The sample app contains two Visualforce pages with related components and some common components. The following common components are installed in your org when you deploy the .zip file.
    Component Description
    cometdReplayExtension Static resource representing a CometD extension in JavaScript. This extension implements the replay mechanism for Streaming API.
    cometd, jquery, jquery_cometd, json2 Static resources for CometD 3.1.0, jquery, and JSON.
    The following app components are for the Durable PushTopic Streaming page.
    Component Description
    DurablePushTopicEventDisplay A Visualforce component that uses the CometD extension cometdReplayExtension to replay events. The extension handles the handshake and subscribe calls and sets replay options.

    Having the replay functionality in a Visualforce component allows you to add it to your Visualforce page for reuse in your app.

    DurablePushTopicStreamingController Apex controller that holds the logic behind the Visualforce page.
    DurablePushTopicStreamingDemo Visualforce Page Visualforce page. This page is the main page you use to generate, view, and replay durable PushTopic events.

    The following app components are for the Durable Generic Streaming page.

    Component Description
    DurableGenericEventDisplay A Visualforce component that uses the CometD extension cometdReplayExtension to replay events. The extension handles the handshake and subscribe calls and sets replay options.

    Having the replay functionality in a Visualforce component allows you to add it to your Visualforce page for reuse in your app.

    DurableGenericStreamingController Apex controller that holds the logic behind the Visualforce page.
    StreamingChannel Custom object used for creating streaming channels.
    DurableGenericStreamingDemo Visualforce Page Visualforce page. This page is the main page you use to generate, view, and replay durable generic events.
    DurableStreamingDemo Permission Set Permission set used to grant read and create access to the StreamingChannel sObject.

    You use Workbench to migrate the zip file to your org.

  2. Log in to Workbench at https://workbench.developerforce.com/login.php.

    Workbench is a free, open source, community-supported tool (see the Help page in Workbench). Salesforce provides a hosted instance of Workbench for demonstration purposes only—Salesforce recommends that you do not use this hosted instance of Workbench to access data in a production database. If you want to use Workbench for your production database, you can download, host, and configure it using your own resources. You can download Workbench from https://github.com/ryanbrainard/forceworkbench/releases.

    Important

  3. For Environment, keep the production default value.
  4. Ensure that the value for API Version is at least 37.0.
  5. Accept the service terms, and then click Login with Salesforce.
  6. Enter your Developer Edition org username and password, and then click Log In.
  7. Select migration | Deploy.
  8. Click Choose File and locate the .zip file that you downloaded.
  9. Click Next, and then click Deploy.
  10. Wait until the deployment finishes and the status of the deployment changes to Succeeded.
  11. Log in to your org in another browser tab.