SlideShare a Scribd company logo
“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

PDF
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
PPTX
MongoDB's New Aggregation framework
PDF
Scaling drupal on amazon web services dr
PPT
MongoDB @ fliptop
PDF
Amazon Athena (March 2017)
PPTX
Windows Azure HDInsight Service
PPSX
Introduction to Vertica (Architecture & More)
PPTX
[PL] Code Europe 2016 - Python and Microsoft Azure
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB's New Aggregation framework
Scaling drupal on amazon web services dr
MongoDB @ fliptop
Amazon Athena (March 2017)
Windows Azure HDInsight Service
Introduction to Vertica (Architecture & More)
[PL] Code Europe 2016 - Python and Microsoft Azure

What's hot (15)

PDF
The future of node
PPTX
Kenshoo - Use Hadoop, One Week, No Coding
PPTX
MongoDB Aggregation MongoSF May 2011
PPTX
Machine Learning Melee: AWS ML vs. Azure ML
PDF
Elasticsearch x Autoscaling (AWS)
PPTX
Compare DynamoDB vs. MongoDB
PDF
NoSQL in Perspective
KEY
Aws simple db
PPTX
Azure CosmosDb - Where we are
PPTX
Getting Maximum Performance from Amazon Redshift: Complex Queries
PPTX
Scalability of Amazon Redshift Data Loading and Query Speed
PPTX
mongodb-aggregation-may-2012
KEY
BarCamp cloudsearch
PDF
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
PDF
Bulk Loading Data into Cassandra
The future of node
Kenshoo - Use Hadoop, One Week, No Coding
MongoDB Aggregation MongoSF May 2011
Machine Learning Melee: AWS ML vs. Azure ML
Elasticsearch x Autoscaling (AWS)
Compare DynamoDB vs. MongoDB
NoSQL in Perspective
Aws simple db
Azure CosmosDb - Where we are
Getting Maximum Performance from Amazon Redshift: Complex Queries
Scalability of Amazon Redshift Data Loading and Query Speed
mongodb-aggregation-may-2012
BarCamp cloudsearch
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
Bulk Loading Data into Cassandra
Ad

Similar to Key Value Store For Local Environment (20)

PDF
Modern, Scalable, Ambitious apps with Ember.js
PDF
Buildingsocialanalyticstoolwithmongodb
PPTX
Kåre Rude Andersen - Be a hero – optimize scom and present your services
PPTX
MongoDB Shell Tips & Tricks
PDF
Building Dynamic AWS Lambda Applications with BoxLang
PDF
Building Dynamic AWS Lambda Applications with BoxLang
PPTX
Shell Tips and Tricks
KEY
Scaling php applications with redis
PDF
Ruby on Rails For .Net Programmers
PDF
Introducing BoxLang : A new JVM language for productivity and modularity!
PDF
The Art Of Readable Code
PDF
MongoDB at FrozenRails
PDF
Fighting Against Chaotically Separated Values with Embulk
PPTX
AI與大數據數據處理 Spark實戰(20171216)
PDF
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
PDF
Rich Internet Applications con JavaFX e NetBeans
PDF
Data Science
PPTX
JS Essence
PDF
Munich March 2015 - Cassandra + Spark Overview
PDF
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
Modern, Scalable, Ambitious apps with Ember.js
Buildingsocialanalyticstoolwithmongodb
Kåre Rude Andersen - Be a hero – optimize scom and present your services
MongoDB Shell Tips & Tricks
Building Dynamic AWS Lambda Applications with BoxLang
Building Dynamic AWS Lambda Applications with BoxLang
Shell Tips and Tricks
Scaling php applications with redis
Ruby on Rails For .Net Programmers
Introducing BoxLang : A new JVM language for productivity and modularity!
The Art Of Readable Code
MongoDB at FrozenRails
Fighting Against Chaotically Separated Values with Embulk
AI與大數據數據處理 Spark實戰(20171216)
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Rich Internet Applications con JavaFX e NetBeans
Data Science
JS Essence
Munich March 2015 - Cassandra + Spark Overview
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
Ad

More from bash0C7 (20)

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

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Electronic commerce courselecture one. Pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Group 1 Presentation -Planning and Decision Making .pptx
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
MYSQL Presentation for SQL database connectivity
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Getting Started with Data Integration: FME Form 101
Electronic commerce courselecture one. Pdf
A comparative analysis of optical character recognition models for extracting...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

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. ご清聴ありがとうございました