Top Banner
RAVENDB 4.0 Oren Eini [email protected]
35

RavenDB 4.0

Feb 19, 2017

Download

Technology

Oren Eini
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RavenDB 4.0

RAVENDB 4.0Oren [email protected]

Page 2: RavenDB 4.0

WORK SCHEDULE

Timeline

2012 2013 2014 2015 2016 2017

2.5 Beta 2.5 Release 2.5 Maintenance 2.5 End of life

3.0 Beta 3.0 Release 3.0 Maintenance 3.0 End of life

3.5 Beta 3.5 Release 3.5 Maintenance

4.0 Beta 4.0 Release

Page 3: RavenDB 4.0
Page 4: RavenDB 4.0

RAVENDB IS…• Design / Development started in 2008• In production since 2010

Page 5: RavenDB 4.0

LET’S DO SOMETHING ABOUT IT

Page 6: RavenDB 4.0

CORE DESIGN GUIDELINES• Complexity is not maintainable• We control the stack

• Top to bottom• At least an order of magnitude

better performance• Where does this hurt?

• Stop doing that

Page 7: RavenDB 4.0

GOODBYE ESENT• We run into multiple crashing bugs in Esent

• Some can be worked around• Some cannot

• Doesn’t run on Linux• Force a high degree of separation from storage

Page 8: RavenDB 4.0

VORON• We can freely modify• Runs on Windows & Linux

• Optimized storage for our needs

• Memory mapped files• Remember this

Page 9: RavenDB 4.0
Page 10: RavenDB 4.0

THE BLITTABLE FORMAT• Random access• Use unmanaged memory

• Pointer arithmetic access

• No parsing• Once loaded, zero cost to use

Page 11: RavenDB 4.0

BIGGEST CHANGE BY FAR• Blittable + Voron = Different ball game

• Prefetching• Index batches• Caching• Parsing• Managed allocations

• The great simplification

Page 12: RavenDB 4.0

INDEXING• No need to batch indexes together• Indexes can now run independently of one another• Indexes can be given different priorities

• Indexing code is about an order of magnitude simpler

Page 13: RavenDB 4.0

ON DISK STORAGEEach collection is separated, and they are all connected

Users/1• Etag: 2

Users/2• Etag: 4

Companies/1• Etag: 1

Companies/2• Etag: 3

24

13 1

234

Page 14: RavenDB 4.0

INDEXING• Each index can cover just the documents in the collections it index• Changes to one collection won’t make other indexes stale

Page 15: RavenDB 4.0

INDEXES• Lucene is the only game in town

• Corax can’t compare• Lucene isn’t reliable• Voron is reliable

Page 16: RavenDB 4.0

BETTING ON CORECLR• Port RavenDB to CoreCLR• Don’t just copy the code

• Adjust based on new design

• Make it work• Make it work right

• Make it work fast

Page 17: RavenDB 4.0
Page 18: RavenDB 4.0

AUTO INDEXES• In CoreCLR RC1 – no support for

dynamic loading of assemblies• Means, no indexing• 4.0 has auto indexes

• More efficient (no linq)

• Users• Name• Email (Analyzed)

Page 19: RavenDB 4.0

STATIC INDEXES• POC on CoreCLR RC2 works• TBD

Page 20: RavenDB 4.0

IN THE MEANWHILE…

Page 21: RavenDB 4.0

MAP/REDUCE

Theory Practice

Page 22: RavenDB 4.0

MAP/REDUCE

Page 23: RavenDB 4.0

LOAD DOCUMENT

Page 24: RavenDB 4.0

WEB SOCKETS• We have bidirectional connections

• Let’s use that

• Previously, manage multiple unidirectional connections, or multiple requests

Page 25: RavenDB 4.0

AUTHENTICATION• API keys• Single web socket request

• Deferred / external• Windows auth• Certificates

Page 26: RavenDB 4.0

BULK INSERT

• Blittable data directly from client• No parsing costs server side

• Lazy transaction• ACID at the end

Page 27: RavenDB 4.0

REPLICATION• Persistent web socket connections

• Rely on TCP state• Aware of liveliness• Per peer

• Large cluster handling

Page 28: RavenDB 4.0

CHANGE VECTOR• Gossip between servers• Conflict detection

Page 29: RavenDB 4.0

MORE SERVER RESPONSIBILITIES• Server side:

• Wait for non stale results• Write assurances

Page 30: RavenDB 4.0

PERFORMANCE

Page 31: RavenDB 4.0

TRIE BASED ROUTING

Page 32: RavenDB 4.0

THE COST OF BLITTABLE

Page 33: RavenDB 4.0

WHAT’S LEFT?• LOTS• Client• Bundles• Studio

• Performance• Performance• Performance

• Stability• Performance

Page 34: RavenDB 4.0

SCHEDULE• Dec 2016 – Public Preview• Mar 2017 – Beta• May 2017 – Release Candidate• July 2017 – RTM

Page 35: RavenDB 4.0

QUESTIONS?