Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Real Time iOS apps with PubNub

Real Time iOS apps with PubNub

Slides for a Santex Techmeetup at Lima. https://eventioz.pe/e/tech-meetup-realtime-ios-app-with-pubnub

Jose Torres Cardenas

April 28, 2014
Tweet

More Decks by Jose Torres Cardenas

Other Decks in Programming

Transcript

  1. REAL-TIME iOS APPS WITH

  2. who am I ?

  3. JOSE TORRES @coch3_ B.S. in Software Engineering Currently making Software

    Products based on iOS platform Visual Arts passionate and French Bulldogs lover
  4. what is real-time communication anyway?

  5. Any live telecommunications that occur without transmission delays. Nearly instant

    with minimal latency.
  6. common scenario

  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. None
  24. common workarounds

  25. None
  26. None
  27. None
  28. None
  29. None
  30. WARNING TECHNICAL CONTENT

  31. PULL TECHNOLOGIES Initial request for data originates from the client,

    and then is responded to by the server.
  32. PUSH TECHNOLOGIES Request for a given transaction is initiated by

    publisher or central server.
  33. PUSH TECHNOLOGIES HTTP Server Push/HTTP Streaming, Long Polling/Polling, ...

  34. HALF DUPLEX Initial channel can send and receive, but not

    at the same time.
  35. BUT... All of these methods for providing real-time data involve

    HTTP request and response headers, which contain lots of additional, unnecessary header data and introduce latency.
  36. HTTP Simply put, HTTP wasn't designed for real-time.

  37. how do we achieve real- time then?

  38. WEB SOCKETS Allow a long-held single TCP socket connection to

    be established between the client and server which allows for bi- directional, full duplex, messages to be instantly distributed with little overhead resulting in a very low latency connection
  39. FULL DUPLEX Data can travel in both directions simultaneously. Bidirectional

    communications channel that operates through a single socket over the Web.
  40. CONTENT AS IT HAPPENS

  41. None
  42. not at all

  43. WEB SOCKETS ARE NOT COMPLEX

  44. WEB SOCKETS ARE VERY COMPLEX

  45. FUNCTIONALITY = 25 % OPERATIONAL + SCALING = 75 %

  46. hopefully...

  47. None
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. case studies

  56. None
  57. None
  58. None
  59. our experience

  60. None
  61. DEMO

  62. crazycolors https://github.com/coch3/crazycolors

  63. + Information PubNub PubNub documentation PubNub websockets Why your app

    needs real-time ? Websockets iOS SDK PubNub best practices http://www.pubnub.com/ http://cocoadocs.org/docsets/PubNub http://www.pubnub.com/blog/what-are-websockets http://venturebat.com/2013/04/05/why-your-app-needs-to-be-real-time/ http://www.websocket.org/quantum.html http://www.pubnub.com/docs/objective-c/iOS/ios-sdk.html https://help.pubnub.com/entries/22271342-PubNub-Best-Practices
  64. THANKS! www.josetorrescardenas.com

  65. www.santexgroup.com