Intro to RavenDB - Sql Saturday Porto 2014

29
Intro to RavenDB

description

Code for session up at https://github.com/brunomlopes/ravendb-sql-saturday-porto-2014 RavenDb is a .NET document database with an HTTP REST API, Lucene based indexes, ACID read/writes and BASE queries that's been picking up steam in the .NET space. In this session we'll see the very basics of using RavenDB from a web application, including reads, writes and simple queries. We'll see how RavenDB uses LINQ and Lucene to create indexes similar to materialized views to provide fast query-time responses, and what are the main differences in modeling data and entities from the perspective of a developer used to relational databases.

Transcript of Intro to RavenDB - Sql Saturday Porto 2014

Page 1: Intro to RavenDB - Sql Saturday Porto  2014

Intro to RavenDB

Page 2: Intro to RavenDB - Sql Saturday Porto  2014

Say Thank you to Volunteers:

They spend their FREE time to give you this

event.

Because they are crazy.

Because they want YOU

to learn from the BEST IN THE WORLD.

If you see a guy with “STAFF” on their back –

buy them a beer/wine, they deserve it.

Page 3: Intro to RavenDB - Sql Saturday Porto  2014

Ivan Daniel Campos:

Page 4: Intro to RavenDB - Sql Saturday Porto  2014

Rui Barreira:

Page 5: Intro to RavenDB - Sql Saturday Porto  2014

Paulo Matos:

Page 6: Intro to RavenDB - Sql Saturday Porto  2014

Pedro Simões:

Page 7: Intro to RavenDB - Sql Saturday Porto  2014

André Batista:

Page 8: Intro to RavenDB - Sql Saturday Porto  2014

3 Sponsor Sessions at 15:05

Don’t miss them, they might be getting

distributing some awesome prizes!

Rumos

BI4ALL

Devscope

Page 9: Intro to RavenDB - Sql Saturday Porto  2014

Our Main Sponsors:

Page 10: Intro to RavenDB - Sql Saturday Porto  2014

Bruno Lopes

Developer/Co-Founder at

Speaker/Co-Organizer at NetPonto

Fan of C#, Python, RavenDB, SQL Server, couch db, postgresql, javascript (kind off...)

@brunomlopes

Page 11: Intro to RavenDB - Sql Saturday Porto  2014

BECAUSE THE WORLD IS NOT

JUST RELATIONAL

Intro to RavenDB

Page 12: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

Page 13: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

SQL

Page 14: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

SQL

Active

Directory

Page 15: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

Object-Relational Impedance Mismatch

Page 16: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

New solutions for storing data

Key value stores Redis

Riak

Document Databases RavenDB

CouchDB

Azure DocumentDB

Graph databases Neo4j

(...)

Page 17: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

“(…) we are gearing up for a shift to polyglot

persistence - where any decent sized

enterprise will have a variety of different data

storage technologies for different kinds of data.”- Martin Fowler, http://martinfowler.com/bliki/PolyglotPersistence.html, 2011

Page 18: Intro to RavenDB - Sql Saturday Porto  2014

Why am I talking about this?

Caches

Ephemeral Data

Complex Domain Objects

Transactional Data

Analytics

Relational Data

Page 19: Intro to RavenDB - Sql Saturday Porto  2014

RAVENDB

Page 20: Intro to RavenDB - Sql Saturday Porto  2014

What is RavenDB

.Net Document Database

Transactional

Safe by default

Support for sharding, replication, multi

tenancy

Page 21: Intro to RavenDB - Sql Saturday Porto  2014

Main components

C# client

HTTP interface

Two stores

Documents

Indexes

Page 22: Intro to RavenDB - Sql Saturday Porto  2014

Documents, Indexes

Load and store JSON objects

Transactional

Keyed by string

Page 23: Intro to RavenDB - Sql Saturday Porto  2014

Documents, Indexes

Defined by LINQ expressions

Index is a map/reduce process

Eventually consistent

Queries can return stale data

Based on Lucene

Solid foundation

Get full text search for “free”

Page 24: Intro to RavenDB - Sql Saturday Porto  2014

Demos

Server, management UI

Load/store

Queries

SQL Replication

(hopefully we’ll get to this)

WARNING Pre-release version of RavenDB 3 Management UI still has some quirks

Page 25: Intro to RavenDB - Sql Saturday Porto  2014

VISUAL STUDIO TIME

Events, Sessions, Speakers

Page 26: Intro to RavenDB - Sql Saturday Porto  2014

from person in audience

from question in person.questions

select question

Page 27: Intro to RavenDB - Sql Saturday Porto  2014

References

Main site

http://ravendb.net

Ayende’s blog

http://ayende.com/blog/tags/raven

Google group

https://groups.google.com/d/forum/ravendb

Page 28: Intro to RavenDB - Sql Saturday Porto  2014

Thank you sponsors and volunteers!

Page 29: Intro to RavenDB - Sql Saturday Porto  2014

Thank you audience!