Embedded Databases - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Embedded Databases

Description:

Local database means app server has to switch back and forth ... BerkeleyDB. Cache::FastMmap. Embedded MySQL * File System. GDBM_File. SQLite ... – PowerPoint PPT presentation

Number of Views:690
Avg rating:3.0/5.0
Slides: 12
Provided by: buffa3
Category:

less

Transcript and Presenter's Notes

Title: Embedded Databases


1
Embedded Databases
  • Ben Bixby - Seevast.com, Inc.

2
Embedded Databases -Intro
  • What is an embedded database?
  • Runs in the same process
  • How do they work?
  • Usually can talk binary format directly
  • What are the advantages?
  • Speed
  • No longer have to communicate with external
    process (IPC/Network)
  • Context switching
  • Local database means app server has to switch
    back and forth
  • Can move load from central RDBMs to frontend app
    servers

3
Embedded Databases -Intro
  • What are the disadvantages
  • Concurrency
  • There are consequences of running an in-process
    DB in multiple processes
  • Synchronization
  • Need a mechanism to synchronize processes when
    data changes
  • RDBMs have this built in
  • Locking
  • Locking in high performance apps not an option

4
Embedded Databases -Intro
  • Why/When would you want to use one
  • If your application has/needs a database server
    running locally
  • Many reads, few writes
  • Zero writes if possible

5
Embedded Databases -Avaliable
  • Some available embedded databases
  • BerkeleyDB
  • CacheFastMmap
  • Embedded MySQL
  • File System
  • GDBM_File
  • SQLite

6
Embedded Databases -Using
  • Using embedded databases
  • Code should be abstract
  • Might want to swap database type
  • Some are better than others for certain purposes
  • Some considerations
  • Performance
  • Correctness
  • Concurrency

7
Embedded Databases - Abstract
  • Abstract embedded database code
  • Data Access Layer (DAL)
  • Essentially a tied hash interface
  • As long as it has these basic functions
  • Init
  • Get
  • Set
  • List
  • Remove
  • Truncate

8
Embedded Databases Correct
  • Correctness
  • Does the database do what you need how you need
  • Does it have the features you need
  • LRU
  • SQL
  • Synchronization
  • Automatic resizing
  • Corruption recovery
  • Does it work as expected

9
Embedded Databases - Concur.
  • Concurrency
  • Special considerations for a multi-process
    environment
  • Readers
  • Writers
  • Locking
  • Synchronization

10
Embedded Databases - Perf.
  • Performance comparison
  • Is it fast enough for your application
  • Benchmarking

11
Embedded Databases -Concl.
  • Conclusion
  • Get requirements straight
  • Reduce pain
  • Some additional info
  • MJD - "Lightweight Database Techniques" -
    http//perlmonks.org/?node_id629253
  • Michael Owens - "Programming with SQLite" -
    http//conferences.oreillynet.com/cs/os2007/view/e
    _sess/12585
  • Rob Mueller - "Comparison of Different Perl
    Caching Modules" - http//cpan.robm.fastmail.fm/ca
    che_perf.html
  • Thank you
Write a Comment
User Comments (0)
About PowerShow.com