Successfully reported this slideshow.

Ruby - The Hard Bits

2

Share

Upcoming SlideShare
ATS Programming Tutorial
ATS Programming Tutorial
Loading in …3
×
1 of 52
1 of 52

Ruby - The Hard Bits

2

Share

My presentation from RedDotRubyConf 2013 in Singapore. Turned out to be a reflection on whether I'd still be a Rubyist in another 5 years, and what are the external trends that might change that. Short story: Yes! Of course. I'll always think like a Rubyist even though things will probably get more polyglot. The arena of web development is perhaps the most unpredictable though.

My presentation from RedDotRubyConf 2013 in Singapore. Turned out to be a reflection on whether I'd still be a Rubyist in another 5 years, and what are the external trends that might change that. Short story: Yes! Of course. I'll always think like a Rubyist even though things will probably get more polyglot. The arena of web development is perhaps the most unpredictable though.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Ruby - The Hard Bits

  1. 1. RUBY – The Hard Bits or How to Rock Hard, Ride Free or Will I still be a Rubyist in 5 years? RedDotRubyConf 2013 – Singapore Jun-2013
  2. 2. I am a Rubyist .. Paul Gallagher paul@evendis.com evendis.com personal: tardate.com twitter.com/tardate
  3. 3. .. but that wasn’t always the case
  4. 4. Let it never be said, the romance is dead 'Cos there’s so little else occupying my head
  5. 5. Pascal @uni BASIC, Assembler, C, Fortran.. @uni BASIC, Assembler, C, Fortran.. Build more complex things faster Build more complex things faster OO DesignOO Design
  6. 6. dbase, Notes PascalPascal Build more complex things even faster Build more complex things even faster Client ServerClient Server C++, OS/2 Purely for preservation of self-esteem Purely for preservation of self-esteem
  7. 7. MCSDVB, VC, ASP, COM, .NET, C# dbase, Notes dbase, Notes Building with cross- functional teams Building with cross- functional teams The Internet happened The Internet happened
  8. 8. J2EE MCSD VB, VC, ASP, COM, .NET, C# MCSD VB, VC, ASP, COM, .NET, C# Lingua francaLingua franca Open Platforms and Standards Open Platforms and Standards Perl Universal glueUniversal glue
  9. 9. Ruby J2EEJ2EE write less, write clean write less, write clean Agile Web Development, Open source Agile Web Development, Open source Javascript Universal web glue Universal web glue
  10. 10. A Very Comfortable Place Lazy Dog Inn, Huarez Peru http://goo.gl/zvkTI
  11. 11. A Very Comfortable Place Lazy Dog Inn, Huarez Peru http://goo.gl/zvkTI a test-infected community vibrant open source great packaging (gems) unrivaled reuse (git/hub) Oh, and the language is pretty nice too
  12. 12. Due to lack of interest tomorrow is canceled Let the clocks be reset and the pendulums held
  13. 13. Will I still be a Rubyist in 5 years?
  14. 14. Intrinsic drivers Intrinsic drivers Extrinsic drivers Extrinsic drivers All about productivity All about productivity Technology mega trends Technology mega trends Hit the road, Jack
  15. 15. programming problems I can solve with Ruby time ? 2013
  16. 16. Fear of the Dark Frontier lands Edge of common practice Borders No man’s land
  17. 17. What Technologists Think http://www.infoq.com/research/software-trends-2013 1. HTML5 and JavaScript as a Platform 2. Mobile Applications and Mobile-first UIs 3. Cloud Computing 4. NoSQL displacing RDBs 5. Big Data and Analytics
  18. 18. What CIOs Think Gartner Top 10 CIO Business and Technology Priorities in 2013 http://goo.gl/Bca4T
  19. 19. Four Trends
  20. 20. Four Trends
  21. 21. Rich Interaction – Diverse Devices Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc http://todomvc.com/ Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery
  22. 22. Undisclosed desires.. Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery We want to be DRY?We want to be DRY?
  23. 23. Undisclosed desires.. Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery Exploit device capabilities?Exploit device capabilities?
  24. 24. Undisclosed desires.. Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery Server-push and distributed event propagation?Server-push and distributed event propagation?
  25. 25. Undisclosed desires.. Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery A cohesive full stack programming model?A cohesive full stack programming model?
  26. 26. Undisclosed desires.. Classic web app Classic web app APIAPI NativeNative Rich clientRich client API, partials, logic API, partials, logic server device Java Android Objective C iOS JS Frameworks Ember, Angular, Backbone etc JS Frameworks Ember, Angular, Backbone etc Light dusting PJAX, Turbolinks, Backbone lite, jQuery Light dusting PJAX, Turbolinks, Backbone lite, jQuery Changing my mind should be this painful?Changing my mind should be this painful?
  27. 27. Innovators’ Dilemma: What are the chances? The New™ Framework The New™ Framework server device Java Android Objective C iOS Getting closer? Meteor / Derby + node.js Getting closer? Meteor / Derby + node.js
  28. 28. Conclusions?
  29. 29. Four Trends
  30. 30. We do extreme App-ification SaaSSaaS PaaSPaaS IaaSIaaS
  31. 31. We do extreme App-ification SaaSSaaS PaaSPaaS IaaSIaaS MaaSMaaS
  32. 32. API-ification APIs Everywhere! Favorite and time-tested strategy: – Wait for the REST of the world to catch up – Exceptions BTO But as technology matures: – More complex integration scenarios – Security and data semantics – Could we see a swing back to SOAP and WS-* style integration?
  33. 33. Conclusions?
  34. 34. Four Trends
  35. 35. Big Data Diversification Data AccessData Access ORMORM Server proc and map-reduce Server proc and map-reduce Key-valueKey-valueDocumentDocument MongoDBMongoDB GraphGraph Neo4JNeo4J CassandraCassandra Hadoop (family) Hadoop (family)RedisRedis RIAKRIAK CouchDBCouchDB ColumnColumn ✔✔ ✔✔ JSJS taxonomytaxonomy examplesexamples ✔✔ ✔✔ ✔✔ ✔✔ ✔✔ ✔✔ ½½ JSJS ✔✔ JS erlang JS erlang CipherCipher ✔✔ CQLCQL ½½ Java, Pig Hive Java, Pig Hive ½½
  36. 36. Aside: Need Government Data? http://rgovdata.com
  37. 37. Analytics – Can go quite a way with pure Ruby – Use other tools like R (direct or via RinRuby/RSRuby/Rserve) – E.g. scanning utility bills with Ruby and R: https://github.com/tardate/sps_bill_scanner Python Envy?Python Envy? IPython – interactive notebooks and visualisation IPython – interactive notebooks and visualisation Pandas, Statsmodels, Numpy, SciPy – data analysis comparable to R Pandas, Statsmodels, Numpy, SciPy – data analysis comparable to R
  38. 38. SciRuby and NMatrix! SciRuby: Tools for Scientific Computing in Ruby Nmatrix: fast numerical linear algebra library for Ruby “We believe that the time for a Ruby science and visualization package has come”
  39. 39. Conclusions?
  40. 40. Four Trends
  41. 41. Case Study – Making Megar a Ruby wrapper and CLI for the Mega API https://github.com/tardate/megar – mega.co.nz: DropBox on crypto steroids – Browser RIA: cryptography in javascript – API not yet formally/fully documented
  42. 42. Mega Crypto in a Nutshell usernameusername passwordpassword keygen A32 > AES-CBC > Base64 keygen A32 > AES-CBC > Base64 Login session challenge/responseLogin session challenge/response Encrypted Session ID Encrypted Session ID Encrypted RSA key Encrypted RSA key Encrypted master key Encrypted master key RSA private key parts RSA private key parts Decrypt and decompose Base64 > AES-CBC > A32 Decrypt and decompose Base64 > AES-CBC > A32 Decrypt session_id B64 > MPI > RSA Decrypt > B64 Decrypt session_id B64 > MPI > RSA Decrypt > B64 Session IDSession ID NB: this is simplified ;-) Decrypt key Base64 > AES-CBC > A32 Decrypt key Base64 > AES-CBC > A32 master keymaster key filefile Request download url Request download url DownloadDownload Encrypted fileEncrypted file Decrypt file AES-CTR + MAC verify Decrypt file AES-CTR + MAC verify Decrypt file key Base64 > > AES-CBC > A32 Decrypt file key Base64 > > AES-CBC > A32 Request FilesRequest Files Encrypted file attributes Encrypted file attributes File keyFile key
  43. 43. Mega Crypto Challenges Funky Base64 – url-safe and no delimiters; JFDI MPI and integer arrays – lack of primitives; JFDI RSA with key components – incompatible OpenSSL – DIY RSA private key decrypt AES CTR mode – Requires OpenSSL 1.0.1+ – DIY CTR mode on AES-CBC OpenSSL 0.9.8+
  44. 44. Mega Crypto Challenges Funky Base64 – url-safe and no delimiters; JFDI MPI and integer arrays – lack of primitives; JFDI RSA with key components – incompatible OpenSSL – DIY RSA private key decrypt AES CTR mode – Requires OpenSSL 1.0.1+ – DIY CTR mode on AES-CBC OpenSSL 0.9.8+ The Python Experience? The Python Experience? PyCrypto – native AES-CTR implementation PyCrypto – native AES-CTR implementation PyCrypto – able to drive RSA with key components (bit of a hack though) PyCrypto – able to drive RSA with key components (bit of a hack though) Base64, MPI and integer array handling – same, same Base64, MPI and integer array handling – same, same
  45. 45. The Resistance Ruby core and stdlib – FBOW thin wrappers on external libraries Surely there’s a gem for that? – Yes, many, but.. – fast-aes, gibberish, rbncl, crypto, ruby-aes etc.. Hate This & I’ll Love You Hate This & I’ll Love You Too much convention *without* configuration Too much convention *without* configuration Poor composabilityPoor composability Distinctly C-dy OpenSSL wrappers Distinctly C-dy OpenSSL wrappers Maintained?Maintained?
  46. 46. Uprising – Krypt https://github.com/krypt/krypt Lead by Martin Boßlet OpenSSL maintainer See confreaks e.g. http://goo.gl/V4wKW and update at GORUCO 8th June Krypt aims: – OpenSSL replacement – External dependencies are optional – Composability – Convention *with* configuration Still early days..
  47. 47. Conclusions?
  48. 48. TAKEAWAYS Keep your eyes on the road, and your hands upon the wheel
  49. 49. Four Trends – Liquid State B-B- A-A- A+A+ C+C+
  50. 50. So! Will I still be a Rubyist in 5 years?
  51. 51. YES! But.. – Most unpredictable arena is the future of web development – The future is polyglot, but once you start thinking like a Rubyist it is hard to stop – even if we’re not always typing it – The irresistible urge to inject Ruby goodness where-ever we tread
  52. 52. Thanks! Paul Gallagher paul@evendis.com evendis.com personal: tardate.com twitter.com/tardate Ruby, Ruby, Ruby, Ruby And do ya, do ya, do ya, do ya Know what ya doing, doing to me?

Editor's Notes

  • Four horsemen Richness of client server at internet scale
  • ×