SlideShare une entreprise Scribd logo
1  sur  47
TokyoCabinet   TokyoTyrant




                Copyright © Akira Koyasu. Some rights reserved.
Copyright © Akira Koyasu. Some rights reserved.
Copyright © Akira Koyasu. Some rights reserved.
Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet (TC)

       DB
            DB




                    Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet (TC)

       DB
            DB




                    Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet (TC)

       DB
            DB



TokyoTyrant (TT)

 TC




                    Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet (TC)

       DB
            DB



TokyoTyrant (TT)

 TC




                    Copyright © Akira Koyasu. Some rights reserved.
Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet



        Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet




✤

               Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet




       hash (.tch)          b+ tree (.tcb)




    fixed-length (.tcf)           table (.tct)




✤

                             Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet


    hash (.tch)

    key      value             b+ tree (.tcb)




    fixed-length (.tcf)              table (.tct)




✤

                                Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet


    hash (.tch)            b+ tree (.tcb)
                                                               value1

    key      value            key                                 value2

                                                               value3




    fixed-length (.tcf)                table (.tct)




✤

                                    Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet


       hash (.tch)            b+ tree (.tcb)
                                                                  value1

      key       value            key                                 value2

                                                                  value3



    fixed-length (.tcf)
                                         table (.tct)
      key       value




✤

                                       Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet


       hash (.tch)              b+ tree (.tcb)
                                                                    value1

      key         value            key                                 value2

                                                                    value3



    fixed-length (.tcf)
                                           table (.tct)
      key         value

natural number   max-length


✤

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet


       hash (.tch)              b+ tree (.tcb)
                                                                     value1

      key         value            key                                  value2

                                                                     value3



    fixed-length (.tcf)          table (.tct)                 name1
                                                                   value1

                                                                        name2
      key         value             key
                                                                              value2
natural number   max-length                                 name3
                                                                  value1
✤

                                          Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI

tcxmgr create /path/to/dbfile.tcx




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI

tcxmgr create /path/to/dbfile.tcx

tcxmgr put /path/to/dbfile.tcx key value




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI

tcxmgr create /path/to/dbfile.tcx

tcxmgr put /path/to/dbfile.tcx key value

tcxmgr list /path/to/dbfile.tcx




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI

tcxmgr create /path/to/dbfile.tcx

tcxmgr put /path/to/dbfile.tcx key value

tcxmgr list /path/to/dbfile.tcx

tcxmgr get /path/to/dbfile.tcx key



✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                     CLI

tcxmgr create /path/to/dbfile.tcx

tcxmgr put /path/to/dbfile.tcx key value

tcxmgr list /path/to/dbfile.tcx

tcxmgr get /path/to/dbfile.tcx key

tcxmgr out /path/to/dbfile.tcx key

✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)

                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
JavaAPI (JNI)




            Copyright © Akira Koyasu. Some rights reserved.
TokyoCabinet
                       JavaAPI (JNI)


HDB hdb = new HDB();

//            tch

hdb.open("/path/to/test.tch", HDB.OCREAT | HDB.OWRITER);

hdb.put("hoge", "fuga");	//

hdb.get("hoge");	 	 //

hdb.out("hoge");	 	 //

hdb.close();	 //
             	




                                    Copyright © Akira Koyasu. Some rights reserved.
Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant



        Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)



                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




              ttserver /path/to/dbfile.tcx




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)



                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




              ttserver /path/to/dbfile.tcx

              ^C




✤                              x
    h(ash) / b(+ tree) / f(ixed-length) / t(able)



                                         Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
 ClientCLI




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
     ClientCLI


tcrmgr put host key value




                Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
     ClientCLI


tcrmgr put host key value

tcrmgr list host




                   Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
     ClientCLI


tcrmgr put host key value

tcrmgr list host

tcrmgr get host key




                   Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
     ClientCLI


tcrmgr put host key value

tcrmgr list host

tcrmgr get host key

tcrmgr out host key




                   Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
            ClientCLI


  tcrmgr put host key value

  tcrmgr list host

  tcrmgr get host key

  tcrmgr out host key


r=remote



                     Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
  JavaAPI




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant
                         JavaAPI


RDB rdb = new RDB();

//                       TT

rdb.open(new InetSocketAddress("localhost", 1978));

rdb.put("hoge", "fuga");	//

rdb.get("hoge");	 	 //

rdb.out("hoge");	 	 //

rdb.close();	 //
             	




                                    Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




          Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




-ulog




                  Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




-ulog



copy




                  Copyright © Akira Koyasu. Some rights reserved.
TokyoTyrant




-ulog



copy



DB      rts                    -rts



                        Copyright © Akira Koyasu. Some rights reserved.
Notes

This work is licensed under the Creative Commons Attribution-
NonCommercial 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by-nc/3.0/.


Tokyo Cabinet was written and is maintained by FAL Labs:
  http://fallabs.com/tokyocabinet/
Tokyo Tyrant was written and is maintained by FAL Labs:
  http://fallabs.com/tokyotyrant/


Page1 photo from:
  http://www.flickr.com/photos/batardy_sebastien/4092898500/


                                       Copyright © Akira Koyasu. Some rights reserved.

Contenu connexe

Tendances

Jvm lecture
Jvm lectureJvm lecture
Jvm lecture
sdslnmd
 
Guide for visualizing JMA's GSM outputs using GrADS
Guide for visualizing JMA's GSM outputs using GrADSGuide for visualizing JMA's GSM outputs using GrADS
Guide for visualizing JMA's GSM outputs using GrADS
JMA_447
 

Tendances (20)

Start Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New RopeStart Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New Rope
 
Jvm lecture
Jvm lectureJvm lecture
Jvm lecture
 
Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1Java 어플리케이션 성능튜닝 Part1
Java 어플리케이션 성능튜닝 Part1
 
Choosing the right high availability strategy
Choosing the right high availability strategyChoosing the right high availability strategy
Choosing the right high availability strategy
 
Supporting HDF5 in GrADS
Supporting HDF5 in GrADSSupporting HDF5 in GrADS
Supporting HDF5 in GrADS
 
Python VS GO
Python VS GOPython VS GO
Python VS GO
 
Understanding Garbage Collection
Understanding Garbage CollectionUnderstanding Garbage Collection
Understanding Garbage Collection
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and Spark
 
Cacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svccCacheconcurrencyconsistency cassandra svcc
Cacheconcurrencyconsistency cassandra svcc
 
Go at uber
Go at uberGo at uber
Go at uber
 
MapReduce - Basics | Big Data Hadoop Spark Tutorial | CloudxLab
MapReduce - Basics | Big Data Hadoop Spark Tutorial | CloudxLabMapReduce - Basics | Big Data Hadoop Spark Tutorial | CloudxLab
MapReduce - Basics | Big Data Hadoop Spark Tutorial | CloudxLab
 
FOSDEM 2020: Querying over millions and billions of metrics with M3DB's index
FOSDEM 2020: Querying over millions and billions of metrics with M3DB's indexFOSDEM 2020: Querying over millions and billions of metrics with M3DB's index
FOSDEM 2020: Querying over millions and billions of metrics with M3DB's index
 
Functional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPCFunctional, Type-safe, Testable Microservices with ZIO and gRPC
Functional, Type-safe, Testable Microservices with ZIO and gRPC
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
mesos-devoxx14
mesos-devoxx14mesos-devoxx14
mesos-devoxx14
 
Groovy.pptx
Groovy.pptxGroovy.pptx
Groovy.pptx
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
Guide for visualizing JMA's GSM outputs using GrADS
Guide for visualizing JMA's GSM outputs using GrADSGuide for visualizing JMA's GSM outputs using GrADS
Guide for visualizing JMA's GSM outputs using GrADS
 
Conda environment system & how to use it on CSUC machines
Conda environment system & how to use it on CSUC machinesConda environment system & how to use it on CSUC machines
Conda environment system & how to use it on CSUC machines
 
Improving go-git performance
Improving go-git performanceImproving go-git performance
Improving go-git performance
 

En vedette

インフラエンジニアのためのcassandra入門
インフラエンジニアのためのcassandra入門インフラエンジニアのためのcassandra入門
インフラエンジニアのためのcassandra入門
Akihiro Kuwano
 
AWS Summit 2011: Data Storage Solutions in the AWS Cloud
AWS Summit 2011: Data Storage Solutions in the AWS CloudAWS Summit 2011: Data Storage Solutions in the AWS Cloud
AWS Summit 2011: Data Storage Solutions in the AWS Cloud
Amazon Web Services
 

En vedette (20)

インフラエンジニアのためのcassandra入門
インフラエンジニアのためのcassandra入門インフラエンジニアのためのcassandra入門
インフラエンジニアのためのcassandra入門
 
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
 
tokyotalk
tokyotalktokyotalk
tokyotalk
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinet
 
Tokyocabinet
TokyocabinetTokyocabinet
Tokyocabinet
 
SSDとTokyoTyrantやMySQLの性能検証
SSDとTokyoTyrantやMySQLの性能検証SSDとTokyoTyrantやMySQLの性能検証
SSDとTokyoTyrantやMySQLの性能検証
 
AWS Tech Summit - Berlin 2011 - Choosing and Running Databases on AWS
AWS Tech Summit - Berlin 2011 - Choosing and Running Databases on AWSAWS Tech Summit - Berlin 2011 - Choosing and Running Databases on AWS
AWS Tech Summit - Berlin 2011 - Choosing and Running Databases on AWS
 
Tokyo Cabinet
Tokyo CabinetTokyo Cabinet
Tokyo Cabinet
 
AWS Summit 2011: Data Storage Solutions in the AWS Cloud
AWS Summit 2011: Data Storage Solutions in the AWS CloudAWS Summit 2011: Data Storage Solutions in the AWS Cloud
AWS Summit 2011: Data Storage Solutions in the AWS Cloud
 
ASAMAP 開発秘話
ASAMAP 開発秘話ASAMAP 開発秘話
ASAMAP 開発秘話
 
Redmineを快適に使うためのおすすめ初期設定
Redmineを快適に使うためのおすすめ初期設定Redmineを快適に使うためのおすすめ初期設定
Redmineを快適に使うためのおすすめ初期設定
 
Nosqlの基礎知識(2013年7月講義資料)
Nosqlの基礎知識(2013年7月講義資料)Nosqlの基礎知識(2013年7月講義資料)
Nosqlの基礎知識(2013年7月講義資料)
 
On the benchmark of Chainer
On the benchmark of ChainerOn the benchmark of Chainer
On the benchmark of Chainer
 
Deep parking
Deep parkingDeep parking
Deep parking
 
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
深層学習ライブラリの環境問題Chainer Meetup2016 07-02深層学習ライブラリの環境問題Chainer Meetup2016 07-02
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
 
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
ヤフー音声認識サービスでのディープラーニングとGPU利用事例ヤフー音声認識サービスでのディープラーニングとGPU利用事例
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
 
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
 
マシンパーセプション研究におけるChainer活用事例
マシンパーセプション研究におけるChainer活用事例マシンパーセプション研究におけるChainer活用事例
マシンパーセプション研究におけるChainer活用事例
 
Chainer Update v1.8.0 -> v1.10.0+
Chainer Update v1.8.0 -> v1.10.0+Chainer Update v1.8.0 -> v1.10.0+
Chainer Update v1.8.0 -> v1.10.0+
 
Chainer, Cupy入門
Chainer, Cupy入門Chainer, Cupy入門
Chainer, Cupy入門
 

Plus de 輝 子安

Plus de 輝 子安 (13)

Protractor under the hood
Protractor under the hoodProtractor under the hood
Protractor under the hood
 
そろそろLambda(CI/CD編)
そろそろLambda(CI/CD編)そろそろLambda(CI/CD編)
そろそろLambda(CI/CD編)
 
Dockerで構成するWebサービス 〜EmotionTechの場合〜
Dockerで構成するWebサービス 〜EmotionTechの場合〜Dockerで構成するWebサービス 〜EmotionTechの場合〜
Dockerで構成するWebサービス 〜EmotionTechの場合〜
 
Workshop: Docker on Elastic Beanstalk
Workshop: Docker on Elastic BeanstalkWorkshop: Docker on Elastic Beanstalk
Workshop: Docker on Elastic Beanstalk
 
PHP conference 2013 ja report
PHP conference 2013 ja reportPHP conference 2013 ja report
PHP conference 2013 ja report
 
Scala for Java programmers
Scala for Java programmersScala for Java programmers
Scala for Java programmers
 
Garbage Collection for Dummies
Garbage Collection for DummiesGarbage Collection for Dummies
Garbage Collection for Dummies
 
JavaOne Guide for the Petite Bourgeoisie
JavaOne Guide for the Petite BourgeoisieJavaOne Guide for the Petite Bourgeoisie
JavaOne Guide for the Petite Bourgeoisie
 
Java, Moving Forward
Java, Moving ForwardJava, Moving Forward
Java, Moving Forward
 
Java, Up to Date
Java, Up to DateJava, Up to Date
Java, Up to Date
 
Java, Up to Date Sources
Java, Up to Date SourcesJava, Up to Date Sources
Java, Up to Date Sources
 
Hello, Guava ! samples
Hello, Guava ! samplesHello, Guava ! samples
Hello, Guava ! samples
 
Hello, Guava !
Hello, Guava !Hello, Guava !
Hello, Guava !
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Tokyo Cabinet & Tokyo Tyrant

  • 1. TokyoCabinet TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 2. Copyright © Akira Koyasu. Some rights reserved.
  • 3. Copyright © Akira Koyasu. Some rights reserved.
  • 4. Copyright © Akira Koyasu. Some rights reserved.
  • 5. TokyoCabinet (TC) DB DB Copyright © Akira Koyasu. Some rights reserved.
  • 6. TokyoCabinet (TC) DB DB Copyright © Akira Koyasu. Some rights reserved.
  • 7. TokyoCabinet (TC) DB DB TokyoTyrant (TT) TC Copyright © Akira Koyasu. Some rights reserved.
  • 8. TokyoCabinet (TC) DB DB TokyoTyrant (TT) TC Copyright © Akira Koyasu. Some rights reserved.
  • 9. Copyright © Akira Koyasu. Some rights reserved.
  • 10. TokyoCabinet Copyright © Akira Koyasu. Some rights reserved.
  • 11. TokyoCabinet ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 12. TokyoCabinet hash (.tch) b+ tree (.tcb) fixed-length (.tcf) table (.tct) ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 13. TokyoCabinet hash (.tch) key value b+ tree (.tcb) fixed-length (.tcf) table (.tct) ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 14. TokyoCabinet hash (.tch) b+ tree (.tcb) value1 key value key value2 value3 fixed-length (.tcf) table (.tct) ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 15. TokyoCabinet hash (.tch) b+ tree (.tcb) value1 key value key value2 value3 fixed-length (.tcf) table (.tct) key value ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 16. TokyoCabinet hash (.tch) b+ tree (.tcb) value1 key value key value2 value3 fixed-length (.tcf) table (.tct) key value natural number max-length ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 17. TokyoCabinet hash (.tch) b+ tree (.tcb) value1 key value key value2 value3 fixed-length (.tcf) table (.tct) name1 value1 name2 key value key value2 natural number max-length name3 value1 ✤ Copyright © Akira Koyasu. Some rights reserved.
  • 18. TokyoCabinet CLI ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 19. TokyoCabinet CLI tcxmgr create /path/to/dbfile.tcx ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 20. TokyoCabinet CLI tcxmgr create /path/to/dbfile.tcx tcxmgr put /path/to/dbfile.tcx key value ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 21. TokyoCabinet CLI tcxmgr create /path/to/dbfile.tcx tcxmgr put /path/to/dbfile.tcx key value tcxmgr list /path/to/dbfile.tcx ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 22. TokyoCabinet CLI tcxmgr create /path/to/dbfile.tcx tcxmgr put /path/to/dbfile.tcx key value tcxmgr list /path/to/dbfile.tcx tcxmgr get /path/to/dbfile.tcx key ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 23. TokyoCabinet CLI tcxmgr create /path/to/dbfile.tcx tcxmgr put /path/to/dbfile.tcx key value tcxmgr list /path/to/dbfile.tcx tcxmgr get /path/to/dbfile.tcx key tcxmgr out /path/to/dbfile.tcx key ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 24. TokyoCabinet JavaAPI (JNI) Copyright © Akira Koyasu. Some rights reserved.
  • 25. TokyoCabinet JavaAPI (JNI) HDB hdb = new HDB(); // tch hdb.open("/path/to/test.tch", HDB.OCREAT | HDB.OWRITER); hdb.put("hoge", "fuga"); // hdb.get("hoge"); // hdb.out("hoge"); // hdb.close(); // Copyright © Akira Koyasu. Some rights reserved.
  • 26. Copyright © Akira Koyasu. Some rights reserved.
  • 27. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 28. TokyoTyrant ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 29. TokyoTyrant ttserver /path/to/dbfile.tcx ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 30. TokyoTyrant ttserver /path/to/dbfile.tcx ^C ✤ x h(ash) / b(+ tree) / f(ixed-length) / t(able) Copyright © Akira Koyasu. Some rights reserved.
  • 31. TokyoTyrant ClientCLI Copyright © Akira Koyasu. Some rights reserved.
  • 32. TokyoTyrant ClientCLI tcrmgr put host key value Copyright © Akira Koyasu. Some rights reserved.
  • 33. TokyoTyrant ClientCLI tcrmgr put host key value tcrmgr list host Copyright © Akira Koyasu. Some rights reserved.
  • 34. TokyoTyrant ClientCLI tcrmgr put host key value tcrmgr list host tcrmgr get host key Copyright © Akira Koyasu. Some rights reserved.
  • 35. TokyoTyrant ClientCLI tcrmgr put host key value tcrmgr list host tcrmgr get host key tcrmgr out host key Copyright © Akira Koyasu. Some rights reserved.
  • 36. TokyoTyrant ClientCLI tcrmgr put host key value tcrmgr list host tcrmgr get host key tcrmgr out host key r=remote Copyright © Akira Koyasu. Some rights reserved.
  • 37. TokyoTyrant JavaAPI Copyright © Akira Koyasu. Some rights reserved.
  • 38. TokyoTyrant JavaAPI RDB rdb = new RDB(); // TT rdb.open(new InetSocketAddress("localhost", 1978)); rdb.put("hoge", "fuga"); // rdb.get("hoge"); // rdb.out("hoge"); // rdb.close(); // Copyright © Akira Koyasu. Some rights reserved.
  • 39. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 40. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 41. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 42. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 43. TokyoTyrant Copyright © Akira Koyasu. Some rights reserved.
  • 44. TokyoTyrant -ulog Copyright © Akira Koyasu. Some rights reserved.
  • 45. TokyoTyrant -ulog copy Copyright © Akira Koyasu. Some rights reserved.
  • 46. TokyoTyrant -ulog copy DB rts -rts Copyright © Akira Koyasu. Some rights reserved.
  • 47. Notes This work is licensed under the Creative Commons Attribution- NonCommercial 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/. Tokyo Cabinet was written and is maintained by FAL Labs: http://fallabs.com/tokyocabinet/ Tokyo Tyrant was written and is maintained by FAL Labs: http://fallabs.com/tokyotyrant/ Page1 photo from: http://www.flickr.com/photos/batardy_sebastien/4092898500/ Copyright © Akira Koyasu. Some rights reserved.

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. cd ~/path/to/tokyoproducts\ntchmgr create dbfile.tch\ntchmgr put dbfile.tch "hoge" "fuga"tchmgr list dbfile.tch\ntchmgr get dbfile.tch "hoge"\ntchmgr out dbfile.tch "hoge"\nrm dbfile.tch\n
  44. cd ~/path/to/tokyoproducts\ntchmgr create dbfile.tch\ntchmgr put dbfile.tch "hoge" "fuga"tchmgr list dbfile.tch\ntchmgr get dbfile.tch "hoge"\ntchmgr out dbfile.tch "hoge"\nrm dbfile.tch\n
  45. cd ~/path/to/tokyoproducts\ntchmgr create dbfile.tch\ntchmgr put dbfile.tch "hoge" "fuga"tchmgr list dbfile.tch\ntchmgr get dbfile.tch "hoge"\ntchmgr out dbfile.tch "hoge"\nrm dbfile.tch\n
  46. cd ~/path/to/tokyoproducts\ntchmgr create dbfile.tch\ntchmgr put dbfile.tch "hoge" "fuga"tchmgr list dbfile.tch\ntchmgr get dbfile.tch "hoge"\ntchmgr out dbfile.tch "hoge"\nrm dbfile.tch\n
  47. cd ~/path/to/tokyoproducts\ntchmgr create dbfile.tch\ntchmgr put dbfile.tch "hoge" "fuga"tchmgr list dbfile.tch\ntchmgr get dbfile.tch "hoge"\ntchmgr out dbfile.tch "hoge"\nrm dbfile.tch\n
  48. \n
  49. \n
  50. cd ~/path/to/tokyoproducts\nttserver dbfile.tch\n^C\n
  51. cd ~/path/to/tokyoproducts\nttserver dbfile.tch\n^C\n
  52. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ ttserver dbfile.tch\n\nconsole2:$ tcrmgr put localhost "hoge" "fuga"\nconsole2:$ tcrmgr put localhost "foo" "bar"\nconsole2:$ tcrmgr list localhost\nconsole2:$ tcrmgr get localhost "hoge"\nconsole2:$ tcrmgr out localhost "hoge"\n\nconsole1:$ ^C\nconsole1:$ tchmgr list dbfile.tch\n
  53. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ ttserver dbfile.tch\n\nconsole2:$ tcrmgr put localhost "hoge" "fuga"\nconsole2:$ tcrmgr put localhost "foo" "bar"\nconsole2:$ tcrmgr list localhost\nconsole2:$ tcrmgr get localhost "hoge"\nconsole2:$ tcrmgr out localhost "hoge"\n\nconsole1:$ ^C\nconsole1:$ tchmgr list dbfile.tch\n
  54. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ ttserver dbfile.tch\n\nconsole2:$ tcrmgr put localhost "hoge" "fuga"\nconsole2:$ tcrmgr put localhost "foo" "bar"\nconsole2:$ tcrmgr list localhost\nconsole2:$ tcrmgr get localhost "hoge"\nconsole2:$ tcrmgr out localhost "hoge"\n\nconsole1:$ ^C\nconsole1:$ tchmgr list dbfile.tch\n
  55. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ ttserver dbfile.tch\n\nconsole2:$ tcrmgr put localhost "hoge" "fuga"\nconsole2:$ tcrmgr put localhost "foo" "bar"\nconsole2:$ tcrmgr list localhost\nconsole2:$ tcrmgr get localhost "hoge"\nconsole2:$ tcrmgr out localhost "hoge"\n\nconsole1:$ ^C\nconsole1:$ tchmgr list dbfile.tch\n
  56. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ ttserver dbfile.tch\n\nconsole2:$ tcrmgr put localhost "hoge" "fuga"\nconsole2:$ tcrmgr put localhost "foo" "bar"\nconsole2:$ tcrmgr list localhost\nconsole2:$ tcrmgr get localhost "hoge"\nconsole2:$ tcrmgr out localhost "hoge"\n\nconsole1:$ ^C\nconsole1:$ tchmgr list dbfile.tch\n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ mkdir ulog\nconsole1:$ ttserver -sid 1 -ulog ulog/ dbfile.tch\n\nconsole2:$ cd ~/path/to/tokyoproducts2\nconsole2:$ cat ttcopy.sh\nconsole2:$ tcrmgr copy localhost '@/path/to/tokyoproducts2/ttcopy.sh'\nconsole2:$ ls -l ~/path/to/tokyoproducts\nconsole2:$ mv ~/path/to/tokyoproducts/dbfile.tch.xxxx ./\nconsole2:$ echo xxxxx > slave.rts\nconsole2:$ mv dbfile.tch.xxxx dbfile.tch\nconsole2:$ ttserver -sid 2 -port 1979 -mhost localhost -mport 1978 -rts slave.rts dbfile.tch\n\nconsole3:$ tcrmgr list localhost\nconsole3:$ tcrmgr list -port 1979 localhost\nconsole3:$ tcrmgr put localhost "cto" "mukaihira"\nconsole3:$ tcrmgr get -port 1979 localhost "cto"\n
  63. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ mkdir ulog\nconsole1:$ ttserver -sid 1 -ulog ulog/ dbfile.tch\n\nconsole2:$ cd ~/path/to/tokyoproducts2\nconsole2:$ cat ttcopy.sh\nconsole2:$ tcrmgr copy localhost '@/path/to/tokyoproducts2/ttcopy.sh'\nconsole2:$ ls -l ~/path/to/tokyoproducts\nconsole2:$ mv ~/path/to/tokyoproducts/dbfile.tch.xxxx ./\nconsole2:$ echo xxxxx > slave.rts\nconsole2:$ mv dbfile.tch.xxxx dbfile.tch\nconsole2:$ ttserver -sid 2 -port 1979 -mhost localhost -mport 1978 -rts slave.rts dbfile.tch\n\nconsole3:$ tcrmgr list localhost\nconsole3:$ tcrmgr list -port 1979 localhost\nconsole3:$ tcrmgr put localhost "cto" "mukaihira"\nconsole3:$ tcrmgr get -port 1979 localhost "cto"\n
  64. console1:$ cd ~/path/to/tokyoproducts\nconsole1:$ mkdir ulog\nconsole1:$ ttserver -sid 1 -ulog ulog/ dbfile.tch\n\nconsole2:$ cd ~/path/to/tokyoproducts2\nconsole2:$ cat ttcopy.sh\nconsole2:$ tcrmgr copy localhost '@/path/to/tokyoproducts2/ttcopy.sh'\nconsole2:$ ls -l ~/path/to/tokyoproducts\nconsole2:$ mv ~/path/to/tokyoproducts/dbfile.tch.xxxx ./\nconsole2:$ echo xxxxx > slave.rts\nconsole2:$ mv dbfile.tch.xxxx dbfile.tch\nconsole2:$ ttserver -sid 2 -port 1979 -mhost localhost -mport 1978 -rts slave.rts dbfile.tch\n\nconsole3:$ tcrmgr list localhost\nconsole3:$ tcrmgr list -port 1979 localhost\nconsole3:$ tcrmgr put localhost "cto" "mukaihira"\nconsole3:$ tcrmgr get -port 1979 localhost "cto"\n
  65. \n