History Many teams have made great efforts to use relational databases in projects only to have to supplement them in order to meet performance demands.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Advertisements

Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Dimensional Modeling.
CQRS in an hour or so 1. Who is jdn? Me, aka John Nuechterlein Blog: Operations Manager – Developer.
Object Relational Mapping – ORM Entity Framework
Command and Query Responsibility Segregation Cameron Fletcher.
Web Applications Development Using Coldbox Platform Eddie Johnston.
NoSQL, No SQL!!, No, SQL? Raj Nair, Penton. Variety is the spice of life Key-Value stores Document stores ColumnFam ily Graph Hybrid Spice can lead to.
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Accelerate Business Success With CRM CRM Interoperability.
Chapter 11 Data Management Layer Design
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
WDK Driver Test Manager. Outline HCT and the history of driver testing Problems to solve Goals of the WDK Driver Test Manager (DTM) Automated Deployment.
Russ Houberg Senior Technical Architect, MCM KnowledgeLake, Inc.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Massively Parallel Cloud Data Storage Systems S. Sudarshan IIT Bombay.
Introduction to Database using Microsoft Access 2013 Part 1 November 4, 2014.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
A little engineering on Rails Robert W. Hasker. Goals Intro to the Rails framework ▫Basic concepts: MVC, Active Record ▫A bit of Ruby Using Rails to build.
Entity Framework Code First End to End
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
Database Design for DNN Developers Sebastian Leupold.
Databases and LINQ Visual Basic 2010 How to Program 1.
Systems analysis and design, 6th edition Dennis, wixom, and roth
DBA Developer. Responsibilities  Designing Relational databases  Developing interface layer Environment Microsoft SQL Server,.NET SQL Layer: Stored.
Scalable Architecture for the Cloud. What????  Command Query Responsibility Segregation  What is it?  What kinds of apps is it for?  What are the.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
DATABASES Pindaro Demertzoglou – Lally School of Management and Technology.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Moohanad Hassan Maedeh Pishvaei. Introduction Open Source Apache foundation project Relational DB: SQL Server CouchDB : JSON document-oriented DB (NoSQL)
Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila.
NOSQL DATABASES Please remember to read the NOSQL Distilled book and the Seven Databases book.
Hibernate Persistence. What is Persistence Persist data to database or other storage.  In OO world, persistence means persist object to external storage.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
INFORMATION MANAGEMENT Unit 2 SO 4 Explain the advantages of using a database approach compared to using traditional file processing; Advantages including.
What's New in Kinetic Calendar 2.0 Jack Boespflug Kinetic Data.
Enterprise Integration Patterns CS3300 Fall 2015.
MongoDB First Light. Mongo DB Basics Mongo is a document based NoSQL. –A document is just a JSON object. –A collection is just a (large) set of documents.
Clusterpoint Margarita Sudņika ms RDBMS & NoSQL Databases & tables → Document stores Columns, rows → Schemaless documents Scales UP → Scales UP.
Dynamo: Amazon’s Highly Available Key-value Store DAAS – Database as a service.
NoSQL Or Peles. What is NoSQL A collection of various technologies meant to work around RDBMS limitations (mostly performance) Not much of a definition...
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
NoSQL: Graph Databases. Databases Why NoSQL Databases?
Introduction to MongoDB. Database compared.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
 What is DB Testing ?  Testing at the Data Access Layer  Need for Testing DB Objects  Common Problems that affect the Application  Should Testers.
Group members: Phạm Hoàng Long Nguyễn Huy Hùng Lê Minh Hiếu Phan Thị Thanh Thảo Nguyễn Đức Trí 1 BIG DATA & NoSQL Topic 1:
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
Visual Basic 2010 How to Program
Data Persistence In A Web Hosted World
Windows Azure SQL Federation
Spark Presentation.
Server Concepts Dr. Charles W. Kann.
Datamining : Refers to extracting or mining knowledge from large amounts of data Applications : Market Analysis Fraud Detection Customer Retention Production.
Serverless CQRS in Azure!
Massively Parallel Cloud Data Storage Systems
1 Demand of your DB is changing Presented By: Ashwani Kumar

relational thoughts on NoSql
Database Management Systems
Azure Cosmos DB with SQL API .Net SDK
Lecture 15: Databases II Wednesday Feburary 28, 2018
NoSQL databases An introduction and comparison between Mongodb and Mysql document store.
Entity Framework & LINQ (Language Integrated Query)
The Database World of Azure
Presentation transcript:

History Many teams have made great efforts to use relational databases in projects only to have to supplement them in order to meet performance demands.

Common 3-tier Architecture

Physical Architecture Web Farm Caching Server CDN - Media Application Server Search Engine Server Database Server SANS or Disk Array

In the 90 s Microsoft development best practices, code samples and designs started with designing the database first Eventually ORMs NHibernate 2004, Linq to SQL Nov 2007, and Entity Framework August 2008 The Path: Education, Experiences, Vendor Influences

ORMs solve the problem of interacting with the database by mapping domain objects to relational tables (CRUD) Effects with NHibernate focus more on domain (EF eventually follows) We have taught BAs about CRUD and other technology terms to cope with constraints

Performance of SELECT mapping over 500 iterations - POCO serialization MethodDurationRemarks Hand coded (using a SqlDataReader) 47ms Dapper ExecuteMapperQuery 49ms ServiceStack.OrmLite (QueryById) 50ms PetaPoco 52msCan be faster BLToolkit 80ms SubSonic CodingHorror 107ms NHibernate SQL 104ms Linq 2 SQL ExecuteQuery 181ms Entity framework ExecuteStoreQuery631ms

Performance of SELECT mapping over 500 iterations - typical usage MethodDurationRemarks Linq 2 SQL CompiledQuery 81ms Not super typical involves complex code NHibernate HQL 118ms Linq 2 SQL 559ms Entity framework 859ms SubSonic ActiveRecord.SingleOrDefault3619ms

Common Performance Tweaks Indexes De-normalizing Tables Pinning Tables Full Text Search Scaling Up or Out? Scale Up with SQL Server is cheaper than scaling out (licensing) SQL Azure

Our Efforts ORMs learning curve 30 to 40 % of the project for saving data In pursuit of Normalization / Normal Form Normalization in reality isn’t normalization at all! First step in performance: Caching, caching, and more caching Why did we do this again?

Changing your perspective Simpler design tends to be better MVC is a successful UI pattern because it is a simpler solution than say web forms What are we doing today? What is caching? A key/value database Taking advantage of caching

Document Database is one solution Mongo, CouchDB, RavenDB etc… Changing your Model to deal with performance Is this the answer? No silver bullet Great to have in the tool belt One view one model

Advantages of document database Craigs List – scheme change took over a month to process using MySQL Farm Question: How is the data being used and what is the data being used for? Event based architecture – events happen in a system capture the changes

CQRS - Command Query Separation Separating your reads from your writes At its heart is a simple notion that you can use a different model to update information than the model you use to read information. This simple notion leads to some profound consequences for the design of information – Martin Fowler

Writes (Commands) Are commands Service Bus Handlers on different machines Publish event to db Publish event to cache Publish event to search engine Events stored in event store A true audit log Reply events to populate cache Reply events to find exact state of user!

Events as a Storage Mechanism Save data as binary in SQL Server or JSON in document database From Jonathan Oliver’s Event Store CREATE TABLE [dbo].[Commits] ( [StreamId] [uniqueidentifier] NOT NULL, [StreamRevision] [int] NOT NULL CHECK ([StreamRevision] > 0), [Items] [tinyint] NOT NULL CHECK ([Items] > 0), [CommitId] [uniqueidentifier] NOT NULL CHECK ([CommitId] != 0x0), [CommitSequence] [int] NOT NULL CHECK ([CommitSequence] > 0), [CommitStamp] [datetime] NOT NULL, [Dispatched] [bit] NOT NULL DEFAULT (0), [Headers] [varbinary](MAX) NULL CHECK ([Headers] IS NULL OR DATALENGTH([Headers]) > 0), [Payload] [varbinary](MAX) NOT NULL CHECK (DATALENGTH([Payload]) > 0), CONSTRAINT [PK_Commits] PRIMARY KEY CLUSTERED ([StreamId], [CommitSequence]) );

Events as a Storage Mechanism Snapshots to lower the level of mining on multiple events From Jonathan Oliver’s Event Store CREATE TABLE [dbo].[Snapshots] ( [StreamId] [uniqueidentifier] NOT NULL, [StreamRevision] [int] NOT NULL CHECK ([StreamRevision] > 0), [Payload] [varbinary](MAX) NOT NULL CHECK (DATALENGTH([Payload]) > 0), CONSTRAINT [PK_Snapshots] PRIMARY KEY CLUSTERED ([StreamId], [StreamRevision]) );

Events as a Storage Mechanism Aggregate: A collection of objects that are bound together by a root entity, otherwise known as an aggregate root. The aggregate root guarantees the consistency of changes being made within the aggregate by forbidding external objects from holding references to its members. Example: When you drive a car, you do not have to worry about moving the wheels forward, making the engine combust with spark and fuel, etc.; you are simply driving the car. In this context, the car is an aggregate of several other objects and serves as the aggregate root to all of the other systems.

Reads (Query) Reads on cache machines Reads on search indexes Sharding available on some cache solutions Transactions available on some solutions

Effects Effects on business BAs – now talking about business Simpler development – more productivity Need scalability add machine for reads, writes, or bus Audit log – exactly what the user was doing Build cache Build development environment Task Based UI for writes

Physical Parts Service Bus Caching Web Server Servers for Handlers Database

Task Based User Interface Single URL application More complicated Pub / Sub with Node or SignalR

Resources Gregg Young Udi Dahan Jonathan Oliver Rinat Abdullin