SlideShare a Scribd company logo
1 of 21
On UnQLite
Kenichi Ishigaki
(@charsbar)
Kyoto.pm #5
Jul 13, 2013
http://blog.64p.org/entry/2013/07/05/155212
UnQLite = Not SQLite
What's Different
• Key/Value Store
• Document Store
(JSON)
• License (2-Clause BSD)
What's Similar
• Self-contained
• Cross Platform
Suitable For
Toolchains
Usage: Like A
Hash
tie my %hash, 'UnQLite', 'foo.db';
$hash{foo} = 'bar';
print $hash{foo};
Usage: OOPs
my $db = UnQLite->open('foo.db');
$db->kv_store(foo => 'bar');
my $v = $db->kv_fetch('foo');
Usage: Iteration
my $db = UnQLite->open('foo.db');
my $cursor = $db->cursor_init;
while($cursor->next_entry
&& $cursor->valid_entry) {
my ($key, $data) = ($cursor->key,
$cursor->data);
...
}
JSON... only for Jx9
my $db = UnQLite->open(':memory:');
$db->exec(<<'JX9');
db_exists('foo') || db_create('foo');
db_store('foo', [{bar: 'baz'}])
|| print db_errlog();
print db_fetch('foo');# {"bar":"baz","__id":0}
JX9
say dump $db->kv_fetch('foo'); # ?????
Performance
$ perl bench.pl --perl --bdb --sqlite 100 10000 (store)
Rate sql bdb_hs bdb_bt unq kc unq_m perl
sql 23.5/s -- -10% -19% -22% -41% -80% -86%
bdb_hs 26.1/s 11% -- -10% -13% -35% -78% -85%
bdb_bt 29.0/s 23% 11% -- -4% -28% -75% -83%
unq 30.1/s 28% 15% 4% -- -25% -74% -83%
kc 40.2/s 71% 54% 39% 33% -- -66% -77%
unq_m 118/s 400% 351% 306% 291% 193% -- -32%
perl 172/s 633% 560% 495% 472% 329% 47% --
$ perl bench.pl --perl --bdb --sqlite 10 100000 (store)
Rate bdb_hs sql unq bdb_bt kc perl unq_m
bdb_hs 1.14/s -- -53% -57% -60% -81% -89% -89%
sql 2.43/s 114% -- -8% -15% -59% -76% -77%
unq 2.65/s 133% 9% -- -7% -55% -74% -75%
bdb_bt 2.87/s 152% 18% 8% -- -52% -72% -73%
kc 5.95/s 424% 145% 124% 108% -- -42% -44%
perl 10.2/s 798% 320% 285% 256% 71% -- -4%
unq_m 10.6/s 836% 338% 301% 271% 79% 4% --
$ perl bench.pl --perl --bdb --sqlite 10 1000000 (store)
s/iter bdb_hs unq sql bdb_bt unq_m kc perl
bdb_hs 10.7 -- -32% -61% -65% -81% -83% -87%
unq 7.29 47% -- -43% -49% -72% -76% -81%
sql 4.17 158% 75% -- -10% -51% -57% -67%
bdb_bt 3.74 187% 95% 12% -- -45% -52% -63%
unq_m 2.04 426% 257% 104% 83% -- -13% -32%
kc 1.78 502% 309% 134% 110% 14% -- -22%
perl 1.40 669% 423% 199% 168% 46% 28% --
$ perl bench.pl --perl --bdb --sqlite 10 10000000 (store)
s/iter unq_m bdb_hs unq kc sql bdb_bt perl
unq_m 184 -- -38% -51% -67% -77% -78% -91%
bdb_hs 114 62% -- -20% -46% -62% -64% -85%
unq 91.0 103% 25% -- -33% -53% -55% -82%
kc 61.3 201% 86% 48% -- -30% -33% -73%
sql 43.1 328% 164% 111% 42% -- -5% -61%
bdb_bt 40.9 350% 178% 122% 50% 5% -- -59%
perl 16.6 1008% 584% 447% 268% 159% 146% --
$ perl bench.pl --bdb 100 10000 (fetch)
Rate bdb_bt unq bdb_hs kc
bdb_bt 40.0/s -- -5% -8% -23%
unq 42.2/s 5% -- -3% -19%
bdb_hs 43.7/s 9% 3% -- -16%
kc 52.1/s 30% 23% 19% --
$ perl bench.pl --bdb 10 100000 (fetch)
Rate bdb_hs bdb_bt unq kc
bdb_hs 2.21/s -- -39% -43% -59%
bdb_bt 3.60/s 63% -- -7% -33%
unq 3.88/s 76% 8% -- -28%
kc 5.41/s 145% 50% 39% --
$ perl bench.pl --bdb 10 1000000 (fetch)
s/iter bdb_hs unq bdb_bt kc
bdb_hs 4.94 -- -26% -40% -61%
unq 3.67 35% -- -19% -48%
bdb_bt 2.97 67% 24% -- -35%
kc 1.92 158% 92% 55% --
$ perl bench.pl --bdb 10 10000000
s/iter bdb_hs unq kc bdb_bt
bdb_hs 53.2 -- -15% -20% -37%
unq 45.0 18% -- -6% -26%
kc 42.5 25% 6% -- -22%
bdb_bt 33.3 60% 35% 28% --
New storage engines
are coming soon(?)
Further Information
http://unqlite.org
https://github.com/tokuhirom/UnQLite

More Related Content

What's hot

Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaJon Moore
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209Tim Bunce
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in PerlLaurent Dami
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationrjsmelo
 
Perl at SkyCon'12
Perl at SkyCon'12Perl at SkyCon'12
Perl at SkyCon'12Tim Bunce
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Tim Bunce
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)julien pauli
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in VaultGlynnForrest
 
Using ngx_lua in UPYUN
Using ngx_lua in UPYUNUsing ngx_lua in UPYUN
Using ngx_lua in UPYUNCong Zhang
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talkLocaweb
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principlesPerl Careers
 
"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr VronskiyFwdays
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809Tim Bunce
 
Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxyIsmael Celis
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPAdam Englander
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in rubyHiroshi Nakamura
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queueBrandon Lamb
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6Wim Godden
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 

What's hot (20)

Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and Lua
 
Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in Perl
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
 
Perl at SkyCon'12
Perl at SkyCon'12Perl at SkyCon'12
Perl at SkyCon'12
 
Perl Memory Use - LPW2013
Perl Memory Use - LPW2013Perl Memory Use - LPW2013
Perl Memory Use - LPW2013
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in Vault
 
Using ngx_lua in UPYUN
Using ngx_lua in UPYUNUsing ngx_lua in UPYUN
Using ngx_lua in UPYUN
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talk
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principles
 
"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809
 
Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxy
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHP
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 

Similar to On UnQLite

Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmMasahiro Nagano
 
Generated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsGenerated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsMark Baker
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Anatoly Sharifulin
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlNova Patch
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)brian d foy
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Joseph Scott
 
Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Damien Seguy
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기NAVER D2
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
 
{{more}} Kibana4
{{more}} Kibana4{{more}} Kibana4
{{more}} Kibana4琛琳 饶
 
Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨flyinweb
 
Шардинг заказов корзины каталога Onliner.by
Шардинг заказов корзины каталога Onliner.byШардинг заказов корзины каталога Onliner.by
Шардинг заказов корзины каталога Onliner.byPetr Trofimov
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
Talkaboutlithium
TalkaboutlithiumTalkaboutlithium
Talkaboutlithiumnoppoman722
 

Similar to On UnQLite (20)

Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapm
 
Generated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsGenerated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 Generators
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in Perl
 
Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)Benchmarking Perl (Chicago UniForum 2006)
Benchmarking Perl (Chicago UniForum 2006)
 
Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )Anatomy of a PHP Request ( UTOSC 2010 )
Anatomy of a PHP Request ( UTOSC 2010 )
 
Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
{{more}} Kibana4
{{more}} Kibana4{{more}} Kibana4
{{more}} Kibana4
 
Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨
 
Шардинг заказов корзины каталога Onliner.by
Шардинг заказов корзины каталога Onliner.byШардинг заказов корзины каталога Onliner.by
Шардинг заказов корзины каталога Onliner.by
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
glance replicator
glance replicatorglance replicator
glance replicator
 
PHP 5.4
PHP 5.4PHP 5.4
PHP 5.4
 
Talkaboutlithium
TalkaboutlithiumTalkaboutlithium
Talkaboutlithium
 

More from charsbar

Common boolean class_for_perl5
Common boolean class_for_perl5Common boolean class_for_perl5
Common boolean class_for_perl5charsbar
 
2018年夏のPerl5
2018年夏のPerl52018年夏のPerl5
2018年夏のPerl5charsbar
 
萬國之津梁
萬國之津梁萬國之津梁
萬國之津梁charsbar
 
2017年夏のPerl
2017年夏のPerl2017年夏のPerl
2017年夏のPerlcharsbar
 
2017年春のPerl
2017年春のPerl2017年春のPerl
2017年春のPerlcharsbar
 
Json(::PP) is a-changing
Json(::PP) is a-changingJson(::PP) is a-changing
Json(::PP) is a-changingcharsbar
 
JSON, JSON::PP, and more
JSON, JSON::PP, and moreJSON, JSON::PP, and more
JSON, JSON::PP, and morecharsbar
 
perl language update
perl language updateperl language update
perl language updatecharsbar
 
CPANの依存モジュールをもう少し正しく検出したい
CPANの依存モジュールをもう少し正しく検出したいCPANの依存モジュールをもう少し正しく検出したい
CPANの依存モジュールをもう少し正しく検出したいcharsbar
 
2013年のCPANモジュール作成事情
2013年のCPANモジュール作成事情2013年のCPANモジュール作成事情
2013年のCPANモジュール作成事情charsbar
 
Analyze CPAN, Analyze Community
Analyze CPAN, Analyze CommunityAnalyze CPAN, Analyze Community
Analyze CPAN, Analyze Communitycharsbar
 
Annual Report 2012
Annual Report 2012Annual Report 2012
Annual Report 2012charsbar
 
DBD::SQLite
DBD::SQLiteDBD::SQLite
DBD::SQLitecharsbar
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolscharsbar
 
CPANTS 2012
CPANTS 2012CPANTS 2012
CPANTS 2012charsbar
 
Revisiting ppm
Revisiting ppmRevisiting ppm
Revisiting ppmcharsbar
 
Mojolicious::Liteを使ってみよう
Mojolicious::Liteを使ってみようMojolicious::Liteを使ってみよう
Mojolicious::Liteを使ってみようcharsbar
 
変数、リファレンス
変数、リファレンス変数、リファレンス
変数、リファレンスcharsbar
 
關於perl的 文件翻譯
關於perl的文件翻譯關於perl的文件翻譯
關於perl的 文件翻譯charsbar
 
Practical Bug Reporting
Practical Bug ReportingPractical Bug Reporting
Practical Bug Reportingcharsbar
 

More from charsbar (20)

Common boolean class_for_perl5
Common boolean class_for_perl5Common boolean class_for_perl5
Common boolean class_for_perl5
 
2018年夏のPerl5
2018年夏のPerl52018年夏のPerl5
2018年夏のPerl5
 
萬國之津梁
萬國之津梁萬國之津梁
萬國之津梁
 
2017年夏のPerl
2017年夏のPerl2017年夏のPerl
2017年夏のPerl
 
2017年春のPerl
2017年春のPerl2017年春のPerl
2017年春のPerl
 
Json(::PP) is a-changing
Json(::PP) is a-changingJson(::PP) is a-changing
Json(::PP) is a-changing
 
JSON, JSON::PP, and more
JSON, JSON::PP, and moreJSON, JSON::PP, and more
JSON, JSON::PP, and more
 
perl language update
perl language updateperl language update
perl language update
 
CPANの依存モジュールをもう少し正しく検出したい
CPANの依存モジュールをもう少し正しく検出したいCPANの依存モジュールをもう少し正しく検出したい
CPANの依存モジュールをもう少し正しく検出したい
 
2013年のCPANモジュール作成事情
2013年のCPANモジュール作成事情2013年のCPANモジュール作成事情
2013年のCPANモジュール作成事情
 
Analyze CPAN, Analyze Community
Analyze CPAN, Analyze CommunityAnalyze CPAN, Analyze Community
Analyze CPAN, Analyze Community
 
Annual Report 2012
Annual Report 2012Annual Report 2012
Annual Report 2012
 
DBD::SQLite
DBD::SQLiteDBD::SQLite
DBD::SQLite
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its tools
 
CPANTS 2012
CPANTS 2012CPANTS 2012
CPANTS 2012
 
Revisiting ppm
Revisiting ppmRevisiting ppm
Revisiting ppm
 
Mojolicious::Liteを使ってみよう
Mojolicious::Liteを使ってみようMojolicious::Liteを使ってみよう
Mojolicious::Liteを使ってみよう
 
変数、リファレンス
変数、リファレンス変数、リファレンス
変数、リファレンス
 
關於perl的 文件翻譯
關於perl的文件翻譯關於perl的文件翻譯
關於perl的 文件翻譯
 
Practical Bug Reporting
Practical Bug ReportingPractical Bug Reporting
Practical Bug Reporting
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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, ...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+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...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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, ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

On UnQLite

  • 3. UnQLite = Not SQLite
  • 4. What's Different • Key/Value Store • Document Store (JSON) • License (2-Clause BSD)
  • 7. Usage: Like A Hash tie my %hash, 'UnQLite', 'foo.db'; $hash{foo} = 'bar'; print $hash{foo};
  • 8. Usage: OOPs my $db = UnQLite->open('foo.db'); $db->kv_store(foo => 'bar'); my $v = $db->kv_fetch('foo');
  • 9. Usage: Iteration my $db = UnQLite->open('foo.db'); my $cursor = $db->cursor_init; while($cursor->next_entry && $cursor->valid_entry) { my ($key, $data) = ($cursor->key, $cursor->data); ... }
  • 10. JSON... only for Jx9 my $db = UnQLite->open(':memory:'); $db->exec(<<'JX9'); db_exists('foo') || db_create('foo'); db_store('foo', [{bar: 'baz'}]) || print db_errlog(); print db_fetch('foo');# {"bar":"baz","__id":0} JX9 say dump $db->kv_fetch('foo'); # ?????
  • 12. $ perl bench.pl --perl --bdb --sqlite 100 10000 (store) Rate sql bdb_hs bdb_bt unq kc unq_m perl sql 23.5/s -- -10% -19% -22% -41% -80% -86% bdb_hs 26.1/s 11% -- -10% -13% -35% -78% -85% bdb_bt 29.0/s 23% 11% -- -4% -28% -75% -83% unq 30.1/s 28% 15% 4% -- -25% -74% -83% kc 40.2/s 71% 54% 39% 33% -- -66% -77% unq_m 118/s 400% 351% 306% 291% 193% -- -32% perl 172/s 633% 560% 495% 472% 329% 47% --
  • 13. $ perl bench.pl --perl --bdb --sqlite 10 100000 (store) Rate bdb_hs sql unq bdb_bt kc perl unq_m bdb_hs 1.14/s -- -53% -57% -60% -81% -89% -89% sql 2.43/s 114% -- -8% -15% -59% -76% -77% unq 2.65/s 133% 9% -- -7% -55% -74% -75% bdb_bt 2.87/s 152% 18% 8% -- -52% -72% -73% kc 5.95/s 424% 145% 124% 108% -- -42% -44% perl 10.2/s 798% 320% 285% 256% 71% -- -4% unq_m 10.6/s 836% 338% 301% 271% 79% 4% --
  • 14. $ perl bench.pl --perl --bdb --sqlite 10 1000000 (store) s/iter bdb_hs unq sql bdb_bt unq_m kc perl bdb_hs 10.7 -- -32% -61% -65% -81% -83% -87% unq 7.29 47% -- -43% -49% -72% -76% -81% sql 4.17 158% 75% -- -10% -51% -57% -67% bdb_bt 3.74 187% 95% 12% -- -45% -52% -63% unq_m 2.04 426% 257% 104% 83% -- -13% -32% kc 1.78 502% 309% 134% 110% 14% -- -22% perl 1.40 669% 423% 199% 168% 46% 28% --
  • 15. $ perl bench.pl --perl --bdb --sqlite 10 10000000 (store) s/iter unq_m bdb_hs unq kc sql bdb_bt perl unq_m 184 -- -38% -51% -67% -77% -78% -91% bdb_hs 114 62% -- -20% -46% -62% -64% -85% unq 91.0 103% 25% -- -33% -53% -55% -82% kc 61.3 201% 86% 48% -- -30% -33% -73% sql 43.1 328% 164% 111% 42% -- -5% -61% bdb_bt 40.9 350% 178% 122% 50% 5% -- -59% perl 16.6 1008% 584% 447% 268% 159% 146% --
  • 16. $ perl bench.pl --bdb 100 10000 (fetch) Rate bdb_bt unq bdb_hs kc bdb_bt 40.0/s -- -5% -8% -23% unq 42.2/s 5% -- -3% -19% bdb_hs 43.7/s 9% 3% -- -16% kc 52.1/s 30% 23% 19% --
  • 17. $ perl bench.pl --bdb 10 100000 (fetch) Rate bdb_hs bdb_bt unq kc bdb_hs 2.21/s -- -39% -43% -59% bdb_bt 3.60/s 63% -- -7% -33% unq 3.88/s 76% 8% -- -28% kc 5.41/s 145% 50% 39% --
  • 18. $ perl bench.pl --bdb 10 1000000 (fetch) s/iter bdb_hs unq bdb_bt kc bdb_hs 4.94 -- -26% -40% -61% unq 3.67 35% -- -19% -48% bdb_bt 2.97 67% 24% -- -35% kc 1.92 158% 92% 55% --
  • 19. $ perl bench.pl --bdb 10 10000000 s/iter bdb_hs unq kc bdb_bt bdb_hs 53.2 -- -15% -20% -37% unq 45.0 18% -- -6% -26% kc 42.5 25% 6% -- -22% bdb_bt 33.3 60% 35% 28% --
  • 20. New storage engines are coming soon(?)