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.

Go-ing a long way with Rails

157 views

Published on

Presentation from RubyConf TH 2019

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Go-ing a long way with Rails

  1. 1. Go-ing a long way with Rails @shwetakale13
  2. 2. @joshsoftware
  3. 3. What to expect from this talk! ● Hybrid Application ● Seamless Integration with any language ● Progressively Upgrade Code Base
  4. 4. Demo
  5. 5. Why not to upgrade? ● Legacy Codebase ● New features in pipeline ● Team’s Proficiency ● Client’s budget
  6. 6. Rails Application GoLang Application
  7. 7. Routing at NGINX1
  8. 8. 1 Problems DRYReuse Code
  9. 9. 1 Problems Customization in request
  10. 10. RestClient 2
  11. 11. RestClient GruUser GruUser Minion Details 2
  12. 12. RestClient MinionGruUser MinionGruUser Minion Details Minion Details 2
  13. 13. RestClient MinionGruUser MinionGruUser Minion Details Minion Details Sends data 2
  14. 14. RestClient 2 MinionGruUser MinionGruUser Minion Details Minion Details Sends data Sends data
  15. 15. Problems Latency 2
  16. 16. Problems Scalability 2
  17. 17. FFI ● Foreign Function Interface ● Allows to call functions from binary 3
  18. 18. Problems Binary on same server 3
  19. 19. Problems 3 Deployment
  20. 20. Problems Scalability 2
  21. 21. Problems Load Balance 3
  22. 22. Rack 4 Web Server Rack Rails Application HTTP Request HTTP Response
  23. 23. 4
  24. 24. 4
  25. 25. 4
  26. 26. 4
  27. 27. 4
  28. 28. 4
  29. 29. 4
  30. 30. 4
  31. 31. 4
  32. 32. 4 User Request Gru Rack
  33. 33. 4 User Request Gru Rack Rack
  34. 34. 4 User Request Gru Rack RackRewrite
  35. 35. 4 User Request Gru Rack RackRewrite Response
  36. 36. Approaches ● Routing based on NGINX ● RestClient ● FFI ● RackProxy
  37. 37. Problems in other approaches ● Reuse existing authentication mechanism ● Latency ● Scalability ● Deployment
  38. 38. Problems in other approaches ● Reuse existing authentication mechanism ● Latency ● Scalability ● Deployment
  39. 39. Approaches ● Routing based on NGINX ● RestClient ● FFI ● RackProxy
  40. 40. Where Rails stores session?
  41. 41. Applications ● Hybrid Application ● Seamless Integration with any language ● Progressively Upgrade Code Base
  42. 42. Resources ● Rack Proxy: https://github.com/ncr/rack-proxy ● Blog: https://blog.joshsoftware.com/2019/03/28/golan g-with-rails/
  43. 43. Thank You! @shwetakale13 @joshsoftware

×