Your SlideShare is downloading. ×
0
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Raven db byexample
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Raven db byexample

2,262

Published on

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

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,262
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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

×