understanding salesforce streaming api

14
Understanding the Streaming API Quick start guide to RealTime Force @gwestr Greg Wester

Upload: gwestr

Post on 14-Dec-2014

1.461 views

Category:

Technology


3 download

DESCRIPTION

Get started with Realtime Force.

TRANSCRIPT

Page 1: Understanding Salesforce Streaming API

Understanding the Streaming API

Quick start guide to RealTime Force

@gwestrGreg Wester

Page 2: Understanding Salesforce Streaming API

Safe Harbor

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions prove 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 statements, including: any projections of earnings, revenues, or other financial items; any statements regarding strategies or plans of management for future operations; any statements concerning new, planned, or upgraded services or developments; statements about current or future economic conditions; and any statements of belief. The risks and uncertainties referred to above include - but are not limited to - risks associated with 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 immature market in which we operate; our relatively limited operating history; our ability to expand, retain, and motivate our employees and manage our growth; risks associated with new releases of our service; and risks associated with selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. are included in our registration statement (on Form S-1) and in other filings with the Securities and Exchange Commission. These documents are available on the SEC Filings section of this Web site. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Any unreleased services or features referenced in this or other 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.

Page 3: Understanding Salesforce Streaming API

Agenda

• Introducing RealTime Force• Sample application• Code walk through• Q&A

Page 4: Understanding Salesforce Streaming API

Streaming 101

• An API that delivers near real time notifications• Uses industry standard technique – “comet”• Does not count against REST/SOAP API daily limit• Available right now for all Salesforce customers

Page 5: Understanding Salesforce Streaming API

Streaming Surface Area

• Notification generated on SObject create or update• One change in the system will notify many users

• respects existing CRUD, FLS, sharing rules• Opt in to notifications by creating a SOQL query

• administrators create queries for organization

Page 6: Understanding Salesforce Streaming API

Streaming Terminology

• Long polling• Event• Notification• Push Topic• Bayeux Protocol

• handshake• subscribe• connect• unsubscribe• disconnect

Page 7: Understanding Salesforce Streaming API

Streams of JSON

Page 8: Understanding Salesforce Streaming API

Getting Started

• Start with a VisualForce Page• Add a Javascript CometD client• Asynchronously wait for events• Update the page through the DOM

Page 9: Understanding Salesforce Streaming API

Demo

Page 10: Understanding Salesforce Streaming API

Code: Apex Page

Page 11: Understanding Salesforce Streaming API

Code: CometD JS Client init

Page 12: Understanding Salesforce Streaming API

Code: CometD JS handler

Page 13: Understanding Salesforce Streaming API

Q&A

• Documentation – http://tinyurl.com/cometsfdc• Code – http://github.com/gwestersfdc/StreamingLab• Streaming Lab on AppExchange soon

Page 14: Understanding Salesforce Streaming API

Thank you!

• Follow me on Twitter - @gwestr