Giter Club home page Giter Club logo

blink-tree-logic's Introduction

#
#  This B-Link tree code is based on research published by Kark Malbrain ([KM]).
#  The code is derived and re-written from original 'C' source code placed
#  in the public domain by Karl Malbrain.  See:
#
#    http://arxiv.org/ftp/arxiv/papers/1009/1009.2764.pdf
#    https://code.google.com/p/high-concurrency-btree/
#
#  The [KM] code makes reference to research published by Ibrahim Jaluta ([IJ]):
#
#    "B-tree Concurrency Control and Recovery in a Client-Server Database
#    Management System", Dissertation for the degree of Doctor of Science
#    in Technology, Helsinki University (2002).
#
#  The original proposal for B-Link trees is due to Lehman and Yao ([LY]):
#
#    "Efficient locking for concurrent operations in B-trees", ACM Transactions
#    Database Systems 6 (1981).
#
#  See the bibliography of [IJ] for numerous additional useful references.

# compile everything
g++ -O3 -o random_keys random_keys.cpp
g++ -DSTANDALONE -O3 -o logger logger.cpp logger_test.cpp
g++ -DSTANDALONE -O3 -o page page.cpp page_test.cpp
g++ -DSTANDALONE -O3 -o latchmgr logger.cpp page.cpp latchmgr.cpp latchmgr_test.cpp
g++ -DSTANDALONE -O3 -o bufmgr logger.cpp bltval.cpp latchmgr.cpp bufmgr.cpp bufmgr_test.cpp
g++ -DSTANDALONE -O3 -o bltree logger.cpp bltval.cpp latchmgr.cpp bufmgr.cpp bltree.cpp bltree_test.cpp -lpthread

# create a file of random keys
./random_keys >keys.txt

# unit test page manager code (only makes sense for an existing index)
#    ./page FNAME PAGE_BIT_SIZE
./page testdb 15

# unit test thread-safe logging
./logger

# unit test latch manager
./latchmgr

# unit test buffer pool manager (only makes sense for an existing index)
#    ./bufmgr FNAME PAGE_BIT_SIZE
./bufmgr testdb 15

# test BLink Tree 
#    ./bltree
#        -f dbname            - the name of the index file(s)
#        -c cmd,cmd,..        - list of: Audit, Write, Delete, Find, Scan, Count, one per thread
#        -k k_1,k_2,..        - matching list of source key files k_i, one per thread
#        -p PageBits          - page size in bits
#        -n PoolSize          - number of buffer pool mmapped page segments
#        -s SegBits           - segment size in pages in bits
#
# (e.g.) 32KB pages, 8192 segments of 32 pages each = 8GB total storage

rm -f testdb
./bltree -f testdb -c Write -k keys.txt -p 15 -n 8192 -s 5
./bltree -f testdb -c Scan,Find,Find -k keys.txt,keys.txt,keys.txt -p 15 -n 8192 -s 5

blink-tree-logic's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.