SlideShare une entreprise Scribd logo
1  sur  29
REBOOTING DESIGN
Oren Eini
oren@ravendb.net
JOEL SPOLSKY
“…the single worst strategic
mistake that any software
company can make: They decided
to rewrite the code from scratch.”
RAVENDB 1.0
• Design & Development started around 2009
• First production deployment – 2010
• Esent for storage
• Lucene for indexing
• MVC .NET architecture
• Focused on time to market
RAVENDB 2.0
• Released 2013
• Silverlight UI
• New storage engine for testing
only - Munin
• Lots of tiny feature, no
architectural changes
• Focus on features
• Perf
RAVENDB 3.0
• Released 2014
• HTML5 Studio
• Introduced own storage engine for
production use – Voron
• Re-architect to work on OWIN
• I/O prefetching
• Own thread pool
• Focus on distributed work
• Perf
JAN 2015
• Two sprints dedicated to performance tuning
• Get a profiler, whole team effort
• Started to pay attention to assembly output
• Major performance gains
SUPPORT
• We are a database…
• Complex deployments
• Harsh environment
• 24/7
• High availability
• Lots of data, lots of requests
• High sensitivity to hiccups
Q3 2015 – WHAT CAN WE DO?
• Backward compatibility
• Deployed to (literally in the literal
sense) millions of nodes world wide at
various customer sites
• Existing technical debt
• Can’t run on Linux
• Running on tech stack that is not fully
owned by us
• Existing complexity
REWRITE!
(& BACKWARD COMPACT!)
September 2015
X 10
Perf
Simpler
to support
Cross
Platform
EXPECTED OUTCOME?
EFFECT?
• We have a decade+ of knowing how our software is used
• Hindsight
• Where does it hurts?
• UX study
• Deep dive with customers
• Going over support incident reports
ARCHITECTURAL DECISIONS
• Multiple OS
• OWN the stack
• Build for performance
• Build of operations
• Support as a key consideration
• Key scenarios impact whole system
design
WE ARE A JSON DOCUMENT DB…
• JSON Parsing • Parsing means:
• Text parsing
• Allocating managed memory
• Reading data from disk
GOING ALL THE WAY DOWN…
• JSON documents are stored using
blittable format.
• No parsing / manipulation required to
process
• .NET representation:
• byte* ptr, int len
• Storage engine: Voron
• Zero copy
• Memory mapped
• Can search a give value and give result:
• byte* ptr, int len
CONCEPTUALLY
RESULT?
• Zero copy throughout the process
• No parsing costs
• Therefor, reduced CPU
• Therefor, no need to cache in memory
• Therefor, reduced managed memory
• Memory mapped
• Therefor, OS already keep in memory
• Avoid duplicate data caching
• Reduce memory consumption
• Lean on OS for eviction
MEMORY MANAGEMENT
• Need to own that, important for perf!
• Reduce managed allocations
• Use unmanaged memory and take
advantage of internal knowledge
• Simple solutions can work well, in well
defined context
• Arena Allocator
• Context
DESIGN FOR THE DEBUGGER
• Support burden optimization
• Single threaded execution for long running tasks
• Named threads
• Build data structure for analysis in dumps
• Singular architecture focus
REPORTING PROBLEMS
• Constant monitoring
• Act or alert accordingly
REMOVING PROBLEMS
• Some things are known to be issues.
• Eliminate completely if possible.
• Authentication sample:
• Windows Authentication
• Who’s the admin?
• X509 Client Certificates
• openssl s_client -connect
• Fallacies of distributed computing
WHY NOT REWRITE IT IN RUST?
• Rust
• Go
• C++
• C
• Erlang
• Elixir
• Big bet on .NET Core
• Team familiar with .NET
• Even with added complications of
design, tooling and language support
are very good
• Cross platform now .
• Core values aligned with CoreCLR in
terms of perf / support.
On the table…
HOW WE ACTUALLY DID IT?
Indexes
Queries
Indexing
Query Optimizer
Storage
Cluster
•Replication
•ETL
Documents
•Operations
•Load
Client API
C#
•Go
Java
•Ruby
Python
•Go
PARALLEL VERSION DEVELOPMENT
• 3.5 released while working on 4.0
• Identify bottlenecks in the design
• As infrastructure completes, parallelize
• Slowly transition team members to the new release
• Prioritizing demo-abiblity of the system
• 30% of the team dedicated to the UI
WHERE ARE WE NOW?
• Initially budgeted for 1 year
development
• Team size: 25
• Started Sep 2015
• OMG, we have so many features!
• Mid 2016 changed schedule to June
2017
• Released 3.5 while working on 4.0
• Ramp up time internally
• Supporting older versions
simultaneously
• Actual release – Feb 2018
• Some features cut
• Actual completion of all planned
features
• Aug 2018 – (3 years!)
• With a lot extras, of course
IMPACT ON SUPPORT?
• Support call time reduced
• Typical 3.x tier 2 support call:
1 week
• Typical 4.x tier 2 support call:
2 hours
PERFORMANCE
• 100,000+ writes / second
• 1,000,000 reads / second
• < 1,000$ machine
• On the wild
• X 20
• X 52
PLATFORMS
• Windows
• Linux
• Arm (Raspberry PI)
• Mac OS X
• Production deployed to ARM in
industrial settings
END RESULT?
• However:
• 14 months overdue
• Deadline extended twice
• Much larger in scope than expected
• Even when took this to account
• Features in 3.0 are only in the 4.1
release, expected next month
• 20 months over expected time
• Mostly minor, though
• Full support by whole team and
company essential
QUESTIONS?

Contenu connexe

Tendances

DoxLon | Life with kube, containers and microservices
DoxLon | Life with kube, containers and microservicesDoxLon | Life with kube, containers and microservices
DoxLon | Life with kube, containers and microservicesRichard Marshall
 
Five Years of EC2 Distilled
Five Years of EC2 DistilledFive Years of EC2 Distilled
Five Years of EC2 DistilledGrig Gheorghiu
 
The Wix Microservice Stack
The Wix Microservice StackThe Wix Microservice Stack
The Wix Microservice StackTomer Gabel
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReadersRakuten Group, Inc.
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraJon Haddad
 
Diagnosing Problems in Production: Cassandra Summit 2014
Diagnosing Problems in Production: Cassandra Summit 2014Diagnosing Problems in Production: Cassandra Summit 2014
Diagnosing Problems in Production: Cassandra Summit 2014Jon Haddad
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015Ricard Clau
 
AWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsAWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsMongoDB
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Bert Jan Schrijver
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlassian
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2DataStax Academy
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandraJon Haddad
 
Cassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoCassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoJon Haddad
 
SVC / Storwize: cost effective storage planning (BVQ use case)
SVC / Storwize: cost effective storage planning (BVQ use case)SVC / Storwize: cost effective storage planning (BVQ use case)
SVC / Storwize: cost effective storage planning (BVQ use case)Michael Pirker
 

Tendances (20)

DoxLon | Life with kube, containers and microservices
DoxLon | Life with kube, containers and microservicesDoxLon | Life with kube, containers and microservices
DoxLon | Life with kube, containers and microservices
 
Five Years of EC2 Distilled
Five Years of EC2 DistilledFive Years of EC2 Distilled
Five Years of EC2 Distilled
 
The Wix Microservice Stack
The Wix Microservice StackThe Wix Microservice Stack
The Wix Microservice Stack
 
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
[Rakuten TechConf2014] [C-2] Big Data for eBooks and eReaders
 
Heroku
HerokuHeroku
Heroku
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - Cassandra
 
Scaling tappsi
Scaling tappsiScaling tappsi
Scaling tappsi
 
Diagnosing Problems in Production: Cassandra Summit 2014
Diagnosing Problems in Production: Cassandra Summit 2014Diagnosing Problems in Production: Cassandra Summit 2014
Diagnosing Problems in Production: Cassandra Summit 2014
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
 
Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015Modern software architectures - PHP UK Conference 2015
Modern software architectures - PHP UK Conference 2015
 
AWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and ResultsAWS to Bare Metal: Motivation, Pitfalls, and Results
AWS to Bare Metal: Motivation, Pitfalls, and Results
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Network with node
Network with nodeNetwork with node
Network with node
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
 
Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandra
 
Cassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day TorontoCassandra Core Concepts - Cassandra Day Toronto
Cassandra Core Concepts - Cassandra Day Toronto
 
SVC / Storwize: cost effective storage planning (BVQ use case)
SVC / Storwize: cost effective storage planning (BVQ use case)SVC / Storwize: cost effective storage planning (BVQ use case)
SVC / Storwize: cost effective storage planning (BVQ use case)
 

Similaire à Rebooting design in RavenDB

Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFxThomas Daly
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016Giuseppe Marchi
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentBill Ayers
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Librarypaidi_ed
 
Entity Framework 7: What's New?
Entity Framework 7: What's New?Entity Framework 7: What's New?
Entity Framework 7: What's New?Ricardo Peres
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 
KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under ControlKYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under ControlCoimbra JUG
 
Alfresco 5.0 Technology Review
Alfresco 5.0 Technology ReviewAlfresco 5.0 Technology Review
Alfresco 5.0 Technology ReviewZia Consulting
 
2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar seriesOpen Mainframe Project
 
.NET per la Data Science e oltre
.NET per la Data Science e oltre.NET per la Data Science e oltre
.NET per la Data Science e oltreMarco Parenzan
 
Intro to SharePoint 2010 development for .NET developers
Intro to SharePoint 2010 development for .NET developersIntro to SharePoint 2010 development for .NET developers
Intro to SharePoint 2010 development for .NET developersJohn Ferringer
 
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...DevConFu
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDB
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOLradiocats
 
Are you ready for Exchange 2016
Are you ready for Exchange 2016Are you ready for Exchange 2016
Are you ready for Exchange 2016ENow Software
 

Similaire à Rebooting design in RavenDB (20)

Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Movingto moodle2 v1 1
Movingto moodle2 v1 1Movingto moodle2 v1 1
Movingto moodle2 v1 1
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint Development
 
AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Library
 
Entity Framework 7: What's New?
Entity Framework 7: What's New?Entity Framework 7: What's New?
Entity Framework 7: What's New?
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under ControlKYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
 
Alfresco 5.0 Technology Review
Alfresco 5.0 Technology ReviewAlfresco 5.0 Technology Review
Alfresco 5.0 Technology Review
 
Stackato
StackatoStackato
Stackato
 
2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series2020 oct zowe quarterly webinar series
2020 oct zowe quarterly webinar series
 
.NET per la Data Science e oltre
.NET per la Data Science e oltre.NET per la Data Science e oltre
.NET per la Data Science e oltre
 
Intro to SharePoint 2010 development for .NET developers
Intro to SharePoint 2010 development for .NET developersIntro to SharePoint 2010 development for .NET developers
Intro to SharePoint 2010 development for .NET developers
 
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
 
MongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOLMongoDC 2012: "Operationalizing" MongoDB@AOL
MongoDC 2012: "Operationalizing" MongoDB@AOL
 
Operationalizing MongoDB at AOL
Operationalizing MongoDB at AOLOperationalizing MongoDB at AOL
Operationalizing MongoDB at AOL
 
Are you ready for Exchange 2016
Are you ready for Exchange 2016Are you ready for Exchange 2016
Are you ready for Exchange 2016
 

Plus de Oren Eini

Implementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBImplementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBOren Eini
 
Delving into Documents with Data Subscriptions
Delving into Documents with Data SubscriptionsDelving into Documents with Data Subscriptions
Delving into Documents with Data SubscriptionsOren Eini
 
Building Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldBuilding Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldOren Eini
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBOren Eini
 
Lessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDBLessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDBOren Eini
 
RavenDB for modern web apps
RavenDB for modern web appsRavenDB for modern web apps
RavenDB for modern web appsOren Eini
 

Plus de Oren Eini (7)

Implementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDBImplementing CQRS and Event Sourcing with RavenDB
Implementing CQRS and Event Sourcing with RavenDB
 
Delving into Documents with Data Subscriptions
Delving into Documents with Data SubscriptionsDelving into Documents with Data Subscriptions
Delving into Documents with Data Subscriptions
 
Building Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldBuilding Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics world
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
 
Lessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDBLessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDB
 
RavenDB for modern web apps
RavenDB for modern web appsRavenDB for modern web apps
RavenDB for modern web apps
 
RavenDB 3.5
RavenDB 3.5RavenDB 3.5
RavenDB 3.5
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Rebooting design in RavenDB

  • 2. JOEL SPOLSKY “…the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch.”
  • 3. RAVENDB 1.0 • Design & Development started around 2009 • First production deployment – 2010 • Esent for storage • Lucene for indexing • MVC .NET architecture • Focused on time to market
  • 4. RAVENDB 2.0 • Released 2013 • Silverlight UI • New storage engine for testing only - Munin • Lots of tiny feature, no architectural changes • Focus on features • Perf
  • 5. RAVENDB 3.0 • Released 2014 • HTML5 Studio • Introduced own storage engine for production use – Voron • Re-architect to work on OWIN • I/O prefetching • Own thread pool • Focus on distributed work • Perf
  • 6. JAN 2015 • Two sprints dedicated to performance tuning • Get a profiler, whole team effort • Started to pay attention to assembly output • Major performance gains
  • 7. SUPPORT • We are a database… • Complex deployments • Harsh environment • 24/7 • High availability • Lots of data, lots of requests • High sensitivity to hiccups
  • 8. Q3 2015 – WHAT CAN WE DO? • Backward compatibility • Deployed to (literally in the literal sense) millions of nodes world wide at various customer sites • Existing technical debt • Can’t run on Linux • Running on tech stack that is not fully owned by us • Existing complexity
  • 9. REWRITE! (& BACKWARD COMPACT!) September 2015 X 10 Perf Simpler to support Cross Platform
  • 11. EFFECT? • We have a decade+ of knowing how our software is used • Hindsight • Where does it hurts? • UX study • Deep dive with customers • Going over support incident reports
  • 12. ARCHITECTURAL DECISIONS • Multiple OS • OWN the stack • Build for performance • Build of operations • Support as a key consideration • Key scenarios impact whole system design
  • 13. WE ARE A JSON DOCUMENT DB… • JSON Parsing • Parsing means: • Text parsing • Allocating managed memory • Reading data from disk
  • 14. GOING ALL THE WAY DOWN… • JSON documents are stored using blittable format. • No parsing / manipulation required to process • .NET representation: • byte* ptr, int len • Storage engine: Voron • Zero copy • Memory mapped • Can search a give value and give result: • byte* ptr, int len
  • 16. RESULT? • Zero copy throughout the process • No parsing costs • Therefor, reduced CPU • Therefor, no need to cache in memory • Therefor, reduced managed memory • Memory mapped • Therefor, OS already keep in memory • Avoid duplicate data caching • Reduce memory consumption • Lean on OS for eviction
  • 17. MEMORY MANAGEMENT • Need to own that, important for perf! • Reduce managed allocations • Use unmanaged memory and take advantage of internal knowledge • Simple solutions can work well, in well defined context • Arena Allocator • Context
  • 18. DESIGN FOR THE DEBUGGER • Support burden optimization • Single threaded execution for long running tasks • Named threads • Build data structure for analysis in dumps • Singular architecture focus
  • 19. REPORTING PROBLEMS • Constant monitoring • Act or alert accordingly
  • 20. REMOVING PROBLEMS • Some things are known to be issues. • Eliminate completely if possible. • Authentication sample: • Windows Authentication • Who’s the admin? • X509 Client Certificates • openssl s_client -connect • Fallacies of distributed computing
  • 21. WHY NOT REWRITE IT IN RUST? • Rust • Go • C++ • C • Erlang • Elixir • Big bet on .NET Core • Team familiar with .NET • Even with added complications of design, tooling and language support are very good • Cross platform now . • Core values aligned with CoreCLR in terms of perf / support. On the table…
  • 22. HOW WE ACTUALLY DID IT? Indexes Queries Indexing Query Optimizer Storage Cluster •Replication •ETL Documents •Operations •Load Client API C# •Go Java •Ruby Python •Go
  • 23. PARALLEL VERSION DEVELOPMENT • 3.5 released while working on 4.0 • Identify bottlenecks in the design • As infrastructure completes, parallelize • Slowly transition team members to the new release • Prioritizing demo-abiblity of the system • 30% of the team dedicated to the UI
  • 24. WHERE ARE WE NOW? • Initially budgeted for 1 year development • Team size: 25 • Started Sep 2015 • OMG, we have so many features! • Mid 2016 changed schedule to June 2017 • Released 3.5 while working on 4.0 • Ramp up time internally • Supporting older versions simultaneously • Actual release – Feb 2018 • Some features cut • Actual completion of all planned features • Aug 2018 – (3 years!) • With a lot extras, of course
  • 25. IMPACT ON SUPPORT? • Support call time reduced • Typical 3.x tier 2 support call: 1 week • Typical 4.x tier 2 support call: 2 hours
  • 26. PERFORMANCE • 100,000+ writes / second • 1,000,000 reads / second • < 1,000$ machine • On the wild • X 20 • X 52
  • 27. PLATFORMS • Windows • Linux • Arm (Raspberry PI) • Mac OS X • Production deployed to ARM in industrial settings
  • 28. END RESULT? • However: • 14 months overdue • Deadline extended twice • Much larger in scope than expected • Even when took this to account • Features in 3.0 are only in the 4.1 release, expected next month • 20 months over expected time • Mostly minor, though • Full support by whole team and company essential