SlideShare a Scribd company logo
1 of 26
Feedbacks:
Tokyo Cabinet & Tyrant
Florent Solt — Netvibes
florent@solt.biz — twitter.com/florentsolt
Tokyo *what* ?
Tokyo Cabinet
  http://1978th.net/tokyocabinet/
  « Tokyo Cabinet is a library of routines for managing a
  database »
  1 database = 1 file
  key-value storage
  written in C, official packages in Perl, Ruby, Java, Lua
Tokyo Cabinet

Memory or Filesystem
Compression bzip or gzip
Dynamic defragmentation
Hash, BTree, Fixed-Length, Table
Tokyo Cabinet — Hash
Tokyo Cabinet — BTree
Tokyo Cabinet — Fixed
Tokyo Cabinet — Table
Tokyo *what* ?
Tokyo Tyrant
  http://1978th.net/tokyotyrant/
  « Tokyo Tyrant is a package of network interface to
  the DBM called Tokyo Cabinet »
  binary, http and memcached protocols
  epoll / kqueue / eventports
  Written in C, official packages in Perl and Ruby
Tokyo Tyrant

No configuration files (command line only)
Lua extention
Master/Slave and Master/Master async replication
Backup (via the copy fonction)
1 process = 1 database
Examples
Run a memory hash server (same as memcached)
  ttserver


Sample queries
  memcat --servers=127.0.0.1:1978 1
  curl 127.0.0.1:1978/1
Examples


Run a btree on port 11211 (to simulate a memcache
server) and save all data compressed on the disk
  ttserver -dmn -port 11211 -log /path/to/server.log /path/
  to/cache.tcb#opts=ld#bnum=1000000
Examples
Run a table with some indexes and enable master-
master replication
  Master 1
    mkdir ulog1; ttserver -dmn -port 1978 -ulog ulog1 -sid
    1 -mhost localhost -mport 1979 -rts 1.rts /path/to/
    table1.tct#idx=foo:dec#idx=bar
  Master 2
    mkdir ulog2; ttserver -dmn -port 1979 -ulog ulog2 -sid
    2 -mhost localhost -mport 1978 -rts 2.rts /path/to/
    table2.tct#idx=foo:dec#idx=bar
Benchmarks or not
Benchmarks ?
Netvibes architecture

Queue    Feed           Sort     Item



        Subscriber      Flag   Enclosure



                 User
Netvibes architecture
                                                                       Table +
        Hash + Lua            Table                 BTree
                                                                        Shard


Queue                 Feed                Sort                  Item

                             Hash + Lua


                     Subscriber           Flag                Enclosure
                                                    BTree +
                                                     Lua +                Table
                                                     Shard


                                 User
                                            Table
Netvibes architecture
                                                                     Hundreds
        Millions           Millions           Millions
                                                                     of millions


Queue               Feed               Sort                   Item



                   Subscriber          Flag                 Enclosure
                                              Hundreds                 Dozens
                                              of millions             of millions



                                User
Queue implementation —
Example
multi queue (via prefix)
support
« adddouble » function
helps to avoid conflicts
« putkeep » function
prevent overwriting
Queue implementation —
Example

« fwmkeys » finds all
items with the given
prefix
multiple dequeue
support
Queue implementation —
Netvibes
One queue / minute
Automatic slot change
  When a queue empty and not in the slot representing
  the current time
No duplicates
  Check if an item is already in the queue
Strengths and Weaknesses
Strengths and Weaknesses
Weaknesses
 No bug tracker, no public code repository
 The documentation is not good enough
 Under heavy load, the master-master replication
 failed, we fallback to Master-Slave (and still have
 some issues)
 Databases can be corrupted
   Process killed, System crash or reboot
Strengths and Weaknesses
Weaknesses
 With big tables, queries need a lot of RAM and time
 Tables seems slow, we may avoid them in the future
 and prefer Hash or BTree
 Need a lots of time to understand all configuration
 options and their impact
 No live backup, the copy function lock the database
Strengths and Weaknesses

Strengths
  Easy to deploy and setup
  Easy to use
  It’s not a black box
  Good to very good performance for most of the time
Strengths and Weaknesses

Strengths
  Small memory footprint
  A single Tyrant process can handle thousands of
  open connections
  Many command line tools
  Lua extensions
And so what ?
Links
Google groups of english spoken users
  http://groups.google.com/group/tokyocabinet-users
Wiki: unofficial page to collect links
  http://tokyocabinetwiki.pbworks.com/
Blog of Ilya Grigorik
  http://www.igvita.com/2009/02/13/tokyo-cabinet-
  beyond-key-value-store
  http://www.igvita.com/2009/07/13/extending-tokyo-
  cabinet-db-with-lua/

More Related Content

Viewers also liked

Picasso igualada maig11_2.0
Picasso igualada maig11_2.0Picasso igualada maig11_2.0
Picasso igualada maig11_2.0jordi carner
 
Nuprecon - Presentation I gave at Camp Dresser McKee
Nuprecon - Presentation I gave at Camp Dresser McKeeNuprecon - Presentation I gave at Camp Dresser McKee
Nuprecon - Presentation I gave at Camp Dresser McKeedignagni
 
Emulation: Machines Within Machines
Emulation: Machines Within MachinesEmulation: Machines Within Machines
Emulation: Machines Within MachinesSchool
 
Harvesting Emotions
Harvesting EmotionsHarvesting Emotions
Harvesting Emotionsavakon+
 
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...FTourism & Marketing
 
So you want me to talk about your Brand!
So you want me to talk about your Brand!So you want me to talk about your Brand!
So you want me to talk about your Brand!avakon+
 
The Benefits of Sharing - SCURL Launch
The Benefits of Sharing - SCURL LaunchThe Benefits of Sharing - SCURL Launch
The Benefits of Sharing - SCURL LaunchStuart Lewis
 
Final collaborative classrooms_luresearchconference03_22_13
Final collaborative classrooms_luresearchconference03_22_13Final collaborative classrooms_luresearchconference03_22_13
Final collaborative classrooms_luresearchconference03_22_13Sheryl Abshire
 
בניית האגף החדש בספריה
בניית האגף החדש בספריה    בניית האגף החדש בספריה
בניית האגף החדש בספריה iris
 
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנה
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנהבנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנה
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנהiris
 
TTAP Method research with moderate stage AD, Levine Madori
TTAP Method research with moderate stage AD, Levine MadoriTTAP Method research with moderate stage AD, Levine Madori
TTAP Method research with moderate stage AD, Levine MadoriLevineMadori
 
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...FTourism & Marketing
 
פרידה מנעמי לרגל יציאתה לגמלאות
פרידה מנעמי לרגל יציאתה לגמלאותפרידה מנעמי לרגל יציאתה לגמלאות
פרידה מנעמי לרגל יציאתה לגמלאותiris
 
Tema 7º Descubro la gran misión de la iglesia
Tema 7º Descubro la gran misión de la iglesiaTema 7º Descubro la gran misión de la iglesia
Tema 7º Descubro la gran misión de la iglesiapitimini
 
Better Know Your Butterfly: Hairstreaks, Satyrium sp
Better Know Your Butterfly: Hairstreaks, Satyrium spBetter Know Your Butterfly: Hairstreaks, Satyrium sp
Better Know Your Butterfly: Hairstreaks, Satyrium spMary Legg
 

Viewers also liked (19)

Picasso igualada maig11_2.0
Picasso igualada maig11_2.0Picasso igualada maig11_2.0
Picasso igualada maig11_2.0
 
Nuprecon - Presentation I gave at Camp Dresser McKee
Nuprecon - Presentation I gave at Camp Dresser McKeeNuprecon - Presentation I gave at Camp Dresser McKee
Nuprecon - Presentation I gave at Camp Dresser McKee
 
Emulation: Machines Within Machines
Emulation: Machines Within MachinesEmulation: Machines Within Machines
Emulation: Machines Within Machines
 
Opf2
Opf2Opf2
Opf2
 
Harvesting Emotions
Harvesting EmotionsHarvesting Emotions
Harvesting Emotions
 
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...
Corso di formazione "SEO e Social Media Marketing operativo per Hotel" Four T...
 
So you want me to talk about your Brand!
So you want me to talk about your Brand!So you want me to talk about your Brand!
So you want me to talk about your Brand!
 
демо 2
демо 2демо 2
демо 2
 
The Benefits of Sharing - SCURL Launch
The Benefits of Sharing - SCURL LaunchThe Benefits of Sharing - SCURL Launch
The Benefits of Sharing - SCURL Launch
 
Final collaborative classrooms_luresearchconference03_22_13
Final collaborative classrooms_luresearchconference03_22_13Final collaborative classrooms_luresearchconference03_22_13
Final collaborative classrooms_luresearchconference03_22_13
 
Kutlu DoğUm öZel
Kutlu DoğUm öZelKutlu DoğUm öZel
Kutlu DoğUm öZel
 
בניית האגף החדש בספריה
בניית האגף החדש בספריה    בניית האגף החדש בספריה
בניית האגף החדש בספריה
 
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנה
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנהבנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנה
בנית ארכיון תמונות דיגיטלי ללא ארכיון מקורי מובנה
 
TTAP Method research with moderate stage AD, Levine Madori
TTAP Method research with moderate stage AD, Levine MadoriTTAP Method research with moderate stage AD, Levine Madori
TTAP Method research with moderate stage AD, Levine Madori
 
objetivos
objetivosobjetivos
objetivos
 
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...
Corso di formazione Informazione e Accoglienza per operatori Info Point 2012 ...
 
פרידה מנעמי לרגל יציאתה לגמלאות
פרידה מנעמי לרגל יציאתה לגמלאותפרידה מנעמי לרגל יציאתה לגמלאות
פרידה מנעמי לרגל יציאתה לגמלאות
 
Tema 7º Descubro la gran misión de la iglesia
Tema 7º Descubro la gran misión de la iglesiaTema 7º Descubro la gran misión de la iglesia
Tema 7º Descubro la gran misión de la iglesia
 
Better Know Your Butterfly: Hairstreaks, Satyrium sp
Better Know Your Butterfly: Hairstreaks, Satyrium spBetter Know Your Butterfly: Hairstreaks, Satyrium sp
Better Know Your Butterfly: Hairstreaks, Satyrium sp
 

Similar to Tokyo Cabinet / Tyrant @ Nosql Paris

Scaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBaseScaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBaseAge Mooij
 
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger Yahoo Developer Network
 
Millions quotes per second in pure java
Millions quotes per second in pure javaMillions quotes per second in pure java
Millions quotes per second in pure javaRoman Elizarov
 
Apache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - VerisignApache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - VerisignMichael Noll
 
Above the cloud: Big Data and BI
Above the cloud: Big Data and BIAbove the cloud: Big Data and BI
Above the cloud: Big Data and BIDenny Lee
 
[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & DrupalDrupal Taiwan
 
Xldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inXldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inliqiang xu
 
Fixing Twitter Velocity2009
Fixing Twitter Velocity2009Fixing Twitter Velocity2009
Fixing Twitter Velocity2009John Adams
 
Cassandra - An Introduction
Cassandra - An IntroductionCassandra - An Introduction
Cassandra - An IntroductionMikio L. Braun
 
Mets opening day - web based mets creation (2007)
Mets opening day - web based mets creation (2007)Mets opening day - web based mets creation (2007)
Mets opening day - web based mets creation (2007)Ralf Stockmann
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinetehuard
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack TutorialBret Piatt
 
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake BolewskiThe TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake BolewskiPyData
 

Similar to Tokyo Cabinet / Tyrant @ Nosql Paris (20)

Scaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBaseScaling Out With Hadoop And HBase
Scaling Out With Hadoop And HBase
 
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger
Sep 2012 HUG: Giraffa File System to Grow Hadoop Bigger
 
Playing Nice with Others
Playing Nice with OthersPlaying Nice with Others
Playing Nice with Others
 
Liferay and Cloud
Liferay and CloudLiferay and Cloud
Liferay and Cloud
 
Millions quotes per second in pure java
Millions quotes per second in pure javaMillions quotes per second in pure java
Millions quotes per second in pure java
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinet
 
Mla2011 final draft
Mla2011 final draftMla2011 final draft
Mla2011 final draft
 
Apache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - VerisignApache Storm 0.9 basic training - Verisign
Apache Storm 0.9 basic training - Verisign
 
Above the cloud: Big Data and BI
Above the cloud: Big Data and BIAbove the cloud: Big Data and BI
Above the cloud: Big Data and BI
 
[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal[DCTPE2010] Biodiversity & Drupal
[DCTPE2010] Biodiversity & Drupal
 
Xldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_inXldb2011 tue 1005_linked_in
Xldb2011 tue 1005_linked_in
 
Fixing Twitter Velocity2009
Fixing Twitter Velocity2009Fixing Twitter Velocity2009
Fixing Twitter Velocity2009
 
Cassandra - An Introduction
Cassandra - An IntroductionCassandra - An Introduction
Cassandra - An Introduction
 
Mets opening day - web based mets creation (2007)
Mets opening day - web based mets creation (2007)Mets opening day - web based mets creation (2007)
Mets opening day - web based mets creation (2007)
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinet
 
JCR In 10 Minutes
JCR In 10 MinutesJCR In 10 Minutes
JCR In 10 Minutes
 
ElephantDB
ElephantDBElephantDB
ElephantDB
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack Tutorial
 
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake BolewskiThe TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
The TileDB Array Data Storage Manager - Stavros Papadopoulos, Jake Bolewski
 
RuG Guest Lecture
RuG Guest LectureRuG Guest Lecture
RuG Guest Lecture
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Tokyo Cabinet / Tyrant @ Nosql Paris

  • 1. Feedbacks: Tokyo Cabinet & Tyrant Florent Solt — Netvibes florent@solt.biz — twitter.com/florentsolt
  • 2. Tokyo *what* ? Tokyo Cabinet http://1978th.net/tokyocabinet/ « Tokyo Cabinet is a library of routines for managing a database » 1 database = 1 file key-value storage written in C, official packages in Perl, Ruby, Java, Lua
  • 3. Tokyo Cabinet Memory or Filesystem Compression bzip or gzip Dynamic defragmentation Hash, BTree, Fixed-Length, Table
  • 8. Tokyo *what* ? Tokyo Tyrant http://1978th.net/tokyotyrant/ « Tokyo Tyrant is a package of network interface to the DBM called Tokyo Cabinet » binary, http and memcached protocols epoll / kqueue / eventports Written in C, official packages in Perl and Ruby
  • 9. Tokyo Tyrant No configuration files (command line only) Lua extention Master/Slave and Master/Master async replication Backup (via the copy fonction) 1 process = 1 database
  • 10. Examples Run a memory hash server (same as memcached) ttserver Sample queries memcat --servers=127.0.0.1:1978 1 curl 127.0.0.1:1978/1
  • 11. Examples Run a btree on port 11211 (to simulate a memcache server) and save all data compressed on the disk ttserver -dmn -port 11211 -log /path/to/server.log /path/ to/cache.tcb#opts=ld#bnum=1000000
  • 12. Examples Run a table with some indexes and enable master- master replication Master 1 mkdir ulog1; ttserver -dmn -port 1978 -ulog ulog1 -sid 1 -mhost localhost -mport 1979 -rts 1.rts /path/to/ table1.tct#idx=foo:dec#idx=bar Master 2 mkdir ulog2; ttserver -dmn -port 1979 -ulog ulog2 -sid 2 -mhost localhost -mport 1978 -rts 2.rts /path/to/ table2.tct#idx=foo:dec#idx=bar
  • 14. Netvibes architecture Queue Feed Sort Item Subscriber Flag Enclosure User
  • 15. Netvibes architecture Table + Hash + Lua Table BTree Shard Queue Feed Sort Item Hash + Lua Subscriber Flag Enclosure BTree + Lua + Table Shard User Table
  • 16. Netvibes architecture Hundreds Millions Millions Millions of millions Queue Feed Sort Item Subscriber Flag Enclosure Hundreds Dozens of millions of millions User
  • 17. Queue implementation — Example multi queue (via prefix) support « adddouble » function helps to avoid conflicts « putkeep » function prevent overwriting
  • 18. Queue implementation — Example « fwmkeys » finds all items with the given prefix multiple dequeue support
  • 19. Queue implementation — Netvibes One queue / minute Automatic slot change When a queue empty and not in the slot representing the current time No duplicates Check if an item is already in the queue
  • 21. Strengths and Weaknesses Weaknesses No bug tracker, no public code repository The documentation is not good enough Under heavy load, the master-master replication failed, we fallback to Master-Slave (and still have some issues) Databases can be corrupted Process killed, System crash or reboot
  • 22. Strengths and Weaknesses Weaknesses With big tables, queries need a lot of RAM and time Tables seems slow, we may avoid them in the future and prefer Hash or BTree Need a lots of time to understand all configuration options and their impact No live backup, the copy function lock the database
  • 23. Strengths and Weaknesses Strengths Easy to deploy and setup Easy to use It’s not a black box Good to very good performance for most of the time
  • 24. Strengths and Weaknesses Strengths Small memory footprint A single Tyrant process can handle thousands of open connections Many command line tools Lua extensions
  • 26. Links Google groups of english spoken users http://groups.google.com/group/tokyocabinet-users Wiki: unofficial page to collect links http://tokyocabinetwiki.pbworks.com/ Blog of Ilya Grigorik http://www.igvita.com/2009/02/13/tokyo-cabinet- beyond-key-value-store http://www.igvita.com/2009/07/13/extending-tokyo- cabinet-db-with-lua/

Editor's Notes