SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
NoSql NOW! 2013
Delivering big content at NBC News
with RavenDB
A quick tour
•  Schema-less document database with RESTful API.
•  Fully ACID and all writes saved to disk (ESENT).
•  Indexing/queries executed with Lucene.NET.
•  Easily extended with custom logic using “bundles”.
•  Management UI provided in Silverlight.
•  Host as Windows Service, IIS app, or embedded
in your app.
Raven server
•  .NET client provided. Third-party clients exist for
JavaScript, PHP, and Ruby.
•  Wraps HTTP API.
•  Provides client-side caching, change notification, LINQ
querying.
•  Easily extended with many, many hooks into almost all
operations.
Raven client
•  Open source: http://github.com/ravendb/ravendb
•  License is AGPL (free) or commercial (paid).
•  Exception: Your project can use any OSI-approved license
and still use Raven for free.
•  Commercial licenses based on max parallelism and RAM.
•  Windows clustering support and storage compression/
encryption available with Enterprise license only.
Raven licensing
Demo
Why RavenDB?
•  Includes nbcnews.com, today.com and more.
•  1.2 billion pageviews/month.
•  140 million video streams/month.
•  58 million unique users/month.
•  Traffic spikes up to 100x normal when
big news events happen.
NBC News Digital network
•  Very fast page load required
•  “Instant” publish time required
•  6 to 8 code deployments each day
•  High availability: zero* downtime allowed
One of the largest US news sites
High availability
is when the answer to:
“What’s the longest outage
before you wind up
in your boss’s office?”
is < 5 seconds.
Credit: Mitch Canter @studionashvegas http://twitpic.com/z13bw
•  Rolling deployments and rollbacks.
•  Apps and services decoupled physically and temporally.
•  Designed for both auto-failover/recovery and
manual reconfiguration by ops.
•  Seamless scale out by adding instances of any process.
•  And more…
Some prerequisites for HA
•  Data schema can evolve rapidly
•  Apps shouldn’t know where data is
•  Apps should talk to the closest data replica
•  Apps should automatically find a new replica if the closest
becomes unavailable
•  Ops can add/remove replicas quickly and easily, without
affecting any running apps
HA data: a private data cloud
•  Schema-less document database allows rapid change.
•  Fully ACID model fit business needs.
•  Strong replication functionality supported HA needs.
•  Easily customizable on both client and server.
•  Easily deployed and managed.
•  First class .NET client.
Why we chose RavenDB
•  Raven used behind:
•  NBC News and TODAY apps: Windows 8, iOS,
Android, Windows Phone, XBox, Roku.
•  Growing number of sections of nbcnews.com and
today.com.
•  Raven usage stats:
•  ~10 million docs, +1000s of new docs/day.
•  10s of writes/sec.
•  100s of reads/sec (after 3 layers of caching).
Current* state of Raven usage
The details
•  Each doc cached as long as memory available.
•  Requests include If-Modified-Since header.
•  304 Not Modified response saves bandwidth.
•  Aggressive caching avoids the round-trip. Tunable by ops
at runtime (custom).
Client-side caching
•  You define sharding strategy – a method.
•  Raven manages storing each doc to the correct instance
and fanning/merging queries.
•  No auto-rebalancing of shards if you change number of
instances.
Raven sharding
•  All queries are performed against indexes.
•  Indexes can be predefined or auto-created.
•  Indexing/queries are executed in Lucene.NET.
•  Fielded.
•  Full text with built-in or custom analyzers.
•  Geo-spatial.
•  Map-reduce.
•  Result transformers can load other docs.
•  Query with LINQ or Lucene syntax.
•  Indexes may be stale. Can force wait for non-stale results.
(Danger! Primarily for unit tests.)
•  Projections occur on server, reducing data on the wire.
•  Super-cool stuff: eval patching, index scripts.
Raven indexing and querying
•  Need indexes up to date before letting a client talk to a
replica.
•  Indexes are created by the client app:
•  Static: CreateIndexes() at startup scans assemblies
for index classes.
•  Dynamic: when client issues a query.
Indexing catch-22
•  Define new index, with no code using it.
•  Deploy and allow new index to build.
•  Redeploy with code using the new index.
•  Redeploy after deleting old index definition.
•  Delete old index on each replica.
Updating a static index – a pain
•  If you do it by Id, it is consistent (within a single Raven
server)
•  Load()
•  Store()
•  Delete()
•  Queries are only eventually consistent
(“eventually” is measured in milliseconds)
Consistency
•  Eventual consistency – replication is async in background.
•  All replication is one-way and managed by source.
•  Can enable transitive replication – useful for new
instances.
•  Set W value to ensure replication to minimum number of
instances (v2.5). Or timeout.
•  Client will auto-failover to replication destinations,
configurable to reads only or reads and writes.
Raven replication
•  Sequential guids.
•  Unique for every write to a database.
•  Used for caching in client, concurrency control, and
replication.
Etags
Source: What’s the last etag I replicated to you?
Destination: 42
Source: I’m up to 49, so here’s a POST with some docs in it.
Destination: Got ‘em.
Source: What’s the last etag I replicated to you?
Destination: 49
The replication conversation
•  Replication from each instance to all other instances.
•  Any instance could receive writes.
•  Reduce replication conflicts by forcing writes to single
“master”.
•  Handle conflicts in your app or with custom server bundle
– in our case, “last in wins” bundle.
Multi-master replication
•  Null Id and tag can be extracted:
client generates with Hi-Lo
•  Null Id received at server: guid
•  Id ending in / received at server: append auto-increment
integer.
•  Otherwise: use the value in the object.
•  Server prefix protects against edge-case failures.
Id generation
•  Control where reads and writes go. Implemented in a
custom DocumentStore wrapper.
•  Control aggressive caching time.
•  Deploy new instances with replication.
•  Backup – but probably never restore in production.
•  Copy indexes.
•  Monitor with stats endpoints.
Raven operations tasks
•  Modeling/versioning
•  Replication
•  Client failover
•  Consistency
Keep in mind…
•  Concurrency control
•  Indexing and updates
•  Id generation
•  Caching
•  http://ravendb.net
•  GitHub: http://github.com/ravendb
•  Ayende’s blog: http://ayende.com
•  RavenDB Google group
•  @RavenDB on Twitter
•  Me: @jtbennett on Twitter
More info on Raven
Questions?
Many thanks to:
You.
NoSql NOW!
Huge.
Rhinos:
@ayende,@synhershko.
Peacocks:
@benlakey,@johncoder,@pkdotnet,
Colin Hicks,Peter Durham,BryanWheeler.
hugeinc.com
info@hugeinc.com
45 Main St. #220 Brooklyn, NY 11201
+1 718 625 4843

Contenu connexe

Tendances

Building High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in KafkaBuilding High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in Kafkaconfluent
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structuresconfluent
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...Docker, Inc.
 
Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In OperationAndy Gross
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patternsakqaanoraks
 
Real time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseReal time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseWill Gardella
 
Cloudsolutionday 2016: Getting Started with Severless Architecture
Cloudsolutionday 2016: Getting Started with Severless ArchitectureCloudsolutionday 2016: Getting Started with Severless Architecture
Cloudsolutionday 2016: Getting Started with Severless ArchitectureAWS Vietnam Community
 
Making Scala Faster: 3 Expert Tips For Busy Development Teams
Making Scala Faster: 3 Expert Tips For Busy Development TeamsMaking Scala Faster: 3 Expert Tips For Busy Development Teams
Making Scala Faster: 3 Expert Tips For Busy Development TeamsLightbend
 
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataLightbend
 
Bridging the Gap: Connecting AWS and Kafka
Bridging the Gap: Connecting AWS and KafkaBridging the Gap: Connecting AWS and Kafka
Bridging the Gap: Connecting AWS and KafkaPengfei (Jason) Li
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSAWS Vietnam Community
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestKrishna Gade
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsSlim Baltagi
 
Common Patterns of Multi Data-Center Architectures with Apache Kafka
Common Patterns of Multi Data-Center Architectures with Apache KafkaCommon Patterns of Multi Data-Center Architectures with Apache Kafka
Common Patterns of Multi Data-Center Architectures with Apache Kafkaconfluent
 
Kafka for begginer
Kafka for begginerKafka for begginer
Kafka for begginerYousun Jeong
 
Mobius: C# Language Binding For Spark
Mobius: C# Language Binding For SparkMobius: C# Language Binding For Spark
Mobius: C# Language Binding For SparkSpark Summit
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014Amazon Web Services
 
Apache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignApache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignMichael Noll
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh LalwaniDatabricks
 

Tendances (20)

Building High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in KafkaBuilding High-Throughput, Low-Latency Pipelines in Kafka
Building High-Throughput, Low-Latency Pipelines in Kafka
 
Power of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data StructuresPower of the Log: LSM & Append Only Data Structures
Power of the Log: LSM & Append Only Data Structures
 
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
A New Centralized Volume Storage Solution for Docker and Container Cloud by W...
 
Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In Operation
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patterns
 
Real time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and CouchbaseReal time Messages at Scale with Apache Kafka and Couchbase
Real time Messages at Scale with Apache Kafka and Couchbase
 
Cloudsolutionday 2016: Getting Started with Severless Architecture
Cloudsolutionday 2016: Getting Started with Severless ArchitectureCloudsolutionday 2016: Getting Started with Severless Architecture
Cloudsolutionday 2016: Getting Started with Severless Architecture
 
Making Scala Faster: 3 Expert Tips For Busy Development Teams
Making Scala Faster: 3 Expert Tips For Busy Development TeamsMaking Scala Faster: 3 Expert Tips For Busy Development Teams
Making Scala Faster: 3 Expert Tips For Busy Development Teams
 
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
 
Bridging the Gap: Connecting AWS and Kafka
Bridging the Gap: Connecting AWS and KafkaBridging the Gap: Connecting AWS and Kafka
Bridging the Gap: Connecting AWS and Kafka
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at Pinterest
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiasts
 
Common Patterns of Multi Data-Center Architectures with Apache Kafka
Common Patterns of Multi Data-Center Architectures with Apache KafkaCommon Patterns of Multi Data-Center Architectures with Apache Kafka
Common Patterns of Multi Data-Center Architectures with Apache Kafka
 
Kafka for begginer
Kafka for begginerKafka for begginer
Kafka for begginer
 
Mobius: C# Language Binding For Spark
Mobius: C# Language Binding For SparkMobius: C# Language Binding For Spark
Mobius: C# Language Binding For Spark
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
 
Kafka at scale facebook israel
Kafka at scale   facebook israelKafka at scale   facebook israel
Kafka at scale facebook israel
 
Apache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - VerisignApache Kafka 0.8 basic training - Verisign
Apache Kafka 0.8 basic training - Verisign
 
Whirlpools in the Stream with Jayesh Lalwani
 Whirlpools in the Stream with Jayesh Lalwani Whirlpools in the Stream with Jayesh Lalwani
Whirlpools in the Stream with Jayesh Lalwani
 

Similaire à Delivering big content at NBC News with RavenDB

A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 SystemsDavid Newman
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container EcosystemVinay Rao
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service FabricDavide Benvegnù
 
Why Kubernetes as a container orchestrator is a right choice for running spar...
Why Kubernetes as a container orchestrator is a right choice for running spar...Why Kubernetes as a container orchestrator is a right choice for running spar...
Why Kubernetes as a container orchestrator is a right choice for running spar...DataWorks Summit
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSSteve Wong
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)Amazon Web Services
 
Stream processing on mobile networks
Stream processing on mobile networksStream processing on mobile networks
Stream processing on mobile networkspbelko82
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Primend
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationshipJürgen Brüder
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015WaveMaker, Inc.
 

Similaire à Delivering big content at NBC News with RavenDB (20)

Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container Ecosystem
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
Why Kubernetes as a container orchestrator is a right choice for running spar...
Why Kubernetes as a container orchestrator is a right choice for running spar...Why Kubernetes as a container orchestrator is a right choice for running spar...
Why Kubernetes as a container orchestrator is a right choice for running spar...
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OS
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Stream processing on mobile networks
Stream processing on mobile networksStream processing on mobile networks
Stream processing on mobile networks
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
OpenStack and Windows
OpenStack and WindowsOpenStack and Windows
OpenStack and Windows
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationship
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
Background processing with hangfire
Background processing with hangfireBackground processing with hangfire
Background processing with hangfire
 

Dernier

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Dernier (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Delivering big content at NBC News with RavenDB

  • 1. NoSql NOW! 2013 Delivering big content at NBC News with RavenDB
  • 2.
  • 4. •  Schema-less document database with RESTful API. •  Fully ACID and all writes saved to disk (ESENT). •  Indexing/queries executed with Lucene.NET. •  Easily extended with custom logic using “bundles”. •  Management UI provided in Silverlight. •  Host as Windows Service, IIS app, or embedded in your app. Raven server
  • 5. •  .NET client provided. Third-party clients exist for JavaScript, PHP, and Ruby. •  Wraps HTTP API. •  Provides client-side caching, change notification, LINQ querying. •  Easily extended with many, many hooks into almost all operations. Raven client
  • 6. •  Open source: http://github.com/ravendb/ravendb •  License is AGPL (free) or commercial (paid). •  Exception: Your project can use any OSI-approved license and still use Raven for free. •  Commercial licenses based on max parallelism and RAM. •  Windows clustering support and storage compression/ encryption available with Enterprise license only. Raven licensing
  • 9. •  Includes nbcnews.com, today.com and more. •  1.2 billion pageviews/month. •  140 million video streams/month. •  58 million unique users/month. •  Traffic spikes up to 100x normal when big news events happen. NBC News Digital network
  • 10. •  Very fast page load required •  “Instant” publish time required •  6 to 8 code deployments each day •  High availability: zero* downtime allowed One of the largest US news sites
  • 11. High availability is when the answer to: “What’s the longest outage before you wind up in your boss’s office?” is < 5 seconds.
  • 12. Credit: Mitch Canter @studionashvegas http://twitpic.com/z13bw
  • 13. •  Rolling deployments and rollbacks. •  Apps and services decoupled physically and temporally. •  Designed for both auto-failover/recovery and manual reconfiguration by ops. •  Seamless scale out by adding instances of any process. •  And more… Some prerequisites for HA
  • 14. •  Data schema can evolve rapidly •  Apps shouldn’t know where data is •  Apps should talk to the closest data replica •  Apps should automatically find a new replica if the closest becomes unavailable •  Ops can add/remove replicas quickly and easily, without affecting any running apps HA data: a private data cloud
  • 15. •  Schema-less document database allows rapid change. •  Fully ACID model fit business needs. •  Strong replication functionality supported HA needs. •  Easily customizable on both client and server. •  Easily deployed and managed. •  First class .NET client. Why we chose RavenDB
  • 16. •  Raven used behind: •  NBC News and TODAY apps: Windows 8, iOS, Android, Windows Phone, XBox, Roku. •  Growing number of sections of nbcnews.com and today.com. •  Raven usage stats: •  ~10 million docs, +1000s of new docs/day. •  10s of writes/sec. •  100s of reads/sec (after 3 layers of caching). Current* state of Raven usage
  • 18. •  Each doc cached as long as memory available. •  Requests include If-Modified-Since header. •  304 Not Modified response saves bandwidth. •  Aggressive caching avoids the round-trip. Tunable by ops at runtime (custom). Client-side caching
  • 19. •  You define sharding strategy – a method. •  Raven manages storing each doc to the correct instance and fanning/merging queries. •  No auto-rebalancing of shards if you change number of instances. Raven sharding
  • 20. •  All queries are performed against indexes. •  Indexes can be predefined or auto-created. •  Indexing/queries are executed in Lucene.NET. •  Fielded. •  Full text with built-in or custom analyzers. •  Geo-spatial. •  Map-reduce. •  Result transformers can load other docs. •  Query with LINQ or Lucene syntax. •  Indexes may be stale. Can force wait for non-stale results. (Danger! Primarily for unit tests.) •  Projections occur on server, reducing data on the wire. •  Super-cool stuff: eval patching, index scripts. Raven indexing and querying
  • 21. •  Need indexes up to date before letting a client talk to a replica. •  Indexes are created by the client app: •  Static: CreateIndexes() at startup scans assemblies for index classes. •  Dynamic: when client issues a query. Indexing catch-22
  • 22. •  Define new index, with no code using it. •  Deploy and allow new index to build. •  Redeploy with code using the new index. •  Redeploy after deleting old index definition. •  Delete old index on each replica. Updating a static index – a pain
  • 23. •  If you do it by Id, it is consistent (within a single Raven server) •  Load() •  Store() •  Delete() •  Queries are only eventually consistent (“eventually” is measured in milliseconds) Consistency
  • 24. •  Eventual consistency – replication is async in background. •  All replication is one-way and managed by source. •  Can enable transitive replication – useful for new instances. •  Set W value to ensure replication to minimum number of instances (v2.5). Or timeout. •  Client will auto-failover to replication destinations, configurable to reads only or reads and writes. Raven replication
  • 25. •  Sequential guids. •  Unique for every write to a database. •  Used for caching in client, concurrency control, and replication. Etags
  • 26. Source: What’s the last etag I replicated to you? Destination: 42 Source: I’m up to 49, so here’s a POST with some docs in it. Destination: Got ‘em. Source: What’s the last etag I replicated to you? Destination: 49 The replication conversation
  • 27. •  Replication from each instance to all other instances. •  Any instance could receive writes. •  Reduce replication conflicts by forcing writes to single “master”. •  Handle conflicts in your app or with custom server bundle – in our case, “last in wins” bundle. Multi-master replication
  • 28. •  Null Id and tag can be extracted: client generates with Hi-Lo •  Null Id received at server: guid •  Id ending in / received at server: append auto-increment integer. •  Otherwise: use the value in the object. •  Server prefix protects against edge-case failures. Id generation
  • 29. •  Control where reads and writes go. Implemented in a custom DocumentStore wrapper. •  Control aggressive caching time. •  Deploy new instances with replication. •  Backup – but probably never restore in production. •  Copy indexes. •  Monitor with stats endpoints. Raven operations tasks
  • 30. •  Modeling/versioning •  Replication •  Client failover •  Consistency Keep in mind… •  Concurrency control •  Indexing and updates •  Id generation •  Caching
  • 31. •  http://ravendb.net •  GitHub: http://github.com/ravendb •  Ayende’s blog: http://ayende.com •  RavenDB Google group •  @RavenDB on Twitter •  Me: @jtbennett on Twitter More info on Raven
  • 33. Many thanks to: You. NoSql NOW! Huge. Rhinos: @ayende,@synhershko. Peacocks: @benlakey,@johncoder,@pkdotnet, Colin Hicks,Peter Durham,BryanWheeler.
  • 34. hugeinc.com info@hugeinc.com 45 Main St. #220 Brooklyn, NY 11201 +1 718 625 4843