Understanding Salesforce Streaming API

2,798 views

Published on

Get started with Realtime Force.

Published in: Technology, Design
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,798
On SlideShare
0
From Embeds
0
Number of Embeds
32
Actions
Shares
0
Downloads
39
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Understanding Salesforce Streaming API

  1. 1. Understanding the Streaming APIQuick start guide to RealTime Force @gwestr Greg Wester
  2. 2. Safe HarborThis presentation may contain forward-looking statements that involve risks, uncertainties, andassumptions. If any such uncertainties materialize or if any of the assumptions prove incorrect, theresults of salesforce.com, inc. could differ materially from the results expressed or implied by theforward-looking statements we make. All statements other than statements of historical fact could bedeemed forward-looking statements, including: any projections of earnings, revenues, or otherfinancial items; any statements regarding strategies or plans of management for future operations;any statements concerning new, planned, or upgraded services or developments; statements aboutcurrent or future economic conditions; and any statements of belief. The risks and uncertaintiesreferred to above include - but are not limited to - risks associated with our new business model; ourpast 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 inwhich we operate; our relatively limited operating history; our ability to expand, retain, and motivateour employees and manage our growth; risks associated with new releases of our service; and risksassociated with selling to larger enterprise customers. Further information on potential factors thatcould 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 documentsare available on the SEC Filings section of this Web site. Salesforce.com, inc. assumes no obligationand does not intend to update these forward-looking statements. Any unreleased services orfeatures referenced in this or other press releases or public statements are not currently availableand may not be delivered on time or at all. Customers who purchase our services should make thepurchase decisions based upon features that are currently available.
  3. 3. Agenda• Introducing RealTime Force• Sample application• Code walk through• Q&A
  4. 4. 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
  5. 5. 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
  6. 6. Streaming Terminology• Long polling• Event• Notification• Push Topic• Bayeux Protocol • handshake • subscribe • connect • unsubscribe • disconnect
  7. 7. Streams of JSON
  8. 8. Getting Started• Start with a VisualForce Page• Add a JavascriptCometD client• Asynchronously wait for events• Update the page through the DOM
  9. 9. Demo
  10. 10. Code: Apex Page
  11. 11. Code: CometD JS Client init
  12. 12. Code: CometD JS handler
  13. 13. Q&A•Documentation –http://tinyurl.com/cometsfdc• Code – http://github.com/gwestersfdc/StreamingLab• Streaming Lab on AppExchange soon
  14. 14. Thank you!•Follow me on Twitter - @gwestr

×