CouchDB Talk JChris NYC

Post on 11-May-2015

2,895 views 0 download

Tags:

transcript

Hello

• Chris Anderson <jchris@apache.org>

• Blog: http://jchris.mfdz.com

• Founder, Grabb.it (web analytics for music)

• Ruby on Rails veteran

• CouchDB committer

And You?

• Used CouchDB (for fun)

• Evaluating or using it (for a project)

• Interested in contributing?

• Just here for the pizza?

History

• Damien Katz <http://damienkatz.net/>

• Worked on Lotus Notes & MySQL

• Started in 2005: C++ and XML, on Windows

• 2006: Moved to Erlang, JSON, and POSIX

• 0.7.0 first release of today’s CouchDB

• Version 1.0 Planned for the end of 2008

Why CouchDB?

• Common use cases no longer fit RDBMS

• Native to web applications

• Peer-based replication for freedom

• Takes today’s scalability lessons to heart

This Talk

• How is CouchDB different (from RDBMS)?

• Example HTML/Javascript application

• Quick tour of the internals

How Is CouchDB Different?RESTful HTTP

Schemaless JSON Documents

Map/Reduce Views

Incremental Replication

How Is CouchDB Different?RESTful HTTP

Schemaless JSON Documents

Map/Reduce Views

Incremental Replication

Binary Protocol

Typed Columns & Primary Keys

Ad-hoc Queries

Replication Logs

(from SQL RDBMS)

RESTful HTTP

Built for the web

Javascript Test Suite

Standard HTTP Clients, Proxies, Load Balancers & Caches

RESTful HTTP

Built for the web

Javascript Test Suite

Standard HTTP Clients, Proxies, Load Balancers & Caches

Enterprisey

Battle Hardened

Protocol Specific Tools

Schemaless JSON Documents

Flat Namespace

Arbitrary JSON Structures

Identified By URIs

Optimistic Locking (ACID/MVCC)

Schemaless JSON Documents

Flat Namespace

Arbitrary JSON Structures

Identified By URIs

Optimistic Locking (ACID/MVCC)

Tables

Typed Columns and Key Constraints

Primary Keys

Row or Column Level Locking

Map/Reduce Views

Functional Javascript

Incremental Updates

Predefined

High-Performance Reads

Map/Reduce Views

Functional Javascript

Incremental Updates

Predefined

High-Performance Reads

SQL Statements

Independent

Ad-hoc and Complex

Indexes Computed on Writes

Incremental Replication

User Triggered

Offline Clients

Resilient & Restartable

HTTP

Incremental Replication

User Triggered

Offline Clients

Resilient & Restartable

HTTP

Continuous

Master/Slave

Critical Path

Log Based

CouchDB

HTML / Javascript

_design Documents

p2p Replication

A new way to write web applications.

Live Code!http://169.254.251.59:5984/_utils/

CouchDB Internals• couch_httpd.erl

• Request Dispatch

• Create Database

• Get Document

• Other Modules

Request Dispatch

Create Database

Get Document

Other Modules• couch_btree.erl

• The heart of the storage module (stores Erlang terms sorted by key using user specified sort funtions)

• couch_db_updater.erl

• Translates document requests into Btree actions.

• couch_query_servers.erl

• Communicates with the external (Javascript etc) view servers.

Join Us

• #couchdb on irc.freenode.net

• http://couchdb.org

• mailing lists

• links to wiki and subversion checkout

Thank You!

Any Questions?