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

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

Scalone

June 01, 2018
Tweet

More Decks by Scalone

Other Decks in Programming

Transcript

  1. @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
  2. Payment acquirers are very inefficient
 
 Most using outdated technology


    
 Incapable of offering digital products @scalone
  3. @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
  4. @scalone Created by Matz Small Cross-compilation / ANSI C Modular

    No gems, mrbgems static compilation .mrb https://github.com/mruby/mruby mRuby
  5. @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
  6. @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
  7. @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
  8. @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
  9. @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
  10. @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
  11. @scalone Take advantage of Bundler Rake tasks Adopt the same

    code in some scenarios ISO8583 CRuby + mRuby
  12. @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
  13. @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