Understanding the Streaming API

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

description

Understanding the Streaming API. Quick start guide to RealTime Force. /add_address. @ gwestr Greg Wester. @add_address. in/add_address. Safe Harbor. - PowerPoint PPT Presentation

Transcript of Understanding the Streaming API

Page 1: Understanding the Streaming API

Understanding the Streaming APIQuick start guide to RealTime Force

@gwestrGreg Wester

Page 2: Understanding the Streaming API

Safe HarborThis 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 the Streaming API

Agenda

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

Page 4: Understanding the 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 the 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 the Streaming API

Streaming Terminology

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

• handshake• subscribe• connect• unsubscribe• disconnect

Page 7: Understanding the Streaming API

Streams of JSON

Page 8: Understanding the 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 the Streaming API

Demo

Page 10: Understanding the Streaming API

Code: Apex Page

Page 11: Understanding the Streaming API

Code: CometD JS Client init

Page 12: Understanding the Streaming API

Code: CometD JS handler

Page 13: Understanding the Streaming API

Q&A

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

Page 14: Understanding the Streaming API

Thank you!

• Follow me on Twitter - @gwestr