Giter Club home page Giter Club logo

df16-sf-kafka-demo's Introduction

df16-sf-kafka-demo

Demo code for the Dreamforce 2016 session Analyzing Salesforce Data with Heroku, Kafka, and Connect.

The demo consists of the following parts:

  1. A script that continuously posts to Salesforce Chatter.
  2. Apex triggers that send Salesforce Chatter data to a Heroku app using an asynchronous HTTP callout.
  3. A producer (the Heroku app), which writes a subset of the data to Apache Kafka on Heroku.
  4. A consumer that reads from Kafka and performs sentiment analysis.

Heroku setup

This creates the app that receives REST requests from Salesforce and writes to Kafka.

  1. heroku apps:create MY-APP-NAME
  2. heroku addons:create heroku-kafka:beta-standard-0
  3. heroku plugins:install heroku-kafka
  4. heroku kafka:wait
  5. heroku kafka:topics:create chatter
  6. Deploy this repo to your app.

Salesforce setup

  1. Add the Apex class and triggers from the apex directory to your Salesforce org.
  2. Update the endpoint URL in HerokuPoster.cls to your Heroku app's URL.
  3. Add your Heroku app's URL to the Remote Site Settings in Salesforce.

Posting Chatter data continuously

See the instructions at https://github.com/alouie-sfdc/chatter-data-pump

Running the Kafka consumer locally

This will use the open source TextBlob package to perform sentiment analysis on the Chatter data.

  1. pip install -r requirements.txt
  2. python consumer.py
  3. CTRL-C to quit

df16-sf-kafka-demo's People

Contributors

alouie-sfdc avatar

Watchers

Manjunath avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.