Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Build your first Real-Time App withStreaming APIHal HildebrandVinod MehraJeff Lai
Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contai...
Hal, Vinod, Jeff, AlexSalesforce R&D
Before we beginWhat you will need to follow along    Have your DEV Org created and ready    Install the Streaming Hands ...
What are we going to buildBuild two scenarios    Use geo location coordinates to plot Opportunities Real Time      • Use ...
Short Introduction to Streaming •Clients concerned with changes in data  • Data creation  • Data update •Common solution i...
Demo Object Model Event Custom Object   Central Mechanism for notifications Use Apex triggers to create Events   When ...
Event Publishing Workflow Define triggers on entities   Invoice      • After update      • After create   Ticket      •...
Streaming Subscription Flow Event is published (created) EventUpdates topic query matches Javascript function notifyEve...
Add Apex triggers to desired entities Tickets Invoices Opportunities
Streaming Push TopicsCreate Push Topics to enable detection of events    EventUpdates      • SELECT Id, Name, Type__c, Ti...
Launch WorkbenchStart Workbench to create a topic    https://workbench.developerforce.com/login.php                   See...
View/Create Push Topics             See demo installation instructions at: http://bit.ly/demo-setup
Getting GPS from BrowserInclude Static Resources for CometD and get Coordinates
Plotting new deals on a mapConnect and subscribe to events to plot                 See demo installation instructions at: ...
Demo! Use your tablet, phone or laptop browser to login to your DE org Select the “Location Streaming” tab Open another br...
Leaderboard – Deals PageShow deals the usual way    WonDeal Page                See demo installation instructions at: ht...
Leaderboard – Deals PageStreaming Enabled               See demo installation instructions at: http://bit.ly/demo-setup
Leaderboard – Deals Page with Streaming APIAdd Streaming API    CometD from Static Resources                  See demo in...
Leaderboard – Deals Page with Streaming API     Add Streaming API             Connect             Subscribe            ...
Build Your First Real-time App with the Streaming API
Build Your First Real-time App with the Streaming API
Upcoming SlideShare
Loading in …5
×

Build Your First Real-time App with the Streaming API

1,129 views

Published on

  • Be the first to comment

Build Your First Real-time App with the Streaming API

  1. 1. Build your first Real-Time App withStreaming APIHal HildebrandVinod MehraJeff Lai
  2. 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward- looking statements.
  3. 3. Hal, Vinod, Jeff, AlexSalesforce R&D
  4. 4. Before we beginWhat you will need to follow along  Have your DEV Org created and ready  Install the Streaming Hands on Package  See http://bit.ly/demo-setup for complete instructionsNote! Chrome browser support has a bug when showing maps!Please use FireFox for this demo See demo installation instructions at: http://bit.ly/demo-setup
  5. 5. What are we going to buildBuild two scenarios  Use geo location coordinates to plot Opportunities Real Time • Use browser based geo location to show where Opportunities taking place • Plot location on map based on Streaming API events  Enable Real Time updates for a Leaderboard • Update page with sales results from different sales people • Use CometD to listen to Streaming API and get events See demo installation instructions at: http://bit.ly/demo-setup
  6. 6. Short Introduction to Streaming •Clients concerned with changes in data • Data creation • Data update •Common solution is to poll for changes • Wastes resources on both client and server •Streaming API pushes changes to clients • Sets up continuous queries to monitor changes • JSON events describing changes
  7. 7. Demo Object Model Event Custom Object  Central Mechanism for notifications Use Apex triggers to create Events  When monitored objects are  Created  Updated Event Location  Captures locations for events
  8. 8. Event Publishing Workflow Define triggers on entities  Invoice • After update • After create  Ticket • After create EventPublisher creates Event
  9. 9. Streaming Subscription Flow Event is published (created) EventUpdates topic query matches Javascript function notifyEvent() called Browser posts location information  Rest call to create and add the EventLocation on the event Javascript function postLocation() called
  10. 10. Add Apex triggers to desired entities Tickets Invoices Opportunities
  11. 11. Streaming Push TopicsCreate Push Topics to enable detection of events  EventUpdates • SELECT Id, Name, Type__c, Timestamp__c, SObjectName__c, SObjectId__c FROM Event__c  OpportunityWon • Select Id, OwnerId, Amount, isWon, StageName from Opportunity See demo installation instructions at: http://bit.ly/demo-setup
  12. 12. Launch WorkbenchStart Workbench to create a topic  https://workbench.developerforce.com/login.php See demo installation instructions at: http://bit.ly/demo-setup
  13. 13. View/Create Push Topics See demo installation instructions at: http://bit.ly/demo-setup
  14. 14. Getting GPS from BrowserInclude Static Resources for CometD and get Coordinates
  15. 15. Plotting new deals on a mapConnect and subscribe to events to plot See demo installation instructions at: http://bit.ly/demo-setup
  16. 16. Demo! Use your tablet, phone or laptop browser to login to your DE org Select the “Location Streaming” tab Open another browser tab, login to DE org Create a new ticket Location is pushed to the first tab Select “Events” tab Select event to see map with monitoring browser locations tagged
  17. 17. Leaderboard – Deals PageShow deals the usual way  WonDeal Page See demo installation instructions at: http://bit.ly/demo-setup
  18. 18. Leaderboard – Deals PageStreaming Enabled See demo installation instructions at: http://bit.ly/demo-setup
  19. 19. Leaderboard – Deals Page with Streaming APIAdd Streaming API  CometD from Static Resources See demo installation instructions at: http://bit.ly/demo-setup
  20. 20. Leaderboard – Deals Page with Streaming API Add Streaming API  Connect  Subscribe  Listen to TopicsSee demo installation instructions at: http://bit.ly/demo-setup

×