warsaw polyglot persistence presentation

32
Train for trainers – open source in the cloud / Warsaw, 2013 / David Makogon Windows Azure evangel @DMakogon [email protected] Welcome to NoSQL and Polyglot Persistence! #ms_oss

Upload: david-makogon

Post on 20-Aug-2015

1.401 views

Category:

Technology


3 download

TRANSCRIPT

Train for trainers – open source in the cloud / Warsaw, 2013 /

David Makogon

Windows Azure evangelist @DMakogon

[email protected]

Welcome to NoSQL and Polyglot Persistence!

#ms_oss

The multi-database paradigm shift NoSQL database typesMultiple databases working together

Today’s agenda

Many decisions to makeQuery semantics DurabilityScalabilityEase of Azure integrationStrengths vs limitations

How to map your solution to a database?

Traditionally, we compromised…Referential Integrity and transactionsSchema flexibilityScaleReporting needsSkillsetsExisting DR/HA procedures3rd-party tools, ecosystem

Polyglot persistence: pick many!Hybrid / mixed approachUse case: Shopping siteCart: Key/valueOrders: RDBMSCatalog, Reviews: DocumentSuggestions: Graph

Combine SQL, NoSQL, NewSQLSQL Server 2014 (Hekaton)SAP HANAOracle 12c

Key/value

OrdersCart Catalog &

Reviews

Document

Suggestions

Graph

E-Commerce platform

RDBMS

Data landscapeStructured/relational OLTPOLAP

Unstructured/semi-structuredTelemetrySocial graphs

Big dataMap/reduce massive quantitiesHadoop/pig/hive/grunt/sqoop

Data in many flavors

Azure TablesSQL DB

SQL NoSQL

NoSQLSchemalessConsistency, Availability, Partition Tolerance (CAP)High Availability through clusteringExpect failures

Typically Scale Out

(doesn’t enforce schema)

NoSQL typesKey/value - Memcached, Azure Tables, DynamoDBKey-based lookupOpaque values

NoSQL typesDocument – MongoDB, CouchDB, RavenDBOO data modelingSearchingSQL-like queries

NoSQL typesColumn family – Cassandra, Big TableColumns collocated: Row=column aggregateSQL-like queries

NoSQL typesGraph – Neo4j, InfiniteGraphNode + relationship traversal

Table storage<key/value>

storage

Azure tablesPartitioned storage with primary keyTriple-replicated, strong consistencyOptionally geo-redundantScalable: 200TB per namespaceSDKs: .NET, PHP, Python, Node, Java, Ruby

Demo: Azure Tables

MongoDB<document>

MongoDBDocument database – Binary JSON (BSON)Powerful query languageDocs, sub-docs, indexesMap/reduce, aggregationReplicas, shards, replicated shardsDozens of language SDKs

MongoDB vs SQL: Movie reviews…

MongoDBRuns on Linux or WindowsInstalls in AzureHosted by MongoLab, MongoHQ

Installation instructions:http://bit.ly/mongodbonazure

Demo: MongoDB

Neo4j<graph>

Neo4jGraph database: Nodes and relationshipsStandalone or HASDKs: Java, PHP, Python, Ruby, Node, .NETQuery languages: Cypher, Gremlin

Neo4j vs SQL: Friends of friends…

MATCH (p:Person)-[:FRIEND_OF*3..3]->(fof:Person)WHERE p.name='John'RETURN p, fof

Neo4jInstallable on Windows and LinuxTutorials at neo4j.org

Neo4j+Azure docs and walkthroughs: http://bit.ly/neo4jonazure

Demo: Neo4j

Cassandra<column family>

CassandraPartitioned storageSelectable consistency + availabilityMap/reduce on Cassandra File SystemOptimized for high write throughputSDKs: PHP, Python, Ruby, Node, .NETCassandra Query Language (CQL)

Remember this???What might this look like?…like… in a demo app?

Key/value

OrdersCart Catalog &

Reviews

Document

Suggestions

Graph

E-Commerce platform

RDBMS

Cloud NinjaShopping app

HomeworkDeploy MongoDB locally or via Azure StoreDeploy Neo4j 2.0 locally or in Azure VMImport sample databases, build demo queriesBuild sample app with SDK’s (not command line)Commit code

More infoCN2P shopping demo app: https://cn2p.codeplex.com/Task demo: http://task.codeplex.comWindows Azure: www.windowsazure.comOpen Platform video series: http://bit.ly/openplatformAzure SDK’s: https://github.com/WindowsAzureAzure Training kit: http://bit.ly/azuretrainingkitNeo4j on Azure: http://bit.ly/neo4jonazureMongoDB on Azure: http://bit.ly/mongodbonazure

Questions?