SlideShare a Scribd company logo
1 of 39
Download to read offline
“Good for you. Good for me. Mmm, good.”

  Key-Value Store
For Local Environment
        誰でも使える技術で使える
          ローカル環境向け
          Key-Value Store

         こしば としあき
most
important
most important

Good for you. Good for me.
 Mmm, good.
  俺に良し
  お前に良し
  みんなに良し
about me
about me

TOSHIAKI
 koshiba
こしば としあき
  twitter:bash0C7
  hatenaid:bash0C7
about me
• RubyKaigi2009 実行委員
  – 受付/オペレーション担当
• 東京Ruby会議01 スピーカー
  – 「オフィスで踏み出すRubyの世界」
about me
• 最近の趣味
  – プロジェクトを設計すること
• 昼の仕事
  – ソフトウェア開発
    • 金融業/運輸業 適用業務システム開発
       –IBM COBOL on CICS
       –MFCOBOL on MTP
       –RPG on AS/400
    • その他、Web、開発ツール開発
  – 社員の提案・不満の収集窓口
about me

•IBM COBOL on CICS
•MFCOBOL on MTP
•RPG on AS/400
outline
outline
          Ruby Script                  User



           This KVS              Rich Client(GUI)



                        Entity Layer



                         local file
requirement
requirement

• store hash
• business person integrate
• on memory running
• without Web Application
• max_size < 1,000,000
design
design

         This KVS
                            Rich Client(GUI)

          API
                <<Entity>>
                middle ware



                    local file
implement
implement
                          concealed
       This KVS Class     Internal processing
            XLS_KVS


                          <<Presentation>>
        Win32OLE
                           Microsoft Excel

            COM API
                   <<Entity>>
                 Microsoft Excel


                 Excel Workbook
Microsoft Excel

    Entity & Presentation
feature
feature

• store key-value
• on memory running
• edit stored values
store
key-values
store key-value

defined same method as "Hash"
  –[](key)
  –store(key, value)
  –delete(key)
store key-value – find(1)




YAML.load(
  @app.WorksheetFunction.VLookup
   (YAML.dump(key),
    @sheet.Range(KEYVALUE_COLS), 2, false ))
store key-value – find(2)




@sheet.range(KEY_COLS).Find(YAML.dump(key),
                            @app.ActiveCell,
                            -4163, #xlValues,
                            1, #xlWhole,
                            1, #xlByRows,
                            1, #xlNext,
                            true,
                             false)
store key-value – insert

get tail row offset in worksheet


max_row =
   @sheet.UsedRange.Row +
   @sheet.UsedRange.Rows.count
@sheet.range("A#{max_row}").value =
   YAML.dump(key)
@sheet.range("B#{max_row}").value =
   YAML.dump(value)
store key-value – update




range = find(key)
range.offset(0, 1).value = YAML.dump(value)
store key-value - delete




target_row = find(key).Row
sheet.Range("#{target_row}:#{target_row}").Delet
  e (-4162)
on memory
  running
on memory running

• if call XLS_KVS#new
  –create XLS_KVS::Hash instance
  –lunch Microsoft Excel
• if call XLS_KVS::Hash#Close
  –save&close Excel Workbook
  –unload Microsoft Excel
edit
stored values
edit stored values
kvs = XLS_KVS.load(@xls_file, 1, false)
kvs.store(1, [Time.now, 'new running', 19])
kvs.store(2, [Time.now, 'I am Koshiba', 9])
kvs.store(3, self)
edit stored values
kvs = XLS_KVS.load(@xls_file, 1, false)
kvs.store(1, [Time.now, 'new running', 19])
kvs.store(2, [Time.now, 'I am Koshiba', 9])
kvs.store(3, self)
                                 edit directly!
edit stored values
kvs = XLS_KVS.load(@xls_file, 1, false)
kvs.store(1, [Time.now, 'new running', 19])
    Excel is useful
kvs.store(2, [Time.now, 'I am Koshiba', 9])

     for many people!
kvs.store(3, self)
                                 edit directly!
      engineers,
      business persons
      students,
      my mother, etc
edit stored values

  Microsoft Excel is



many people's friend
summary
summary

• Ruby is programmer's friend
summary

• Ruby is programmer's friend
• Excel is many people's friend
summary

• Ruby is programmer's friend
• Excel is many people's friend

•Ruby × Excel =
 everyone's friend
"everyone's friend"
   Ruby × Excel

  XLS_KVS
Key-Value Store Library

coming soon!
Thank you
      for
  listening.
ご清聴ありがとうございました

More Related Content

What's hot

NoSQL in Perspective
NoSQL in PerspectiveNoSQL in Perspective
NoSQL in Perspective
Jeff Smith
 

What's hot (19)

[PL] Code Europe 2016 - Python and Microsoft Azure
[PL] Code Europe 2016 - Python and Microsoft Azure[PL] Code Europe 2016 - Python and Microsoft Azure
[PL] Code Europe 2016 - Python and Microsoft Azure
 
The future of node
The future of nodeThe future of node
The future of node
 
Kenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No CodingKenshoo - Use Hadoop, One Week, No Coding
Kenshoo - Use Hadoop, One Week, No Coding
 
MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011
 
Machine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure MLMachine Learning Melee: AWS ML vs. Azure ML
Machine Learning Melee: AWS ML vs. Azure ML
 
Elasticsearch x Autoscaling (AWS)
Elasticsearch x Autoscaling (AWS)Elasticsearch x Autoscaling (AWS)
Elasticsearch x Autoscaling (AWS)
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDB
 
NoSQL in Perspective
NoSQL in PerspectiveNoSQL in Perspective
NoSQL in Perspective
 
Aws simple db
Aws simple dbAws simple db
Aws simple db
 
Production NoSQL in an Hour: Introduction to Amazon DynamoDB (DAT101) | AWS r...
Production NoSQL in an Hour: Introduction to Amazon DynamoDB (DAT101) | AWS r...Production NoSQL in an Hour: Introduction to Amazon DynamoDB (DAT101) | AWS r...
Production NoSQL in an Hour: Introduction to Amazon DynamoDB (DAT101) | AWS r...
 
Azure CosmosDb - Where we are
Azure CosmosDb - Where we areAzure CosmosDb - Where we are
Azure CosmosDb - Where we are
 
(DEV309) Large-Scale Metrics Analysis in Ruby
(DEV309) Large-Scale Metrics Analysis in Ruby(DEV309) Large-Scale Metrics Analysis in Ruby
(DEV309) Large-Scale Metrics Analysis in Ruby
 
Getting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex QueriesGetting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex Queries
 
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
(APP202) Deploy, Manage, and Scale Your Apps with AWS OpsWorks and AWS Elasti...
 
Scalability of Amazon Redshift Data Loading and Query Speed
Scalability of Amazon Redshift Data Loading and Query SpeedScalability of Amazon Redshift Data Loading and Query Speed
Scalability of Amazon Redshift Data Loading and Query Speed
 
mongodb-aggregation-may-2012
mongodb-aggregation-may-2012mongodb-aggregation-may-2012
mongodb-aggregation-may-2012
 
BarCamp cloudsearch
BarCamp cloudsearchBarCamp cloudsearch
BarCamp cloudsearch
 
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
 
Bulk Loading Data into Cassandra
Bulk Loading Data into CassandraBulk Loading Data into Cassandra
Bulk Loading Data into Cassandra
 

Similar to Key Value Store For Local Environment

Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
Buildingsocialanalyticstoolwithmongodb
MongoDB APAC
 
Kåre Rude Andersen - Be a hero – optimize scom and present your services
Kåre Rude Andersen - Be a hero – optimize scom and present your servicesKåre Rude Andersen - Be a hero – optimize scom and present your services
Kåre Rude Andersen - Be a hero – optimize scom and present your services
Nordic Infrastructure Conference
 
MongoDB Shell Tips & Tricks
MongoDB Shell Tips & TricksMongoDB Shell Tips & Tricks
MongoDB Shell Tips & Tricks
MongoDB
 
Shell Tips and Tricks
Shell Tips and TricksShell Tips and Tricks
Shell Tips and Tricks
MongoDB
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
Baidu, Inc.
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)
Paul Chao
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans
Fabrizio Giudici
 

Similar to Key Value Store For Local Environment (20)

Modern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.jsModern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
 
Buildingsocialanalyticstoolwithmongodb
BuildingsocialanalyticstoolwithmongodbBuildingsocialanalyticstoolwithmongodb
Buildingsocialanalyticstoolwithmongodb
 
Kåre Rude Andersen - Be a hero – optimize scom and present your services
Kåre Rude Andersen - Be a hero – optimize scom and present your servicesKåre Rude Andersen - Be a hero – optimize scom and present your services
Kåre Rude Andersen - Be a hero – optimize scom and present your services
 
MongoDB Shell Tips & Tricks
MongoDB Shell Tips & TricksMongoDB Shell Tips & Tricks
MongoDB Shell Tips & Tricks
 
Shell Tips and Tricks
Shell Tips and TricksShell Tips and Tricks
Shell Tips and Tricks
 
Scaling php applications with redis
Scaling php applications with redisScaling php applications with redis
Scaling php applications with redis
 
Ruby on Rails For .Net Programmers
Ruby on Rails For .Net ProgrammersRuby on Rails For .Net Programmers
Ruby on Rails For .Net Programmers
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRails
 
Fighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkFighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with Embulk
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)
 
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans
 
Data Science
Data ScienceData Science
Data Science
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Munich March 2015 - Cassandra + Spark Overview
Munich March 2015 -  Cassandra + Spark OverviewMunich March 2015 -  Cassandra + Spark Overview
Munich March 2015 - Cassandra + Spark Overview
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
 
20170126 big data processing
20170126 big data processing20170126 big data processing
20170126 big data processing
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 
Streaming Solutions for Real time problems
Streaming Solutions for Real time problemsStreaming Solutions for Real time problems
Streaming Solutions for Real time problems
 

More from bash0C7

気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
bash0C7
 
事業創造に貢献する“最速最高”プロジェクト推進活動
事業創造に貢献する“最速最高”プロジェクト推進活動事業創造に貢献する“最速最高”プロジェクト推進活動
事業創造に貢献する“最速最高”プロジェクト推進活動
bash0C7
 
プロジェクトが失敗する要因+α(公開版)
プロジェクトが失敗する要因+α(公開版)プロジェクトが失敗する要因+α(公開版)
プロジェクトが失敗する要因+α(公開版)
bash0C7
 
TokyoRubyKaigi05 => RubyKaigi2011
TokyoRubyKaigi05 => RubyKaigi2011TokyoRubyKaigi05 => RubyKaigi2011
TokyoRubyKaigi05 => RubyKaigi2011
bash0C7
 
konshinkai for 2010 and after
konshinkai for 2010 and afterkonshinkai for 2010 and after
konshinkai for 2010 and after
bash0C7
 
一人からできるPF
一人からできるPF一人からできるPF
一人からできるPF
bash0C7
 
一人から始めるCCPM Burndown Chart & Buffer Management
一人から始めるCCPM Burndown Chart & Buffer Management一人から始めるCCPM Burndown Chart & Buffer Management
一人から始めるCCPM Burndown Chart & Buffer Management
bash0C7
 

More from bash0C7 (20)

大規模Webを支えるAgileな技術
大規模Webを支えるAgileな技術大規模Webを支えるAgileな技術
大規模Webを支えるAgileな技術
 
Let's go to "Shibuya Rubyist Lunch" at Tokyo, Japan
Let's go to "Shibuya Rubyist Lunch" at Tokyo, JapanLet's go to "Shibuya Rubyist Lunch" at Tokyo, Japan
Let's go to "Shibuya Rubyist Lunch" at Tokyo, Japan
 
気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
気がつけば俺が「師を仰ぎ、師を追いかけ、師に歩調を合わせ、師の意図を汲み、そして自らが師になるのだ」だった
 
事業創造に貢献する“最速最高”プロジェクト推進活動
事業創造に貢献する“最速最高”プロジェクト推進活動事業創造に貢献する“最速最高”プロジェクト推進活動
事業創造に貢献する“最速最高”プロジェクト推進活動
 
プロジェクトが失敗する要因+α(公開版)
プロジェクトが失敗する要因+α(公開版)プロジェクトが失敗する要因+α(公開版)
プロジェクトが失敗する要因+α(公開版)
 
事業創造のための最速最高プロダクトリリースサイクル(公開版)
事業創造のための最速最高プロダクトリリースサイクル(公開版)事業創造のための最速最高プロダクトリリースサイクル(公開版)
事業創造のための最速最高プロダクトリリースサイクル(公開版)
 
A Part of RubyKaigi Ecosystem
A Part of RubyKaigi EcosystemA Part of RubyKaigi Ecosystem
A Part of RubyKaigi Ecosystem
 
How to create TokyoRubyKaigi
How to create TokyoRubyKaigiHow to create TokyoRubyKaigi
How to create TokyoRubyKaigi
 
「あきらめ」が人を殺す 試行と粗忽と消沈の1825日
「あきらめ」が人を殺す 試行と粗忽と消沈の1825日 「あきらめ」が人を殺す 試行と粗忽と消沈の1825日
「あきらめ」が人を殺す 試行と粗忽と消沈の1825日
 
TokyoRubyKaigi05 => RubyKaigi2011
TokyoRubyKaigi05 => RubyKaigi2011TokyoRubyKaigi05 => RubyKaigi2011
TokyoRubyKaigi05 => RubyKaigi2011
 
俺の仕事がこんなに楽しいわけが無い・公開版(初出:2010/12/20 株式会社ECナビ会社説明会@IAMAS)
俺の仕事がこんなに楽しいわけが無い・公開版(初出:2010/12/20 株式会社ECナビ会社説明会@IAMAS)俺の仕事がこんなに楽しいわけが無い・公開版(初出:2010/12/20 株式会社ECナビ会社説明会@IAMAS)
俺の仕事がこんなに楽しいわけが無い・公開版(初出:2010/12/20 株式会社ECナビ会社説明会@IAMAS)
 
Pragmatic Excel Technics
Pragmatic Excel TechnicsPragmatic Excel Technics
Pragmatic Excel Technics
 
短絡的に作るRuby DSL 公開版
短絡的に作るRuby DSL 公開版短絡的に作るRuby DSL 公開版
短絡的に作るRuby DSL 公開版
 
konshinkai for 2010 and after
konshinkai for 2010 and afterkonshinkai for 2010 and after
konshinkai for 2010 and after
 
BUIDLING A CATHRDRAL
BUIDLING A CATHRDRALBUIDLING A CATHRDRAL
BUIDLING A CATHRDRAL
 
Rubykaigi Reception
Rubykaigi ReceptionRubykaigi Reception
Rubykaigi Reception
 
Grand Strategy For Presentation
Grand Strategy For PresentationGrand Strategy For Presentation
Grand Strategy For Presentation
 
一人からできるPF
一人からできるPF一人からできるPF
一人からできるPF
 
一人から始めるCCPM Burndown Chart & Buffer Management
一人から始めるCCPM Burndown Chart & Buffer Management一人から始めるCCPM Burndown Chart & Buffer Management
一人から始めるCCPM Burndown Chart & Buffer Management
 
ruby_from_office
ruby_from_officeruby_from_office
ruby_from_office
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

Key Value Store For Local Environment

  • 1. “Good for you. Good for me. Mmm, good.” Key-Value Store For Local Environment 誰でも使える技術で使える ローカル環境向け Key-Value Store こしば としあき
  • 3. most important Good for you. Good for me. Mmm, good. 俺に良し お前に良し みんなに良し
  • 5. about me TOSHIAKI koshiba こしば としあき twitter:bash0C7 hatenaid:bash0C7
  • 6. about me • RubyKaigi2009 実行委員 – 受付/オペレーション担当 • 東京Ruby会議01 スピーカー – 「オフィスで踏み出すRubyの世界」
  • 7. about me • 最近の趣味 – プロジェクトを設計すること • 昼の仕事 – ソフトウェア開発 • 金融業/運輸業 適用業務システム開発 –IBM COBOL on CICS –MFCOBOL on MTP –RPG on AS/400 • その他、Web、開発ツール開発 – 社員の提案・不満の収集窓口
  • 8. about me •IBM COBOL on CICS •MFCOBOL on MTP •RPG on AS/400
  • 10. outline Ruby Script User This KVS Rich Client(GUI) Entity Layer local file
  • 12. requirement • store hash • business person integrate • on memory running • without Web Application • max_size < 1,000,000
  • 14. design This KVS Rich Client(GUI) API <<Entity>> middle ware local file
  • 16. implement concealed This KVS Class Internal processing XLS_KVS <<Presentation>> Win32OLE Microsoft Excel COM API <<Entity>> Microsoft Excel Excel Workbook
  • 17. Microsoft Excel Entity & Presentation
  • 19. feature • store key-value • on memory running • edit stored values
  • 21. store key-value defined same method as "Hash" –[](key) –store(key, value) –delete(key)
  • 22. store key-value – find(1) YAML.load( @app.WorksheetFunction.VLookup (YAML.dump(key), @sheet.Range(KEYVALUE_COLS), 2, false ))
  • 23. store key-value – find(2) @sheet.range(KEY_COLS).Find(YAML.dump(key), @app.ActiveCell, -4163, #xlValues, 1, #xlWhole, 1, #xlByRows, 1, #xlNext, true, false)
  • 24. store key-value – insert get tail row offset in worksheet max_row = @sheet.UsedRange.Row + @sheet.UsedRange.Rows.count @sheet.range("A#{max_row}").value = YAML.dump(key) @sheet.range("B#{max_row}").value = YAML.dump(value)
  • 25. store key-value – update range = find(key) range.offset(0, 1).value = YAML.dump(value)
  • 26. store key-value - delete target_row = find(key).Row sheet.Range("#{target_row}:#{target_row}").Delet e (-4162)
  • 27. on memory running
  • 28. on memory running • if call XLS_KVS#new –create XLS_KVS::Hash instance –lunch Microsoft Excel • if call XLS_KVS::Hash#Close –save&close Excel Workbook –unload Microsoft Excel
  • 30. edit stored values kvs = XLS_KVS.load(@xls_file, 1, false) kvs.store(1, [Time.now, 'new running', 19]) kvs.store(2, [Time.now, 'I am Koshiba', 9]) kvs.store(3, self)
  • 31. edit stored values kvs = XLS_KVS.load(@xls_file, 1, false) kvs.store(1, [Time.now, 'new running', 19]) kvs.store(2, [Time.now, 'I am Koshiba', 9]) kvs.store(3, self) edit directly!
  • 32. edit stored values kvs = XLS_KVS.load(@xls_file, 1, false) kvs.store(1, [Time.now, 'new running', 19]) Excel is useful kvs.store(2, [Time.now, 'I am Koshiba', 9]) for many people! kvs.store(3, self) edit directly! engineers, business persons students, my mother, etc
  • 33. edit stored values Microsoft Excel is many people's friend
  • 35. summary • Ruby is programmer's friend
  • 36. summary • Ruby is programmer's friend • Excel is many people's friend
  • 37. summary • Ruby is programmer's friend • Excel is many people's friend •Ruby × Excel = everyone's friend
  • 38. "everyone's friend" Ruby × Excel XLS_KVS Key-Value Store Library coming soon!
  • 39. Thank you for listening. ご清聴ありがとうございました