20k mRuby devices in Production

20k mRuby devices in Production

One of the biggest cases of mruby in world. I've changed an entire solid runtime for mRuby, and for 3 years, even if is not recommend, we've been running mRuby in production reaching 20k machines and billons of dollars in payment transactions. We faced a lot of problems, but even more benefits adopting mRuby. This talk is about those topics, like:

Runtime and application Update/Upgrade
Communication configuration and intelligence
Payment transaction security and cryptography
Concurrency
Code sharing between CRuby and mRuby
Memory management and leaks
Open Source

E822acb0564c5632aae69fef35f85b3d?s=128

Scalone

June 01, 2018
Tweet

Transcript

  1. @scalone 20k mRuby devices Production Thiago Scalone - @scalone

  2. @scalone こんばんは 私の名前はThiago Scalone です よろしくお願いします! 私はブラジルのソフトウェアエンジニアです

  3. @scalone

  4. @scalone Speak Portuguese, not Spanish Not everyone likes socker/football Some

    people like contact and hugs We do Party and drink We work hard Brazilian
  5. @scalone @scalone Free hugs!

  6. The digital payment acquirer @scalone

  7. @scalone

  8. @scalone

  9. @scalone

  10. @scalone

  11. @scalone

  12. Payment acquirers are very inefficient
 
 Most using outdated technology


    
 Incapable of offering digital products @scalone
  13. @scalone

  14. @scalone @scalone

  15. @scalone @scalone

  16. @scalone @scalone

  17. @scalone @scalone

  18. @scalone @scalone

  19. @scalone ERC20 @scalone

  20. @scalone ERC20

  21. @scalone Demo application creation/deploy Runtime and application Update/Upgrade Communication configuration

    and intelligence Payment transaction security and cryptography Code sharing between CRuby and mRuby Concurrency / Memory management and leaks Demo chip/pin Payment Transaction Topics
  22. @scalone Demo Thiago Scalone - @scalone

  23. @scalone @scalone

  24. @scalone CLI @scalone

  25. @scalone PROJECT CLI @scalone

  26. @scalone PROJECT COMPILE CLI @scalone

  27. @scalone PROJECT COMPILE DEPLOY CLI @scalone

  28. @scalone PROJECT COMPILE DEPLOY CLI RUN @scalone

  29. @scalone PROJECT COMPILE DEPLOY CLI RUN @scalone

  30. @scalone PROJECT COMPILE DEPLOY CLI RUN mRuby mruby-cli da_funk @scalone

  31. @scalone Created by Matz Small Cross-compilation / ANSI C Modular

    No gems, mrbgems static compilation .mrb https://github.com/mruby/mruby mRuby
  32. @scalone CLI apps framework Created and maintained by hone, zzak

    and toch Power of mruby to generate standalone binary Linux, Windows, and OS X Docker Compose https://github.com/hone/mruby-cli https://github.com/cloudwalkio/cloudwalk mruby-cli
  33. @scalone Open Source IOT Embedded Framework Created by CloudWalk Adopt

    adapter pattern to hardware interface Compilation and packaging tools Helpers https://github.com/cloudwalkio/da_funk da_funk
  34. @scalone lib/device/ !"" application.rb !"" audio.rb !"" crypto.rb !"" display.rb

    !"" io.rb !"" magnetic.rb !"" network.rb !"" printer.rb !"" runtime.rb !"" system.rb #"" version.rb class Device class Audio def self.adapter Device.adapter::Audio end def self.beep(tone, seconds) milli = seconds * 1000 adapter.beep(tone, milli) end end end da_funk da_funk
  35. @scalone @scalone GPRS/3G/WIFI Persistent Connection TCP + TLS 1.2 WebSocket

    Download in chunks
  36. @scalone Push Notification / Transaction / Package Download Past ISO8583

    and Serfx :( Ping 6 bytes and Data Consumption (2mb limit per month) Inflate/deflate Heroku Implemented by DaFunk WebSocket
  37. @scalone AT Command Interface Ruby Communication

  38. @scalone AT Command Interface Ruby Attach Connection Management Communication

  39. @scalone Security and Crypto

  40. @scalone PTS Terminal 3DES + Working Key PIN / DATA

    DUKPT (Derived Unique Key Per Transaction) (SDK bind) SSL Library mbed TLS / PolarSSL hKps:/ /github.com/luisbebop/mruby-polarssl HMAC, SHA1, MD5 and etc on mruby suite
 
 Security and Crypto
  41. @scalone PTS Terminal 3DES + Working Key PIN / DATA

    DUKPT (Derived Unique Key Per Transaction) (SDK bind) SSL Library mbed TLS / PolarSSL hKps:/ /github.com/luisbebop/mruby-polarssl HMAC, SHA1, MD5 and etc on mruby suite
 
 Security and Crypto
  42. @scalone Security and Crypto

  43. @scalone Take advantage of Bundler Rake tasks Adopt the same

    code in some scenarios ISO8583 CRuby + mRuby
  44. @scalone Gem Spec DaFunk compilation CRuby + mRuby

  45. @scalone Memory and leaks

  46. @scalone Memory and leaks

  47. @scalone Concurrency

  48. @scalone Status Bar Update Connection Management Sharing memory for communication

    by controlled queue Concurrency
  49. @scalone CloudWalk mruby gem mruby-context C structure implementation using semaphores

    Concurrency
  50. @scalone MRuby Libraries to make the runPme works h"ps:/ /github.com/cloudwalkio/mruby-da-funk

    IOT Framework h"ps:/ /github.com/cloudwalkio/da_funk TLV Parser (Payment TransacPon) h"ps:/ /github.com/scalone/funky-tlv CloudWalk CLI h"ps:/ /github.com/cloudwalkio/cloudwalk SSL Library mbed TLS / PolarSSL bind h"ps:/ /github.com/luisbebop/mruby-polarssl Open Source
  51. @scalone MRuby EMV Interface (Payment TransacPon) h"ps:/ /github.com/cloudwalkio/mruby-emv RIPEMD-160 hash

    h"ps:/ /github.com/scalone/mruby-ripemd QRCode generaPon h"ps:/ /github.com/scalone/mruby-qrcode Miniz bind to ZIP/UNZIP inflate/deflate h"ps:/ /github.com/scalone/mruby-miniz HMAC hash h"ps:/ /github.com/scalone/mruby-hmac Open Source
  52. @scalone PAX Terminals h"ps:/ /github.com/cloudwalkio/robot_rock Open Source TODAY

  53. @scalone Demo Thiago Scalone - @scalone

  54. @scalone 20k mRuby devices Production Thiago Scalone - @scalone

  55. @scalone 40.375 Devices Production Thiago Scalone - @scalone

  56. @scalone 40.375 Devices $ +1bi 50% mRuby Production Thiago Scalone

    - @scalone
  57. @scalone mRuby in Production Thiago Scalone - @scalone

  58. @scalone in mRuby We Trust Thiago Scalone - @scalone

  59. @scalone Thank you We Trust Thiago Scalone - @scalone