Train for trainers – open source in the cloud / Warsaw, 2013 /
David Makogon
Windows Azure evangelist @DMakogon
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
NoSQLSchemalessConsistency, Availability, Partition Tolerance (CAP)High Availability through clusteringExpect failures
Typically Scale Out
(doesn’t enforce schema)
NoSQL typesColumn family – Cassandra, Big TableColumns collocated: Row=column aggregateSQL-like queries
Azure tablesPartitioned storage with primary keyTriple-replicated, strong consistencyOptionally geo-redundantScalable: 200TB per namespaceSDKs: .NET, PHP, Python, Node, Java, Ruby
MongoDBDocument database – Binary JSON (BSON)Powerful query languageDocs, sub-docs, indexesMap/reduce, aggregationReplicas, shards, replicated shardsDozens of language SDKs
MongoDBRuns on Linux or WindowsInstalls in AzureHosted by MongoLab, MongoHQ
Installation instructions:http://bit.ly/mongodbonazure
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
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
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
Top Related