Purposeful Places - A Focus Lens for Work


With the latest cloud release, Jive introduced Purposeful Places, which are social groups that provide a structured context for user engagement around specific topic or problem. For example, a Salesforce Dealroom lets users keep abreast of the conversation surrounding a Salesforce opportunity, by pipping in relevant Chatter posts and comments into Jive in the form of activity stream entries. Additionally, the group may also present "Tiles" for displaying the latest facts for the opportunity such as monetary value, name of the primary contact, or percentage likelihood of close. Jive enables live updates of these facts by exposing endpoints for 3rd parties to push in data asynchronously.

 

Integration Services & the Jive NodeJS SDK


Jive makes it easy to create these backend services responsible for pushing stream and tile updates into a Purposeful Place! We created a NodeJS SDK for kickstarting your service. On top of Node being an amazing platform for rapid development, the Jive SDK even further accelerates development.  Literally within minutes you can have an service capable of serving the UI for configuring your tiles and activity stream integrations inside a Purposeful Place, as well as push data into these integration points.

 

  • Imitation is the finest form of flattery. In building the jive-sdk, we've tried to copy the patterns of popular frameworks, like Express. You can use the command line tool to autogenerate templates of all the supported flavors of Tiles, as well as full integration examples with popular systems such as Salesforce. Each example is ready out of the box for use, and deployable to the cloud with the minimum fuss. Here's the transcript of setting up a working Salesforce integration. The server was ready to go in minutes.

lt-a7-120000:sfdc aron.racho$ jive-sdk create sfdc_opportunity_activity

Preparing example  sfdc_opportunity_activity /private/tmp/sfdc

... Done!


Contents of tiles directory ( /private/tmp/sfdc/tiles ):

sfdc_opportunity_activity


Things you should do now, if you haven't done them already.

(1) Install dependent modules:  npm update

(2) Don't forget to edit /private/tmp/sfdc/jiveclientconfiguration.json to specify your clientID, clientSecret, clientUrl, and other important setup options!When done, run your service:

  node app.jslt-a7-120000:sfdc aron.racho$ npm install


npm WARN package.json sfdc_opportunity_activity@0.0.1 No README.md file found!...

...└── mongodb@1.2.14 (bson@0.1.8)

lt-a7-120000:sfdc aron.racho$ node app.js

[2013-05-14 23:32:22.497] [INFO] jive-sdk - Saving new definition 'sfdc_opportunity_activity'

[2013-05-14 23:32:22.568] [INFO] jive-sdk - Running bootstrap.

[2013-05-14 23:32:22.573] [INFO] jive-sdk - Bootstrap complete.

[2013-05-14 23:32:22.573] [INFO] jive-sdk - Service started in development mode

Express server listening on port 8090

  • Customize the template through "programming by convention" -- fill in the blanks with logic specific to your application, and as long as you've satisfied the contract, the framework automatically:
    • Wires up Express routes required for configuring your integration.
    • Notifies your listeners for integration life cycle events (integration created; destroyed; updated, etc.).
    • Executes any recurrent tasks.
    • Handles persistence of required objects (built-in support for 3 flavors of persistence out of the box -- in-memory, file, and MondoDB).
  • Easily integrate with OAuth2 providers such Salesforce, using easily customizable built-in support for OAuth2 on the backend and front end. (Initially, we wired up our own OAuth2 handlers. One thing we'll be doing in the near future is incorporating an existing framework for auth, likely Passport.)
  • Build your own custom integration from scratch, or wire in just the pieces you need into your pre-existing service, using the framework's underlying API directly.

 

jive_devslanding_transparent.png

So now you've got a service - go run it on Raspberry Pi!


Right now, Purposeful Places are available in Jive's cloud release, therefore, my service must also be cloud deployed. Though there are lots of great options for hosting NodeJS services on the web (Joyent's NodeJitsu or Heroku), I wanted to deploy my integration service to the cloud in a convenient, easily debuggable environment, over which I had complete control. Enter: The Raspberry Pi!

 

jive-rpi-awesome.jpg

 

Besides the epic geek factor of it all (no need to explain), it is amazing that with about a $60 investment (which includes shipping), we were able to create a pocket-sized integration server, capable of pushing meaningful value into multiple Jive cloud instances! Using the Pi I am able to host my service, easily modify it on the fly for rapid troubleshooting. This process is much more difficult on something like Nodejitsu, where the deploy process can take several minutes (as compared to seconds for making a change, then deploying it live to the cloud again by turning the process back on). Here is a good guide to get your own Raspberry Pi setup with NodeJS.


Easy as Pi

One of the reasons we chose NodeJS for the jive-sdk is because it is lightweight and extremely powerful. While we've still got more work to do in building out the SDK, we were able to be productive in days. I'll be talking about at this at NodePDX later this week. If you happen to be in Portland, come and check it out. Express enabled us to get a server up and running in minutes. From there, we just started filling in the pieces. Using NodeJS on the Raspberry Pi was incredibly easy--and fun. With a dash of SSH and FTP, deployment was a snap. No dealing with firewalls. No deployment hassels on Nodejitsu. It was, easy as Pi!