Más contenido relacionado


Einführung in RavenDB

  1. Introducing RavenDB Agile Persistence in .Net
  2. About Johnny Graber •Software Engineer - Swiss Medical Association •Twitter: @j_graber •E-Mail: •Blog: Examples at
  3. Today’s Main Topics •NoSQL •RavenDB •Agile Persistence
  4. Demo RavenDB .Net Client How simple is it to access RavenDB?
  5. NoSQL?
  6. No SQL
  7. Not only SQL
  8. Polyglot Persistence
  9. Relational Databases aren’t Obsolete
  10. Great for •Optimized Writes •Minimal Storage Footprint •Flexible Querying
  11. But •Mostly Reads in Our Applications •Storage Costs (Almost) Nothing •Hard to Scale
  12. NoSQL Provides Solutions
  13. Main Types of NoSQL •Key / Value Store •Graph Database •Column Database •Document Store
  14. RavenDB •2nd Generation Document Database •Built on .Net •Schema Free
  15. Some RavenDB Features •Safe by Default •Supports Transactions (ACID) •Best Practices Built in
  16. A Document in RavenDB •Self-Contained •Independent •Redundant Data (History)
  17. A Document in RavenDB
  18. Running RavenDB •Standalone Server •Part of Your Web-Application •Embedded Mode
  19. Installing RavenDB
  20. RavenDB Studio •Look Into the Database •Generate Sample Data •Administration Tools
  21. Demo RavenDB Studio How does the administration interface works?
  22. Connect to RavenDB •.Net Client Install-Package RavenDB.Client •HTTP API
  23. Demo HTTP API Can you use RavenDB without .Net?
  24. Querying RavenDB var books = from books in session.Query<Book>() where books.Title.StartsWith("Raven") select books; var book = session.Load<Book>("books/1");
  25. Indexes in RavenDB •All Queries Need an Index •Static or Dynamic •Created in Background (Stale Index)
  26. Challenges for Index Creation •Schema Free Data •Fixed Structure to Find Data •Closing the Gap with Map/Reduce
  27. Map/Reduce This is probably the most common error that people make with any sort of data access technology. "Just give me the whole thing, I'll make sense of it on the client side." In the RDBMS world, this would be expressed as "SELECT * FROM Orders". The problem with such queries is they can potentially… Map Reduce
  28. Demo Index Creation How hard can it be?
  29. Licencing RavenDB •AGPL for Open Source Projects •Commercial Licence: 399$/Year/Instance •RavenHQ: Starting at 10$/Month
  30. Agile Persistence
  31. Development Today •Agile Approach •Embrace Change •Fail Fast
  32. Except in the Persistence Layer •First Time Right •Hard to Change •Don’t Touch
  33. “When the Database must be correct the first time, every part of the application must be known at the beginning”
  34. “Persistence should be an application detail”
  35. Domain-Driven Design •Aggregates •Bounded Context •Entity or Value Object
  36. Benefits of Following DDD Principles •History of Documents •Complete Change Tracking •Optimised Data Access
  37. Command Query Responsibility Segregation (CQRS) •Commands Modify State •Queries Answer Questions •Keep Them Apart
  38. CQRS for Fast Applications
  39. CQRS and RavenDB •HTTP API (REST ) •When Unauthenticated Only Allow Read •Done
  40. TDD and RavenDB •Don’t Abstract an Abstraction Layer! •Use In-Memory Mode •It’s Fast Enough
  41. Changing Documents •Easily Done •Know the Impacts •Worst Case: Full DB Update
  42. Demo Schema Change How can you change your schema?
  43. Use RavenDB •Hacking •Pet Projects •Prototypes
  44. Try This at Home NOT in Production!
  45. What’s Missing •Authorisation & Authentication •Bulk Inserts •Paging •Sharding
  46. More on RavenDB • • •
  47. More on Polyglot Persistence •Martin Fowler: •Jimmy Bogard: Real World Polyglot Persistence
  48. Questions?
  49. Thank You!

Hinweis der Redaktion

  1. Nächste Woche an der SoftShake in Genf, 300 Besucher, Hat noch Tickets Testen der Folien und Beispiele, Feedback sehr willkommen!
  2. RavenDB ist ein tolles Produkt. Ohne Wissen über die Problemfelder die zur Entstehung führten kann man nur schwer die Vorteile erkennen. Da ich keine Lizenzen verkaufe möchte ich im 3. Teil vor allem über die dadurch gewonnenen Möglichkeiten sprechen.
  3. Da jeder immer nur von einfach spricht schauen wir einmal an wie einfach es wirklich ist
  4. Heute Benutzt: Amazon (Relational Produktekatalog, GraphDB für Empfehlungen, usw). Ihr selber: Caching, Sessions, Cookies,
  5. Get Resource/Id (Created in .Net) Put Resource/Id + JSON Show in RavenDB Studio
  6. Create AllProducts Index Destination Query in HTTP Query in .Net
  7. .Net Class Add Field Add Code to Set Field Add New, Update Old DNUG: Speichern ohne Authoren zu speichern, einmal mit, einmal als Wrapper (Ids übernehmen!)