Pro Yearly is on sale from $80 to $50! »

Real time web applications for existing no NodeJS apps

Real time web applications for existing no NodeJS apps

This presentation was continued by the webrtc one made by Esteban Las, here are the slides: http://slides.com/elas/webrtc

71f946b4fdeb8a14e43297b2708e4c3a?s=128

Rodrigo Espinosa Curbelo

December 26, 2014
Tweet

Transcript

  1. – move your app around – Real time web applications

  2. – move your lazy blocking app around – Real time

    web applications for existing no NodeJS apps
  3. Common issue…

  4. Now your django/.net/rails project needs real time notifications

  5. shit.

  6. Idea #1

  7. Idea #1 Create an API and do long polling.

  8. What’s long polling?

  9. –A dude who never fished. “Long polling is like fishing

    by continuously taking in and out the fishing rod.”
  10. Example

  11. None
  12. Advantage Works in every browser that supports XHR

  13. Advantage No need of cross-server authentication

  14. moving on…

  15. Idea #2

  16. Idea #2 Use web sockets.

  17. How?

  18. Does your server support WebSockets? I wish…

  19. A WebSocket server is a TCP application

  20. You can write one in any server-side programming language* *

    that is capable of Berkeley sockets
  21. But…

  22. Please, do not do that.

  23. Use something already working instead

  24. None
  25. None
  26. That’s NodeJS

  27. Implementation

  28. designing the two-server binding Architecture

  29. Architecture Application DB Events DB

  30. Current architecture Application DB Events DB

  31. New NodeJS Server Events DB • Saves events in a

    database. • Serves an JSON API. • Servers an Socket.io application.
  32. architecture design Models

  33. None
  34. Application DB Events DB Connect through an API

  35. architecture design API

  36. None
  37. architecture design Events

  38. None
  39. Advantage Secure API communication (only server-to-server)

  40. Advantage Full-duplex communication

  41. – websockets for the win – Real time web applications

    for existing no NodeJS apps
  42. The End – Thanks –