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.

Real-time APIs

10,281 views

Published on

The number of real-time APIs on the Web are rising. What are real-time APIs, how are they used? How are they built? This deck and demo was presented at InfoQ in San Francisco Nov 2012.

Published in: Technology, Business
  • Dating for everyone is here: ❶❶❶ http://bit.ly/39mQKz3 ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/39mQKz3 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Real-time APIs

  1. 1. Real-time APIs and how to build one@rossmason, @mulesoft
  2. 2. Agenda• What the heck is Real-time APIs• The technology and trends• Demos
  3. 3. What is real-time?• Real-time: the ability to react to something as soon as it happens• Web real-time: Same but slower (about 900ms delay is ok)
  4. 4. What is a real-time API?• Real-time API: Allows an app to only register for events that it is interested in – Give me new customers as they are added – Tell me when the stock price changes – Tell me in 4 weeks to send an email to Bob
  5. 5. Why Real-time?• User experience: Don’t make people wait• Accuracy: Don’t make things wait• Because life happen in real-time
  6. 6. Why Real-time?Speed
  7. 7. What do most API consumers do?• Polling – Make a request every 60 seconds – 61.672% of calls yield no result – New data can be available and waiting for 59.9 seconds – Need to work within the boundaries of API rate limits • How many calls per hour • Total calls per day • Time between calls
  8. 8. Why Real-time?Broadcast
  9. 9. Why Real-time?Engagement
  10. 10. Push vs StreamingPush (aka WebHooks) Streaming• I’ll call you back • Keep the line open• Asynchronous • Request Response• Drawbacks • Drawbacks – Need to have a reply channel – Holds a socket connection setup open – Continuations can be – Considered a security risk by used some – Harder to implement durable – Reliability complicated – did connections the data arrive
  11. 11. REST or Real-time?• Real-time APIs are additive to an existing REST or SOAP API• Invocation semantics are different – Client needs to handle two invocation models• Real-time APIs are mostly used to query data – Usually not to perform CRUD operations• Have different SLA and reliability requirements
  12. 12. REST or Real-time? consumer REST API Streaming APIResource A Resource B Resource C Transport Subscription Manager Query Processor
  13. 13. Real-time Technologies• Transport – Comet (HTTP) – WebSocket (HTTP)• Protocols – With formal pub/sub semantics: • XMPP • Bayeux • STOMP – Ad hoc, ie "subscription" expressed in the request: • JSON• Push – PubSubHubbub – Web Hooks
  14. 14. Real-time APIs are realAPI Real-time technology/protocolSalesforce CometFacebook PubSubHubbubInstagram Ah Hoc (WebHooks/PubSubHubbub)Twitter Ad Hoc (Comet)PubNub Ad HocSuperFeedr XMPPPusher Ad Hoc (WebSockets)
  15. 15. Real-time APIs: REST + JSON or XML 1% of all APIs support real-time interaction source: ProgrammableWeb.com
  16. 16. Stop. Demo time!
  17. 17. Demo 1: AJAX Streaming API HTTP Long Transport Polling Subscription CometD Manager Query <None> Processorhttps://github.com/rossmason/mule-streaming-api-demo
  18. 18. Demo 2: WebSockets Streaming API Transport WebSocket Subscription JMS Manager Query Esper Processorhttps://github.com/rossmason/mule-streaming-api-demo
  19. 19. Mule real-time API supportTechnologies 3rd Party APIs• CometD • Salesforce Streaming API• Web Sockets • Facebook real-time API• Ad Hoc • Twitter Firehose• PubSubHubbub • PubNub• XMPP• STOMP• WebHooks
  20. 20. Real-time Web SotN• Still in early adopter territory – But some major APIs use this approach• Limitations – No discovery protocol (i.e. WADL) – Many different methods • Some hampered by older browser technology (i.e. Web Sockets
  21. 21. Thank You!• Twitter: @rossmason, @mulesoft• Slides: http://slideshare.net/rossmason• Code: https://github.com/rossmason/mule-streaming-api-demo• Blog: http://blogs.mulesoft.org• We are hiring: http://mulesoft.com.careers

×