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

dRuby 20th anniversary hands-on workshop

dRuby 20th anniversary hands-on workshop

slide: dRuby 20th anniversary hands-on workshop
text is here : http://www.druby.org/fukuoka2019.pdf

seki at druby.org

April 20, 2019
Tweet

More Decks by seki at druby.org

Other Decks in Programming

Transcript

  1. dRuby 20th anniversary hands-on workshop
    @m_seki / [email protected]

    View Slide

  2. @m_seki
    Ruby committer
    Author of ERB, dRuby, Rinda
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  3. What is dRuby
    Distributed Object System
    Can invoke methods in different
    process
    Can send objects between process
    Pure Ruby
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  4. দߐͷϫʔΫγϣοϓͷ࣭໰
    dRuby
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  5. Goal of this workshop
    dRuby
    http://www.druby.org/fukuoka2019.pdf
    Feel what dRuby is.
    For details, read the book.

    View Slide

  6. 1999 [ruby-list:15406]
    1st dRuby
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  7. 1st dRuby on T-shirts
    suzuri.jp/m_seki

    View Slide

  8. Ask them questions in English

    View Slide

  9. 2005 - ·ͩॳ࡮Γങ͑·͢
    http://www.druby.org/fukuoka2019.pdf
    dRuby
    ʹΑΔ
    ؔকढ़ஶ
    ෼ࢄ
    ɾ
    Web
    ϓϩάϥϛϯά
    First printing from 2005 (Still available)

    View Slide

  10. 2012 (-2014 ઈ൛)
    http://www.druby.org/fukuoka2019.pdf
    Publication from 2012 (Become out of print in 2014)

    View Slide

  11. ΋ͬͱΘ͔Γ΍͘͢΄Ίͯʂ
    http://www.druby.org/fukuoka2019.pdf
    Praise it more directly, please!

    View Slide

  12. dRuby͸ͳʹʹ࢖͏ͷʁ
    ...
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  13. Twitterͷ৔߹
    http://www.druby.org/fukuoka2019.pdf
    In case of Twitter

    View Slide

  14. Concurrency ??
    http://www.druby.org/fukuoka2019.pdf
    It is very easy to use up multi-core

    View Slide

  15. Demo
    @drbrain
    Mandelbrot set 8core
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  16. Agenda
    Hello, World
    Key value store
    Queue
    4, 5
    http://www.druby.org/fukuoka2019.pdf
    4. Docker, 5. Docker and Ring are omitted.

    View Slide

  17. 1. Hello, World
    Setup dRuby
    Invoke a method in different process
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  18. 1. Hello, World
    http://www.druby.org/fukuoka2019.pdf
    require 'drb'
    class Hello
    def greeting
    puts('Hello, World.')
    end
    end
    uri = 'druby://localhost:54000'
    DRb.start_service(uri, Hello.new)
    sleep
    require 'drb'
    DRb.start_service
    uri = 'druby://localhost:54000'
    it = DRbObject.new_with_uri(uri)
    it.greeting
    ← greeting

    View Slide

  19. 2. Key value store
    KVS
    arguments
    return value
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  20. 2. Key value store
    http://www.druby.org/fukuoka2019.pdf
    KVS
    irb irb
    ● "greeting"
    ● "hello, world."
    ● "greeting"
    ● "hello, world."

    View Slide

  21. 3. Queue
    SizedQueue full/empty
    http://www.druby.org/fukuoka2019.pdf
    Synchronize process using thread synchronization mechanism

    View Slide

  22. OOPARTS
    http://www.druby.org/fukuoka2019.pdf
    I was just reminded of dRuby's OOPARTS-ness

    View Slide

  23. OOPARTS
    http://www.druby.org/fukuoka2019.pdf

    View Slide

  24. ·ͱΊ
    dRuby
    http://www.druby.org/fukuoka2019.pdf
    Conclusion
    Do you feel what dRuby is?
    For details, read the book.

    View Slide