• Save
Raven db byexample
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Raven db byexample

on

  • 2,393 views

This is my presentation from NDC 2011 on Raven DB by example

This is my presentation from NDC 2011 on Raven DB by example

Statistics

Views

Total Views
2,393
Views on SlideShare
2,249
Embed Views
144

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 144

http://www.knowyourstack.com 144

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Raven db byexample Presentation Transcript

  • 1. Raven DB by Example
  • 2.
  • 3.
  • 4. SELECT DISTINCT ...
    LEFT JOIN ...
    LEFT JOIN ...
    LEFT JOIN ...
    WHERE ...
    AND…
    OR…
  • 5. What’s in this talk?
    WorkingsofRaven DB
    WorkingwithRaven DB
    Someexamples
  • 6. Whythis talk?
    Documentdatabases is not onlyabout web scalability.
  • 7. Whoam I?
    Emil Cardell
    Web developer
    Valtech Sweden
    @emilcardell
    www.unwillingcoder.com
  • 8. Howdoes it work?
  • 9. Howdoes it work?
  • 10. Howdoes it work?
    Value
  • 11. Howdoes it work?
    Metadata
    Content
  • 12. Howdoes it work?
    Metadata
    Content
    Blobstorage
  • 13. Whatdoesthis gives us?
    Fast reads
    Fast writes
    Full consistency
  • 14. Whataboutqueries?
  • 15. Whataboutqueries?
    Document store
  • 16. Whataboutqueries?
    Lucene Index
    Document store
  • 17. Whataboutqueries?
    Lucene Index
    Document store
    Background workers
  • 18. Whataboutqueries?
    Lucene Index
    Document store
    Background workers
  • 19. Whataboutqueries?
    Lucene Index
    Document store
    Background workers
  • 20. Whataboutqueries?
    Lucene Index
    Document store
    Background workers
  • 21. Whatdoesthis gives us?
    Fast queries
    Full free text search
    Eventualconsistency
  • 22. How do youworkwith it?
    HTTP/REST
    JSON
    Lucene Queries
    Linq
  • 23. Whatsuniqe?
    Dynamicqueries
    Transactions (DTC)
    Batching
    Live projections
  • 24. How do youmodel?
  • 25. The opposite!
    No referentialintegritry
    Denomalize
    Duplicate
    Isolate by change
  • 26. Show me the code!
    Event publishing
  • 27. Content Management
    public interfaceIContent
    {
    stringId { get; set; }
    stringParentId { get; set; }
    string[] AncestorsId { get; set; }
    stringSlug { get; set; }
    stringUrl { get; set; }
    }
  • 28. Content Management
    varstore = newDocumentStore
    {
    Url= "http://localhost:8080",
    Conventions =
    {
    FindTypeTagName =type=> typeof(IContent).IsAssignableFrom(type) ?typeof(IContent).Name : null
    }
    };
  • 29. Content Management
    public classHierarchyTrigger: AbstractPutTrigger
    {
    public overrideVetoResultAllowPut(...)
    {
    //Check for hierachical loops
    }
    public overridevoidOnPut(...)
    {
    //Calculateancestors
    //Calculateurl
    }
    }
  • 30. Content Management
    varresults=documentSession.Query<IContent>()
    .Where(x =>x.Ancestors.Any(pageid=>
    pageid== ”pages/myUniqeId"));
  • 31. If I wantcomments?
    varcontent= Session.Load<IContent>(_pageId);
    varcomments = Session.Load<PostComments>(_pageId);
    varcomment= newComment
    {
    Id = Guid.NewGuid(),
    Author= _commentInput.Name,
    //...
    };
    content.CommentsCount++;
    comments.Comments.Add(comment);
  • 32. Document databases is not only about web scalability.
  • 33. Emil Cardell
    emil.cardell@valtech.se
    @emilcardell
    RavenDB:
    www.ravendb.net
    Images:
    Photo © 2011 Britta Heise