SlideShare una empresa de Scribd logo
edo
                        cabinet



                                  http://tinyurl.com/edocabinet
Sunday, July 19, 2009
ruby and
                        tokyo cabinet



                                http://www.flickr.com/photos/kiim/3185168797/
Sunday, July 19, 2009
jmettraux

                        swiss guy
                        wants to write less code
                        ends up writing too much




                                              http://github.com/jmettraux/
Sunday, July 19, 2009
why rufus-tokyo ?

                        need to persist data quickly




Sunday, July 19, 2009
Tokyo Cabinet|Tyrant

                        key/value store

                        persistent

                        fast, fast, fast



                                           http://tokyocabinet.sourceforge.net/
Sunday, July 19, 2009
Hirabyashi-san is providing
                        ruby bindings

                        but no “sudo gem install”

                        and it’s ‘extconf’

                        and ...



                                        http://tokyocabinet.sourceforge.net/rubydoc/
Sunday, July 19, 2009
Sunday, July 19, 2009
what I want

                        {}




Sunday, July 19, 2009
Sunday, July 19, 2009
what I want

                        what I built




Sunday, July 19, 2009
rufus-tokyo

                        ruby gem

                        Tokyo Cabinet
                        Tokyo Tyrant

                        ruby FFI




Sunday, July 19, 2009
http://blog.headius.com/2008/10/ffi-for-ruby-now-available.html
Sunday, July 19, 2009
ruby FFI




Sunday, July 19, 2009
FFI

                        Foreign Function Interface

                        common lisp
                        haskell




Sunday, July 19, 2009
ruby FFI

                        from Rubinius

                        thanks to Wayne Meissner

                        to jruby and ruby



                               http://wmeissner.blogspot.com/2008/11/more-on-ruby-ffi.html
Sunday, July 19, 2009
ruby FFI

                        an example

                        the ‘crypt’ function




Sunday, July 19, 2009
Sunday, July 19, 2009
http://files.getdropbox.com/u/76595/rk_crypt.rb
Sunday, July 19, 2009
ruby FFI

                        an example

                        ‘uuid_generate’




Sunday, July 19, 2009
http://files.getdropbox.com/u/76595/rk_uuid.rb
Sunday, July 19, 2009
ruby FFI flow

                        1) attach functions
                        2) call functions




Sunday, July 19, 2009
ruby FFI

                        an example

                        libevent




Sunday, July 19, 2009
http://files.getdropbox.com/u/76595/rk_libev.rb
Sunday, July 19, 2009
http://files.getdropbox.com/u/76595/rk_libev.rb
Sunday, July 19, 2009
Sunday, July 19, 2009
ruby FFI

                        more fun

                        from ruby to lua




Sunday, July 19, 2009
http://jmettraux.wordpress.com/2009/03/16/ruby-to-lua/
Sunday, July 19, 2009
http://github.com/remogatto/ffi-inliner/
Sunday, July 19, 2009
Sunday, July 19, 2009
Tokyo Cabinet|Tyrant




Sunday, July 19, 2009
Mikio Hirabayashi is the
                        author

                        mixi.jp is the source




                                  http://tokyocabinet.sourceforge.net/index.html
Sunday, July 19, 2009
http://alpha.mixi.co.jp/blog/?author=3
Sunday, July 19, 2009
http://www.slideshare.net/estraier/introduction-to-tokyo-products
Sunday, July 19, 2009
Sunday, July 19, 2009
rufus-tokyo




Sunday, July 19, 2009
2 products

                        Tokyo Cabinet
                        local file

                        Tokyo Tyrant
                        remote cabinet file
                        over TCP socket
                        (or Unix socket)



Sunday, July 19, 2009
local   cabinet lib




Sunday, July 19, 2009
remote   tyrant server




                                  cabinet lib




Sunday, July 19, 2009
tt
                        memcached   tyrant server
                           http



                                     cabinet lib




Sunday, July 19, 2009
2 flavours

                        - key/value (abstract)

                        - key/hash of values (table)




Sunday, July 19, 2009
{ k => v }   { k => { k => v } }


                           hash
                          B+ tree           table
                        fixed length




Sunday, July 19, 2009
{ k => v }   { k => { k => v } }




                        abstract           table




Sunday, July 19, 2009
key/value

                        like { }




Sunday, July 19, 2009
Sunday, July 19, 2009
key/hash of values (table)

                        like a { pk => { } }




Sunday, July 19, 2009
Sunday, July 19, 2009
Sunday, July 19, 2009
local                            remote


                        Rufus::Tokyo::   Rufus::Tokyo::   Rufus::Tokyo::   Rufus::Tokyo::
                           Cabinet           Table           Tyrant         TyrantTable




                             {}          { pk => { } }         {}          { pk => { } }


                                                                     1+ accesses
                                   1 access
                                                                    lua embedded




Sunday, July 19, 2009
tt-src $ .configure --enable-lua
                        tt-src $ make
                        tt-src $ sudo make install




                                         http://openwferu.rubyforge.org/tokyo.html
Sunday, July 19, 2009
http://jmettraux.wordpress.com/2009/04/07/rufus-tokyo-0112-extlua/
Sunday, July 19, 2009
http://www.igvita.com/2009/07/13/extending-tokyo-cabinet-db-with-lua/
Sunday, July 19, 2009
Sunday, July 19, 2009
Rufus::Edo




Sunday, July 19, 2009
FFI

                        + ruby, jruby
                        + no compilation when ‘gem install’

                        - slower than classical c extension

                        => Rufus::Edo




Sunday, July 19, 2009
Sunday, July 19, 2009
local                           remote

                                                         Rufus::Tokyo::


                           FFI      Cabinet           Table         Tyrant        TyrantTable


                                                          Rufus::Edo::


                          c ext     Cabinet           Table               ?            ?


                        pure ruby                                  NetTyrant     NetTyrantTable




Sunday, July 19, 2009
ruby to tyrant, the fastest

                        http://github.com/actsasflinn/
                        ruby-tokyotyrant/

                        ruby c extension for Tyrant

                        rufus-tokyo friendly




Sunday, July 19, 2009
projects using rufus-tokyo

                        (github search)

                        - wycats/moneta
                        - jcrosby/cloudkit
                        - elisehuard/tokyo_cabinet4r
                        - terralien/metry
                        - nofxx/tokyo_store
                        - sethyates/content_manager
                        - heycarsten/gcoder
                        - joshbuddy/tokyo_cache_cow
                        - ...

Sunday, July 19, 2009
many thanks to

                        Mikio Hirabayashi
                        Zev Blut
                        Ilya Grigorik
                        Justin Reagor
                        Flinn Muller
                        Wayne E. Seguin
                        Matthew King
                        Yuki Satow
                        Wayne Meissner
                        Kim Erlandsen (picture)
                        and many others

Sunday, July 19, 2009

Más contenido relacionado

Similar a Edo Cabinet

CreateWV 091019112614 Wiley Keynote
CreateWV 091019112614 Wiley KeynoteCreateWV 091019112614 Wiley Keynote
CreateWV 091019112614 Wiley Keynote
CreateWV
 
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
eCommConf
 
Presentation to wdim_students
Presentation to wdim_studentsPresentation to wdim_students
Presentation to wdim_students
Scott Motte
 
Aaron Quint - Ruby Kaigi Presentation
Aaron Quint - Ruby Kaigi PresentationAaron Quint - Ruby Kaigi Presentation
Aaron Quint - Ruby Kaigi Presentation
quirkey
 
Termtter 2009-03-14
Termtter 2009-03-14Termtter 2009-03-14
Termtter 2009-03-14
jugyo kohno
 
Japanese Rubyists you have not met yet
Japanese Rubyists you have not met yetJapanese Rubyists you have not met yet
Japanese Rubyists you have not met yet
masayoshi takahashi
 
RubyKaigi2009さんか報告会
RubyKaigi2009さんか報告会RubyKaigi2009さんか報告会
RubyKaigi2009さんか報告会
Tomohiro Nishimura
 
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
eCommConf
 

Similar a Edo Cabinet (20)

Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?Web2.0 - wat is dat beest?
Web2.0 - wat is dat beest?
 
Digital Imaging with Free Software - Talk at Sheffield Astronomical Society J...
Digital Imaging with Free Software - Talk at Sheffield Astronomical Society J...Digital Imaging with Free Software - Talk at Sheffield Astronomical Society J...
Digital Imaging with Free Software - Talk at Sheffield Astronomical Society J...
 
RubyKaigi2009 Presentation Slide
RubyKaigi2009 Presentation SlideRubyKaigi2009 Presentation Slide
RubyKaigi2009 Presentation Slide
 
Enrolling in the Creative Class
Enrolling in the Creative ClassEnrolling in the Creative Class
Enrolling in the Creative Class
 
CreateWV 091019112614 Wiley Keynote
CreateWV 091019112614 Wiley KeynoteCreateWV 091019112614 Wiley Keynote
CreateWV 091019112614 Wiley Keynote
 
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
Gerd Leonhard Presentation at Emerging Communication Conference & Awards 2009...
 
Presentation to wdim_students
Presentation to wdim_studentsPresentation to wdim_students
Presentation to wdim_students
 
Aaron Quint - Ruby Kaigi Presentation
Aaron Quint - Ruby Kaigi PresentationAaron Quint - Ruby Kaigi Presentation
Aaron Quint - Ruby Kaigi Presentation
 
Rhouse - Home automation is ruby ?
Rhouse - Home automation is ruby ?Rhouse - Home automation is ruby ?
Rhouse - Home automation is ruby ?
 
Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009
 
Termtter 2009-03-14
Termtter 2009-03-14Termtter 2009-03-14
Termtter 2009-03-14
 
Japanese Rubyists you have not met yet
Japanese Rubyists you have not met yetJapanese Rubyists you have not met yet
Japanese Rubyists you have not met yet
 
RubyKaigi2009さんか報告会
RubyKaigi2009さんか報告会RubyKaigi2009さんか報告会
RubyKaigi2009さんか報告会
 
Bnc Pd Day Bellwoods
Bnc Pd Day BellwoodsBnc Pd Day Bellwoods
Bnc Pd Day Bellwoods
 
Oxente on Rails 2009
Oxente on Rails 2009Oxente on Rails 2009
Oxente on Rails 2009
 
Accelerating Ruby with LLVM
Accelerating Ruby with LLVMAccelerating Ruby with LLVM
Accelerating Ruby with LLVM
 
Vladimir Oane
Vladimir OaneVladimir Oane
Vladimir Oane
 
FFI - building cross engine ruby extensions
FFI - building cross engine ruby extensionsFFI - building cross engine ruby extensions
FFI - building cross engine ruby extensions
 
09年11月 イケテルシリコンバレー報告会
09年11月 イケテルシリコンバレー報告会09年11月 イケテルシリコンバレー報告会
09年11月 イケテルシリコンバレー報告会
 
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
Rj Auburn's Presentation at Emerging Communication Conference & Awards 2009 E...
 

Último

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Último (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...КАТЕРИНА АБЗЯТОВА  «Ефективне планування тестування  ключові аспекти та практ...
КАТЕРИНА АБЗЯТОВА «Ефективне планування тестування ключові аспекти та практ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

Edo Cabinet