README

Due to the use of JSFiddle.net this presentation requires Internet connection.

Samples assume that RavenDB (Build 531) is accessible via http://localhost:8080 and is configured as follows:

<appSettings>
  <add key="Raven/AnonymousAccess" value="All"/>
  <add key="Raven/AccessControlAllowOrigin" value="*"/>
</appSettings>
        

Introduction to
RavenDB

Sergey Shishkin
shishkin.org
@sshishkin

Facts

Document store

Written in C#

Open Source*

Dual License: AGPL + Commercial

You can use Raven for free, if your project is Open Source. If you want to use Raven to build commercial software, you must buy a commercial license.

API

HTTP, JSON

.NET Client, LINQ

HTTP

JSONP, CORS

ETag

PUT Document

GET Document

Query multiple IDs

Indicies

Static: Map + Reduce

{
  Map:'from doc in docs
       where doc.ObjectType==\"User\"
       select new { doc.HomeState, doc.Name }'
}

Dynamic: /indexes/Temp/UsersByName

Indexed with Lucene.NET

Queries

/indexes/usersByHomeState?query=HomeState:Maryland&sort=Name

Lucene syntax

Live Projections

Map + Reduce + TransformResults

Map =
  users => from user in users
           select new {user.AliasId};

TransformResults =
  (database, users) =>
    from user in users
    let alias= database.Load(user.AliasId)
    select new {Name = user.Name, Alias = alias.Name};

Triggers

PUT, DELETE, Read, Index update

Used e.g. by Authorization and Spatial-Indexing

Bundles

Drop-in plugins

Written in .NET

Authentication, Authorization, Cascade delete, Expiration, Quotas, Replication, Versioning

Write your own!

Transactions

HTTP Header

Raven-Transaction: GUID, Timeout

Client API supports System.Transactions

Batching

Replication

Discussion