SlideShare a Scribd company logo
1 of 28
Download to read offline
LevelDB     by


   ohyecloudy
    homepage : http://ohyecloudy.com
    twitter : @ohyecloudy
   아꿈사 :   http://cafe.naver.com/architect1.cafe


                                     2011.08.06
아~ 이런 게 있구나
            본 발표 목적




    좀 더 쉽게 얘기하자면 ‘깊이가 없다’입니다.
따끈~      따끈~        따끈~
따끈~      따끈~        따끈~
2011.7.27 구글 오픈소스 블로그에 공식적으로 소개



따끈~      따끈~        따끈~
따끈~      따끈~        따끈~
따끈~      따끈~        따끈~
LevelDB는
  a fast and lightweight
  key/value DB library
                    입니다.
LevelDB는
  a fast and lightweight
  key/value DB library
                    입니다.
       NoSQL
Embedded DB
                  e.g. SQLite
LevelDB는
  a fast and lightweight
  key/value DB library
                      입니다.
LevelDB는
  a fast and lightweight
  NoSQL Embedded DB
  key/value DB library
                    입니다.
왜 만들었을까?
       뭐땀시
웹 애플리케이션용 DB 때문에
 웹 애플리케이션이 저장될 캐시를 결정.
 지금은 브라우저(크롬, FF, IE…)가 알아서 저장.
 오프라인 대비가 잘돼서 모바일에 좋다.
Web SQL Database는 탈락
       SQL은 웹 개발과 맞지 않다.
       ISO 표준이 존재하지만
       벤더마다 다양한 SQL문을 지원
IndexedDB 가 유력
    B-tree 기반 key/value 저장소
    key/value면 웹 애플리케이션이
    사용하기에 충분
LevelDB로
 IndexedDB를 구현하려고
맛만 살짝~

LevelDB 특징 보기
• Keys and values are arbitrary byte arrays.
• Data is stored sorted by key.
• The basic operations are Put(key,value),
  Get(key), Delete(key).
• Multiple changes can be made in one atomic
  batch.
• Users can create a transient snapshot to get
  a consistent view of data.
• Forward and backward iteration is supported
  over the data.
• Data is automatically compressed using the
  Snappy compression library.
• Keys and values are arbitrary byte arrays.
• Data is stored sorted by key.
• The basic operations are Put(key,value),
  Get(key), Delete(key).
• Multiple changes can be made in one atomic
  batch.
• Users can create a transient snapshot to get
  a consistent view of data.
• Forward and backward iteration is supported
  over the data.
• Data is automatically compressed using the
  Snappy compression library.
std::string value;
leveldb::Status s =
    db->Get(
        leveldb::ReadOptions(),
        key1,
        &value);

s = db->Put(
        leveldb::WriteOptions(),
        key2,
        value);

s = db->Delete(
        leveldb::WriteOptions(),
        key1);
• Keys and values are arbitrary byte arrays.
• Data is stored sorted by key.
• The basic operations are Put(key,value),
                  simple key/value store와 다른 특징.
  Get(key), Delete(key).
                  a persistent ordered map
• Multiple changes can be made in one atomic
                  custom comparison function 지원.
  batch.          range query가 싸겠다.
• Users can create a transient iteration이 가능 get
                  이런 특징 때문에 snapshot to
  a consistent view of data.
• Forward and backward iteration is supported
  over the data.
• Data is automatically compressed using the
  Snappy compression library.
// DB에 있는 모든 key/value 순회

leveldb::Iterator* it =
    db->NewIterator(leveldb::ReadOptions());

for (it->SeekToFirst();
     it->Valid(); it->Next())
{
    cout << it->key().ToString() << ": “ <<
        it->value().ToString() << endl;
}
• Keys and values are arbitrary byte arrays.
• Data is stored sorted by key.
• The basic operations are Put(key,value),
  Get(key), Delete(key).
• Multiple changes can be made in one atomic
  batch.
• Users can create a transient snapshot to get
  a consistent view of data.
• Forward and backward iteration is supported
  over the data.
• Data is automatically compressed using the
  Snappy compression library.
leveldb::ReadOptions options;
options.snapshot = db->GetSnapshot();

//…
// db를 업데이트한다.

leveldb::Iterator* iter = db->NewIterator(options);

// 업데이트를 하기 전 Shapshot DB를 읽는다.

delete iter;
db->ReleaseSnapshot(options.snapshot);
Fast를 붙일 만 해?
전체적으로 뛰어난 성능
다만 value 사이즈가 크면 성능 하락
 (value 사이즈가 100,000 byte일 때 성능)




구현상 key와 value를 적어도 두 번 복사하기 때문
정 리
• LevelDB는 NoSQL Embedded DB 이다.
• 웹 애플리케이션용 DB 때문에 만들었다.
  – IndexedDB
  – 다른 곳에도 더 사용하지 않을까?
• key로 정렬해서 저장한다.
• 전체적으로 뛰어난 성능
  – value 사이즈가 크면 성능 저하
References
LevelDB: A Fast Persistent Key-Value Store
http://nosql-database.org/
http://code.google.com/p/leveldb/
http://en.wikipedia.org/wiki/Embedded_database
http://kldp.org/node/123247
http://www.zdnet.co.kr/news/news_view.asp?artice_id=20110801100022
http://xguru.net/621
http://leveldb.googlecode.com/svn/trunk/doc/index.html
http://leveldb.googlecode.com/svn/trunk/doc/impl.html
http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html
Hacker News
LevelDB 간단한 소개
LevelDB 간단한 소개

More Related Content

What's hot

Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David AndersonVerverica
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Databricks
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersRudy De Busscher
 
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...Altinity Ltd
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumTathastu.ai
 
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021StreamNative
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application ResourcesDataWorks Summit
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy Docker, Inc.
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperSaurav Haloi
 
How to Performance-Tune Apache Spark Applications in Large Clusters
How to Performance-Tune Apache Spark Applications in Large ClustersHow to Performance-Tune Apache Spark Applications in Large Clusters
How to Performance-Tune Apache Spark Applications in Large ClustersDatabricks
 
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례YongSung Yoon
 
Une (simple) présentation de Apache Maven 2
Une (simple) présentation de Apache Maven 2Une (simple) présentation de Apache Maven 2
Une (simple) présentation de Apache Maven 2teejug
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact versionscalaconfjp
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusMarco Pas
 

What's hot (20)

Jenkins
JenkinsJenkins
Jenkins
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
 
Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0Deep Dive into the New Features of Apache Spark 3.0
Deep Dive into the New Features of Apache Spark 3.0
 
Finally, easy integration testing with Testcontainers
Finally, easy integration testing with TestcontainersFinally, easy integration testing with Testcontainers
Finally, easy integration testing with Testcontainers
 
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
OSA Con 2022 - Switching Jaeger Distributed Tracing to ClickHouse to Enable A...
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and Debezium
 
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
 
a Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resourcesa Secure Public Cache for YARN Application Resources
a Secure Public Cache for YARN Application Resources
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Apache Ranger
Apache RangerApache Ranger
Apache Ranger
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
How to Performance-Tune Apache Spark Applications in Large Clusters
How to Performance-Tune Apache Spark Applications in Large ClustersHow to Performance-Tune Apache Spark Applications in Large Clusters
How to Performance-Tune Apache Spark Applications in Large Clusters
 
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Une (simple) présentation de Apache Maven 2
Une (simple) présentation de Apache Maven 2Une (simple) présentation de Apache Maven 2
Une (simple) présentation de Apache Maven 2
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact version
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
 

Viewers also liked

SnappyDB - NoSQL database for Android
SnappyDB - NoSQL database for AndroidSnappyDB - NoSQL database for Android
SnappyDB - NoSQL database for Androidnhachicha
 
NoSQL 간단한 소개
NoSQL 간단한 소개NoSQL 간단한 소개
NoSQL 간단한 소개Wonchang Song
 
Google Protocol buffer
Google Protocol bufferGoogle Protocol buffer
Google Protocol bufferknight1128
 
cocos2d-xにおけるデータ管理
cocos2d-xにおけるデータ管理cocos2d-xにおけるデータ管理
cocos2d-xにおけるデータ管理Tomoaki Shimizu
 
高性能并发网络服务器设计与实现
高性能并发网络服务器设计与实现高性能并发网络服务器设计与实现
高性能并发网络服务器设计与实现ideawu
 
SSDB(LevelDB server) vs Redis
SSDB(LevelDB server) vs RedisSSDB(LevelDB server) vs Redis
SSDB(LevelDB server) vs Redisideawu
 
Leveldb background
Leveldb backgroundLeveldb background
Leveldb background宗志 陈
 
[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments종빈 오
 
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81종빈 오
 
2011 아꿈사 오전반 포스트모템
2011 아꿈사 오전반 포스트모템2011 아꿈사 오전반 포스트모템
2011 아꿈사 오전반 포스트모템종빈 오
 
내가 본 미드 이야기
내가 본 미드 이야기내가 본 미드 이야기
내가 본 미드 이야기종빈 오
 
[Windows via c/c++] 4장 프로세스
[Windows via c/c++] 4장 프로세스[Windows via c/c++] 4장 프로세스
[Windows via c/c++] 4장 프로세스종빈 오
 
비트 경제와 공짜
비트 경제와 공짜비트 경제와 공짜
비트 경제와 공짜종빈 오
 
[Domain driven design] 17장 전략의 종합
[Domain driven design] 17장 전략의 종합[Domain driven design] 17장 전략의 종합
[Domain driven design] 17장 전략의 종합종빈 오
 
페리 수열(Farey sequence)
페리 수열(Farey sequence)페리 수열(Farey sequence)
페리 수열(Farey sequence)종빈 오
 
Intrusive data structure 소개
Intrusive data structure 소개Intrusive data structure 소개
Intrusive data structure 소개종빈 오
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In DepthFabio Fumarola
 
Redis on NVMe SSD - Zvika Guz, Samsung
 Redis on NVMe SSD - Zvika Guz, Samsung Redis on NVMe SSD - Zvika Guz, Samsung
Redis on NVMe SSD - Zvika Guz, SamsungRedis Labs
 

Viewers also liked (20)

SnappyDB - NoSQL database for Android
SnappyDB - NoSQL database for AndroidSnappyDB - NoSQL database for Android
SnappyDB - NoSQL database for Android
 
NoSQL 간단한 소개
NoSQL 간단한 소개NoSQL 간단한 소개
NoSQL 간단한 소개
 
Google Protocol buffer
Google Protocol bufferGoogle Protocol buffer
Google Protocol buffer
 
cocos2d-xにおけるデータ管理
cocos2d-xにおけるデータ管理cocos2d-xにおけるデータ管理
cocos2d-xにおけるデータ管理
 
高性能并发网络服务器设计与实现
高性能并发网络服务器设计与实现高性能并发网络服务器设计与实现
高性能并发网络服务器设计与实现
 
SSDB(LevelDB server) vs Redis
SSDB(LevelDB server) vs RedisSSDB(LevelDB server) vs Redis
SSDB(LevelDB server) vs Redis
 
Hdf5 intro
Hdf5 introHdf5 intro
Hdf5 intro
 
Hdf5
Hdf5Hdf5
Hdf5
 
Leveldb background
Leveldb backgroundLeveldb background
Leveldb background
 
[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments[GEG1] 3.volumetric representation of virtual environments
[GEG1] 3.volumetric representation of virtual environments
 
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81
[프로젝트가 서쪽으로 간 까닭은] chap 17, 18, 26, 33, 81
 
2011 아꿈사 오전반 포스트모템
2011 아꿈사 오전반 포스트모템2011 아꿈사 오전반 포스트모템
2011 아꿈사 오전반 포스트모템
 
내가 본 미드 이야기
내가 본 미드 이야기내가 본 미드 이야기
내가 본 미드 이야기
 
[Windows via c/c++] 4장 프로세스
[Windows via c/c++] 4장 프로세스[Windows via c/c++] 4장 프로세스
[Windows via c/c++] 4장 프로세스
 
비트 경제와 공짜
비트 경제와 공짜비트 경제와 공짜
비트 경제와 공짜
 
[Domain driven design] 17장 전략의 종합
[Domain driven design] 17장 전략의 종합[Domain driven design] 17장 전략의 종합
[Domain driven design] 17장 전략의 종합
 
페리 수열(Farey sequence)
페리 수열(Farey sequence)페리 수열(Farey sequence)
페리 수열(Farey sequence)
 
Intrusive data structure 소개
Intrusive data structure 소개Intrusive data structure 소개
Intrusive data structure 소개
 
7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth7. Key-Value Databases: In Depth
7. Key-Value Databases: In Depth
 
Redis on NVMe SSD - Zvika Guz, Samsung
 Redis on NVMe SSD - Zvika Guz, Samsung Redis on NVMe SSD - Zvika Guz, Samsung
Redis on NVMe SSD - Zvika Guz, Samsung
 

Similar to LevelDB 간단한 소개

[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)NAVER D2
 
Node.js DBMS short summary
Node.js DBMS short summaryNode.js DBMS short summary
Node.js DBMS short summaryHoChul Shin
 
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time DatabaseFirebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database승빈이네 공작소
 
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1승빈이네 공작소
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드cranbe95
 
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4Seok-joon Yun
 
Bottled water 요약 설명 20151114
Bottled water 요약 설명 20151114Bottled water 요약 설명 20151114
Bottled water 요약 설명 20151114Daeyong Shin
 
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석smartstudy_official
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxNeoClova
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxNeoClova
 
[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)NAVER D2
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQLI Goo Lee
 
Elastic Stack & Data pipeline
Elastic Stack & Data pipelineElastic Stack & Data pipeline
Elastic Stack & Data pipelineJongho Woo
 
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기Wonha Ryu
 
DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)WhaTap Labs
 
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기sung ki choi
 

Similar to LevelDB 간단한 소개 (20)

[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
[D2 CAMPUS] tech meet up(Back-end) - 교내 웹서비스 개발 일지 (박은찬님)
 
Node.js DBMS short summary
Node.js DBMS short summaryNode.js DBMS short summary
Node.js DBMS short summary
 
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time DatabaseFirebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database
Firebase for web (웹개발을 위한 파이어베이스) 3 Real-Time Database
 
CouchDB - Introduction - Korean
CouchDB - Introduction - KoreanCouchDB - Introduction - Korean
CouchDB - Introduction - Korean
 
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1
토이 프로젝트를 위한 속성 RDB(MySQL) 스터디 1
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
 
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
 
Bottled water 요약 설명 20151114
Bottled water 요약 설명 20151114Bottled water 요약 설명 20151114
Bottled water 요약 설명 20151114
 
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
[스마트스터디]모바일 애플리케이션 서비스에서의 로그 수집과 분석
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docx
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
 
[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)[211] HBase 기반 검색 데이터 저장소 (공개용)
[211] HBase 기반 검색 데이터 저장소 (공개용)
 
Portfolio
PortfolioPortfolio
Portfolio
 
Apache hive
Apache hiveApache hive
Apache hive
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQL
 
steeleye Replication
steeleye Replication steeleye Replication
steeleye Replication
 
Elastic Stack & Data pipeline
Elastic Stack & Data pipelineElastic Stack & Data pipeline
Elastic Stack & Data pipeline
 
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기
NDC 2016, [슈판워] 맨땅에서 데이터 분석 시스템 만들어나가기
 
DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)
 
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
 

More from 종빈 오

트위터 봇 개발 후기
트위터 봇 개발 후기트위터 봇 개발 후기
트위터 봇 개발 후기종빈 오
 
적당한 스터디 발표자료 만들기 2.0
적당한 스터디 발표자료 만들기 2.0적당한 스터디 발표자료 만들기 2.0
적당한 스터디 발표자료 만들기 2.0종빈 오
 
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해[NDC12] 게임 물리 엔진의 내부 동작 원리 이해
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해종빈 오
 
넘쳐나는 정보 소화 노하우
넘쳐나는 정보 소화 노하우넘쳐나는 정보 소화 노하우
넘쳐나는 정보 소화 노하우종빈 오
 
[GEG1] 2.the game asset pipeline
[GEG1] 2.the game asset pipeline[GEG1] 2.the game asset pipeline
[GEG1] 2.the game asset pipeline종빈 오
 
[TAOCP] 2.5 동적인 저장소 할당
[TAOCP] 2.5 동적인 저장소 할당[TAOCP] 2.5 동적인 저장소 할당
[TAOCP] 2.5 동적인 저장소 할당종빈 오
 
[GEG1] 24. key value dictionary
[GEG1] 24. key value dictionary[GEG1] 24. key value dictionary
[GEG1] 24. key value dictionary종빈 오
 
[TAOCP] 2.2.3 연결된 할당 - 위상정렬
[TAOCP] 2.2.3 연결된 할당 - 위상정렬[TAOCP] 2.2.3 연결된 할당 - 위상정렬
[TAOCP] 2.2.3 연결된 할당 - 위상정렬종빈 오
 
[TAOCP] 1.3.1 MIX 설명
[TAOCP] 1.3.1 MIX 설명[TAOCP] 1.3.1 MIX 설명
[TAOCP] 1.3.1 MIX 설명종빈 오
 
[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering종빈 오
 
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이종빈 오
 
[TAOCP] 1.2.1 수학적 귀납법
[TAOCP] 1.2.1 수학적 귀납법[TAOCP] 1.2.1 수학적 귀납법
[TAOCP] 1.2.1 수학적 귀납법종빈 오
 
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation	[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation 종빈 오
 
2010 아꿈사 오전반 포스트모템
2010 아꿈사 오전반 포스트모템2010 아꿈사 오전반 포스트모템
2010 아꿈사 오전반 포스트모템종빈 오
 
[shaderx6]8.2 3d engine tools with c++cli
[shaderx6]8.2 3d engine tools with c++cli[shaderx6]8.2 3d engine tools with c++cli
[shaderx6]8.2 3d engine tools with c++cli종빈 오
 
ManagingHumans/chap1~6
ManagingHumans/chap1~6ManagingHumans/chap1~6
ManagingHumans/chap1~6종빈 오
 
아꿈사 매니저 인사
아꿈사 매니저 인사아꿈사 매니저 인사
아꿈사 매니저 인사종빈 오
 
[페차쿠차] 아꿈사 반장 하기
[페차쿠차] 아꿈사 반장 하기[페차쿠차] 아꿈사 반장 하기
[페차쿠차] 아꿈사 반장 하기종빈 오
 
xUnitTestPattern/chapter7
xUnitTestPattern/chapter7xUnitTestPattern/chapter7
xUnitTestPattern/chapter7종빈 오
 
적당한 스터디 발표자료 만들기
적당한 스터디 발표자료 만들기적당한 스터디 발표자료 만들기
적당한 스터디 발표자료 만들기종빈 오
 

More from 종빈 오 (20)

트위터 봇 개발 후기
트위터 봇 개발 후기트위터 봇 개발 후기
트위터 봇 개발 후기
 
적당한 스터디 발표자료 만들기 2.0
적당한 스터디 발표자료 만들기 2.0적당한 스터디 발표자료 만들기 2.0
적당한 스터디 발표자료 만들기 2.0
 
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해[NDC12] 게임 물리 엔진의 내부 동작 원리 이해
[NDC12] 게임 물리 엔진의 내부 동작 원리 이해
 
넘쳐나는 정보 소화 노하우
넘쳐나는 정보 소화 노하우넘쳐나는 정보 소화 노하우
넘쳐나는 정보 소화 노하우
 
[GEG1] 2.the game asset pipeline
[GEG1] 2.the game asset pipeline[GEG1] 2.the game asset pipeline
[GEG1] 2.the game asset pipeline
 
[TAOCP] 2.5 동적인 저장소 할당
[TAOCP] 2.5 동적인 저장소 할당[TAOCP] 2.5 동적인 저장소 할당
[TAOCP] 2.5 동적인 저장소 할당
 
[GEG1] 24. key value dictionary
[GEG1] 24. key value dictionary[GEG1] 24. key value dictionary
[GEG1] 24. key value dictionary
 
[TAOCP] 2.2.3 연결된 할당 - 위상정렬
[TAOCP] 2.2.3 연결된 할당 - 위상정렬[TAOCP] 2.2.3 연결된 할당 - 위상정렬
[TAOCP] 2.2.3 연결된 할당 - 위상정렬
 
[TAOCP] 1.3.1 MIX 설명
[TAOCP] 1.3.1 MIX 설명[TAOCP] 1.3.1 MIX 설명
[TAOCP] 1.3.1 MIX 설명
 
[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering
 
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이
[TAOCP] 1.3.1 MIX 설명, 짝수 연습문제 풀이
 
[TAOCP] 1.2.1 수학적 귀납법
[TAOCP] 1.2.1 수학적 귀납법[TAOCP] 1.2.1 수학적 귀납법
[TAOCP] 1.2.1 수학적 귀납법
 
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation	[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation
[shaderx7] 8.1 Cross-Platform Rendering Thread : Design and Implementation
 
2010 아꿈사 오전반 포스트모템
2010 아꿈사 오전반 포스트모템2010 아꿈사 오전반 포스트모템
2010 아꿈사 오전반 포스트모템
 
[shaderx6]8.2 3d engine tools with c++cli
[shaderx6]8.2 3d engine tools with c++cli[shaderx6]8.2 3d engine tools with c++cli
[shaderx6]8.2 3d engine tools with c++cli
 
ManagingHumans/chap1~6
ManagingHumans/chap1~6ManagingHumans/chap1~6
ManagingHumans/chap1~6
 
아꿈사 매니저 인사
아꿈사 매니저 인사아꿈사 매니저 인사
아꿈사 매니저 인사
 
[페차쿠차] 아꿈사 반장 하기
[페차쿠차] 아꿈사 반장 하기[페차쿠차] 아꿈사 반장 하기
[페차쿠차] 아꿈사 반장 하기
 
xUnitTestPattern/chapter7
xUnitTestPattern/chapter7xUnitTestPattern/chapter7
xUnitTestPattern/chapter7
 
적당한 스터디 발표자료 만들기
적당한 스터디 발표자료 만들기적당한 스터디 발표자료 만들기
적당한 스터디 발표자료 만들기
 

LevelDB 간단한 소개

  • 1. LevelDB by ohyecloudy homepage : http://ohyecloudy.com twitter : @ohyecloudy 아꿈사 : http://cafe.naver.com/architect1.cafe 2011.08.06
  • 2. 아~ 이런 게 있구나 본 발표 목적 좀 더 쉽게 얘기하자면 ‘깊이가 없다’입니다.
  • 3. 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 2011.7.27 구글 오픈소스 블로그에 공식적으로 소개 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 따끈~ 따끈~
  • 4. LevelDB는 a fast and lightweight key/value DB library 입니다.
  • 5. LevelDB는 a fast and lightweight key/value DB library 입니다. NoSQL
  • 6. Embedded DB e.g. SQLite LevelDB는 a fast and lightweight key/value DB library 입니다.
  • 7. LevelDB는 a fast and lightweight NoSQL Embedded DB key/value DB library 입니다.
  • 9. 웹 애플리케이션용 DB 때문에 웹 애플리케이션이 저장될 캐시를 결정. 지금은 브라우저(크롬, FF, IE…)가 알아서 저장. 오프라인 대비가 잘돼서 모바일에 좋다.
  • 10. Web SQL Database는 탈락 SQL은 웹 개발과 맞지 않다. ISO 표준이 존재하지만 벤더마다 다양한 SQL문을 지원
  • 11. IndexedDB 가 유력 B-tree 기반 key/value 저장소 key/value면 웹 애플리케이션이 사용하기에 충분
  • 14. • Keys and values are arbitrary byte arrays. • Data is stored sorted by key. • The basic operations are Put(key,value), Get(key), Delete(key). • Multiple changes can be made in one atomic batch. • Users can create a transient snapshot to get a consistent view of data. • Forward and backward iteration is supported over the data. • Data is automatically compressed using the Snappy compression library.
  • 15. • Keys and values are arbitrary byte arrays. • Data is stored sorted by key. • The basic operations are Put(key,value), Get(key), Delete(key). • Multiple changes can be made in one atomic batch. • Users can create a transient snapshot to get a consistent view of data. • Forward and backward iteration is supported over the data. • Data is automatically compressed using the Snappy compression library.
  • 16. std::string value; leveldb::Status s = db->Get( leveldb::ReadOptions(), key1, &value); s = db->Put( leveldb::WriteOptions(), key2, value); s = db->Delete( leveldb::WriteOptions(), key1);
  • 17. • Keys and values are arbitrary byte arrays. • Data is stored sorted by key. • The basic operations are Put(key,value), simple key/value store와 다른 특징. Get(key), Delete(key). a persistent ordered map • Multiple changes can be made in one atomic custom comparison function 지원. batch. range query가 싸겠다. • Users can create a transient iteration이 가능 get 이런 특징 때문에 snapshot to a consistent view of data. • Forward and backward iteration is supported over the data. • Data is automatically compressed using the Snappy compression library.
  • 18. // DB에 있는 모든 key/value 순회 leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions()); for (it->SeekToFirst(); it->Valid(); it->Next()) { cout << it->key().ToString() << ": “ << it->value().ToString() << endl; }
  • 19. • Keys and values are arbitrary byte arrays. • Data is stored sorted by key. • The basic operations are Put(key,value), Get(key), Delete(key). • Multiple changes can be made in one atomic batch. • Users can create a transient snapshot to get a consistent view of data. • Forward and backward iteration is supported over the data. • Data is automatically compressed using the Snappy compression library.
  • 20. leveldb::ReadOptions options; options.snapshot = db->GetSnapshot(); //… // db를 업데이트한다. leveldb::Iterator* iter = db->NewIterator(options); // 업데이트를 하기 전 Shapshot DB를 읽는다. delete iter; db->ReleaseSnapshot(options.snapshot);
  • 23. 다만 value 사이즈가 크면 성능 하락 (value 사이즈가 100,000 byte일 때 성능) 구현상 key와 value를 적어도 두 번 복사하기 때문
  • 25. • LevelDB는 NoSQL Embedded DB 이다. • 웹 애플리케이션용 DB 때문에 만들었다. – IndexedDB – 다른 곳에도 더 사용하지 않을까? • key로 정렬해서 저장한다. • 전체적으로 뛰어난 성능 – value 사이즈가 크면 성능 저하
  • 26. References LevelDB: A Fast Persistent Key-Value Store http://nosql-database.org/ http://code.google.com/p/leveldb/ http://en.wikipedia.org/wiki/Embedded_database http://kldp.org/node/123247 http://www.zdnet.co.kr/news/news_view.asp?artice_id=20110801100022 http://xguru.net/621 http://leveldb.googlecode.com/svn/trunk/doc/index.html http://leveldb.googlecode.com/svn/trunk/doc/impl.html http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html Hacker News