SlideShare a Scribd company logo
Developing Open Source
Solutions with NoSQL and
Other Cloud Services on Azure
Brian Benz, Sr. Technical Evangelist
Microsoft Open Technologies, Inc.
2 http://www.anglebrackets.org
Agenda
 Azure
 NoSQL
 NoSQL on Azure
 MongoDB and CouchDB Options
 NoSQL on Azure IaaS, PaaS, SaaS
 Azure Web Sites
 Q&A
Azure
Flexible
Azure IaaS, PaaS, SaaS
Azure Virtual Machines – OS Options
Windows Server 2008 and 2012
OpenSUSE and SUSE Enterprise
CentOS
Ubuntu
Oracle Linux
vmdepot.msopentech.com
7 http://www.anglebrackets.org
NoSQL
Alternative to traditional relational DBMS
 Flexible schema
 Quicker/cheaper to set up
 Massive scalability
 Relaxed consistency = higher performance & availability
 No declarative query language = more programming
 Relaxed consistency = fewer guarantees
8 http://www.anglebrackets.org
NoSQL Applications
 Document: JSON, XML, other semistructured formats
 Operations: Insert(), Fetch(key), Update(key, doc), Delete(key)
 (Key, Value) pairs
 Operations: Insert(key,value), Fetch(key), Update(key),
Delete(key)
 Implementation: efficiency, scalability, fault-tolerance
 Records distributed to nodes based on key
 Replication
 Single-record transactions, “eventual consistency”
9 http://www.anglebrackets.org
New Terms
RDBMS NoSQL
Database Database
Table Collection
View, Row Document
Index Index
Join Embedding, Linking
Partition Shard
Partition Key Shard Key
10 http://www.anglebrackets.org
Example – Posts, Categories, Tags, and Comments
11 http://www.anglebrackets.org
Basic Document Structure
{
"_id" : ObjectId("508d27069cc1ae293b36928d"),
"title" : "This is the title",
"body" : "This is the body text.",
"tags" : [
“tag 1"
],
"created_date" : ISODate("2012-10-28T12:41:39.110Z"),
"author_id" : ObjectId("508d280e9cc1ae293b36928e"),
"category_id" : ObjectId("508d29709cc1ae293b369295"),
"comments" : [
{
"subject" : "This is comment 1",
"body" : "This is the body of comment 1.",
"author_id" : ObjectId("508d345f9cc1ae293b369296"),
"created_date" : ISODate("2012-10-28T13:34:23.929Z")
},
]
}
12 http://www.anglebrackets.org
Less Basic Document Structure
{
"_id" : ObjectId("508d27069cc1ae293b36928d"),
"title" : "This is the title",
"body" : "This is the body text.",
"tags" : [
ObjectId("508d35349cc1ae293b36929c")
],
"created_date" : ISODate("2012-10-28T12:41:39.110Z"),
"author_id" : ObjectId("508d280e9cc1ae293b36928e"),
"category_id" : ObjectId("508d29709cc1ae293b369295"),
"comments" : [
ObjectId("508d359a9cc1ae293b3692a2")
]
}
13 http://www.anglebrackets.org
The Landscape - NoSQL on Azure
 MongoDB
 Also MongoLab MongoDB-as-a-Service
 Also MongoDB Inc. MongoDB-as-a-Service (beta)
 CouchDB
 Cloudant CouchDB-as-a-Service
 Cassandra
 Riak
 Redis
14 http://www.anglebrackets.org
What is MongoDB?
 Open Source, by MongoDB, Inc.
 Community and Enterprise Editions
 Language: c++
 Data model: Using BSON (binary JSON)
 Replication and Sharding
 Azure VMS, PaaS, and SaaS
15 http://www.anglebrackets.org
http://docs.mongodb.org/ecosystem/drivers/
• C, C++
• C#
• Go
• Erlang
• Java
• JavaScript
• Node.js
• Perl
• PHP
• Python
• Ruby
• Scala
16 http://www.anglebrackets.org
 Support and Alerts
 Custom Admin Tools
 Backup and Recover
 Performance Analysis – Slow Query Analyzer
 Monitoring and Support
17 http://www.anglebrackets.org
MongoDB in Beta
NoSQL on microsoft azure   april 2014
19 http://www.anglebrackets.org
What is CouchDB?
 Apache Project
 Language: Erlang
 Data model: Using JSON and REST
 Map/Reduce Views and Indexes
 Replication
 Azure VMs, PaaS, SaaS
20 http://www.anglebrackets.org
 Managed, hosted fork of CouchDB
 Incremental MapReduce engine
 Horizontal scaling & built-in Lucene search
 8 committers to Apache CouchDB
 13,000+ users
 Apache CouchDB features
 BigCouch: Horizontal scaling framework
 based on Amazon Dynamo paper
 Fauxton: Futon replacement
 modular CouchDB Web dashboard
 live JSON editor with JavaScript hinting
20
21 http://www.anglebrackets.org
What is Cassandra?
 Apache Project
 Language: Java
 Data model: Thrift & custom binary
 Fast Writes, Memory management
 Replication
 Azure VMs, PaaS
22 http://www.anglebrackets.org
What is Redis?
 Open Source
 Language: c
 Data model: RESP (REdis Serialization Protocol)
 Key/Value
 In Memory
 Persistence via snapshotting or journaling to disk
 Azure VMs, PaaS
23 http://www.anglebrackets.org
What is Riak?
 Open Source
 Language: Erlang & C, some JavaScript
 Data model: HTTP/REST or custom binary
 Key/Value
 In Memory
 Persistence via snapshotting or journaling to disk
 Azure VMs, PaaS, SaaS
Replica set hosted
on Azure
worker roles or
virtual machines
Replica Set
DriverYour
Application
Replica Sets: High Availability
Shards, config servers and mongos (router) hosted
on Azure worker roles or virtual machines
Key range A-D
Sharding: Scalability
Key range E-G Key range G-Z
Mongos
(router)Your
Application
Config 1
Config 2
Config 3
Mongos
(router)
26 http://www.anglebrackets.org
Deploying to Virtual Machines
 Compared to worker role (PaaS), VM-based
replica sets offer more control, as
well as more responsibility
 MongoDB Installer for Azure is a great learning tool. Not
typically used for production deployment.
 Puts MongoDB on OS disk instead of attached disk
 Limited to 30gb, not performant for writes, Windows-only
 http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+-
+Windows+Installer
 .deploy-mongo.ps1 <node-count> <dns-prefix> <image-name>
<password> <location> <pub-settings-file-path> [replica-set-
name]
 For Linux VM deployment, see tutorial -
http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+-
+Linux+Tutorial
azure topic verb options
Command Line Syntax Overview
prompt>
account
account location
account affinity-group
vm
vm disk
vm endpoint
vm image
service
service cert
site
config
download
import
list
show
delete
start
restart
shutdown
capture
create
attach
detach
browse
set
username
password
dns-prefix
vm-name
lb-port
target-image-name
source-path
disk-image-name
size-in-gb
thumbprint
value
-v
-vv
28 http://www.anglebrackets.org
Example: Provisioning a Replica Set
azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-
en-us-30GB.vhd" username password -l "West US" -e
azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-
en-us-30GB.vhd" username password -l "West US" -e 23 -c
azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531-
en-us-30GB.vhd" username password -l "West US" -e 24 -c
azure vm endpoint create mongoc9 27017 27017
azure vm endpoint create mongoc9-2 27018 27018
azure vm endpoint create mongoc9-3 27019 27019
To set up MongoDB, SSH into each instance and:
get mongodb binaries and install
create db dir
start mongod, initialize replica set
Automation Support
Capabilities
• Fully Customize VM with Data Disks and
Endpoint Configuration
• Automate Virtual Network Settings
NoSQL on microsoft azure   april 2014
31 http://www.anglebrackets.org
32 http://www.anglebrackets.org
Conference Scheduler
 Attendees can track sessions, vote sessions up and down
 Offline Capabilities
 IndexedDB
 CouchDB VM for Data Storage
 Web site hosting the application
 Node.js
 Grunt
Demo Architecture
NoSQL on microsoft azure   april 2014
35 http://www.anglebrackets.org
Docs - azure.microsoft.com/documentation/
36 http://www.anglebrackets.org
SDKs - azure.microsoft.com/downloads
37 http://www.anglebrackets.org
CLIs - azure.microsoft.com/downloads
38 http://www.anglebrackets.org
OSS DevOps - msopentech.com/projects
39 http://www.anglebrackets.org
Where to learn more
Tutorial: Building a multi-tier cloud application on Windows Azure using MongoLab,
node.js, and Socket.IO
http://msopentech.com/blog/2013/09/18/tutorial-building-multi-tier-cloud-application-
windows-azure-using-mongolab-node-js-socket-io/
Tutorial: Using MongoDB, Windows Communication Foundation, OData, and PowerBI
to build a Business Intelligence solution on Windows Azure
http://msopentech.com/blog/2014/02/19/tutorial-using-mongodb-windows-communication-
foundation-odata-powerbi-build-business-intelligence-solution-windows-azure/
Tutorial – Building a Multi-Tier Windows Azure Web application use Cloudant’s
Couchdb-as-a-Service, node.js, CORS, and Grunt
http://msopentech.com/blog/2013/12/19/tutorial-building-multi-tier-windows-azure-web-
application-use-cloudants-couchdb-service-node-js-cors-grunt-2/
40 http://www.anglebrackets.org
Where to learn more
 MongoDB on Azure VM -
http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM
 Install MongoDB on a virtual machine running CentOS Linux in Azure:
http://www.windowsazure.com/en-us/manage/linux/common-tasks/mongodb-on-
a-linux-vm/
 Install MongoDB on a virtual machine running Windows Server in Azure:
http://www.windowsazure.com/en-us/manage/windows/common-tasks/install-
mongodb/
 Node.js Web Application with Storage on MongoDB (Virtual Machine):
http://waweb.windowsazure.com/en-us/develop/nodejs/tutorials/website-with-
mongodb-(mac)/
 Create a Azure web site that connects to MongoDB running on a virtual machine in
Azure:
http://www.windowsazure.com/en-us/develop/net/tutorials/website-with-
mongodb-vm/
41 http://www.anglebrackets.org
Other Resources
 Microsoft Open Technologies Blog: http://blogs.msdn.com/b/interoperability
 VM Depot:
http://vmdepot.msopentech.com
 Windows Azure development:
www.WindowsAzure.com
 SDKs and Command Line Tools:
 http://www.windowsazure.com/en-us/downloads/
 Windows Azure Training Kit:
http://windowsazure-trainingkit.github.com/
 Microsoft Web Platform Installer:
 http://www.microsoft.com/web/downloads/platform.aspx
 Web Matrix
 http://www.microsoft.com/web/webmatrix/
 Project Kudu
 https://github.com/projectkudu/kudu
 The application I showed today
 https://github.com/axemclion/conference
Q&A

More Related Content

PDF
Spring Data MongoDB 介紹
PDF
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
ODP
Single Page Applications in Drupal
PDF
インフラ野郎Azureチーム Night
PDF
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
PPTX
Ciklum net sat12112011-roman bugaev-windows azure technology cocktail
PDF
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
PDF
Java & containers: What I wish I knew before I used it | DevNation Tech Talk
Spring Data MongoDB 介紹
DB エンジニアのマイクロサービス入門〜Oracle Database と Docker ではじめる API サービス〜
Single Page Applications in Drupal
インフラ野郎Azureチーム Night
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
Ciklum net sat12112011-roman bugaev-windows azure technology cocktail
Docker in the Oracle Universe / WebLogic 12c / OFM 12c
Java & containers: What I wish I knew before I used it | DevNation Tech Talk

What's hot (20)

PPTX
Growing in the Wild. The story by CUBRID Database Developers.
PPTX
Node.js on Windows Azure
PDF
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
PDF
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
PPTX
Caching in Windows Azure
PPTX
Node js for enterprise
PDF
Grails 2.0 Update
PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
PDF
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
PDF
Metasepi team meeting #8': Haskell apps on Android NDK
ODP
Dynamic Languages Web Frameworks Indicthreads 2009
PDF
Big App Workloads on Microsoft Azure - TechEd Europe 2014
PDF
Tech Ed North America 2014 - Java on Azure
PPTX
Rapid API development examples for Impress Application Server / Node.js (jsfw...
PPTX
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
PPTX
OpenStack Glance
PPTX
Monkey man
PPTX
SpringBoot with MyBatis, Flyway, QueryDSL
PDF
Introduction to node js - From "hello world" to deploying on azure
Growing in the Wild. The story by CUBRID Database Developers.
Node.js on Windows Azure
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Building Performance - ein Frontend-Build-Prozess für Java mit Maven
Caching in Windows Azure
Node js for enterprise
Grails 2.0 Update
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Metasepi team meeting #8': Haskell apps on Android NDK
Dynamic Languages Web Frameworks Indicthreads 2009
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Tech Ed North America 2014 - Java on Azure
Rapid API development examples for Impress Application Server / Node.js (jsfw...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
OpenStack Glance
Monkey man
SpringBoot with MyBatis, Flyway, QueryDSL
Introduction to node js - From "hello world" to deploying on azure
Ad

Similar to NoSQL on microsoft azure april 2014 (20)

PPTX
MongoDB and Windows Azure
PPTX
MongoDB and Windows Azure
PPTX
The three aaS's of MongoDB in Windows Azure
PPTX
Microsoft Azure
PDF
Continuous Deployment @ AWS Re:Invent
PPTX
JSS build and deployment
PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
The Happy Path: Migration Strategies for Node.js
PDF
Ruby on microsoft azure april 2014
PDF
Azure Cloud Dev Camp - App Platform
PDF
Experiences using CouchDB inside Microsoft's Azure team
PDF
Best Practices for couchDB developers on Microsoft Azure
PPTX
Docker Enterprise Workshop - Technical
PPTX
Just another Wordpress weblog, but more cloudy
PDF
Node.js on microsoft azure april 2014
PPTX
Vijay Oscon
PPTX
Sky High With Azure
PPTX
Windows Azure
PPTX
Windows azure overview for SharePoint Pros
PPTX
Microsoft Azure News - October 2024 - BAUG
MongoDB and Windows Azure
MongoDB and Windows Azure
The three aaS's of MongoDB in Windows Azure
Microsoft Azure
Continuous Deployment @ AWS Re:Invent
JSS build and deployment
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
The Happy Path: Migration Strategies for Node.js
Ruby on microsoft azure april 2014
Azure Cloud Dev Camp - App Platform
Experiences using CouchDB inside Microsoft's Azure team
Best Practices for couchDB developers on Microsoft Azure
Docker Enterprise Workshop - Technical
Just another Wordpress weblog, but more cloudy
Node.js on microsoft azure april 2014
Vijay Oscon
Sky High With Azure
Windows Azure
Windows azure overview for SharePoint Pros
Microsoft Azure News - October 2024 - BAUG
Ad

More from Brian Benz (8)

PDF
How Microsoft learned to love Java
PDF
Azure Virtual Machines Deployment Scenarios
PDF
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1
PDF
Build 2014 - Running Java and Oracle Applications on Microsoft Azure
PDF
Java on Microsoft Azure
PDF
Solr on Microsoft Azure
PDF
Eclipse Development with Microsoft Azure
PDF
Working with Chef on Microsoft Windows and Microsoft Azure
How Microsoft learned to love Java
Azure Virtual Machines Deployment Scenarios
Tech ED 2014 Running Oracle Databases and Application Servers on Azurev1
Build 2014 - Running Java and Oracle Applications on Microsoft Azure
Java on Microsoft Azure
Solr on Microsoft Azure
Eclipse Development with Microsoft Azure
Working with Chef on Microsoft Windows and Microsoft Azure

Recently uploaded (20)

PPTX
Introduction to Information and Communication Technology
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1
PPTX
CSharp_Syntax_Basics.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PPT
tcp ip networks nd ip layering assotred slides
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
durere- in cancer tu ttresjjnklj gfrrjnrs mhugyfrd
PPTX
artificial intelligence overview of it and more
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
The Internet -By the Numbers, Sri Lanka Edition
Introduction to Information and Communication Technology
PptxGenJS_Demo_Chart_20250317130215833.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1
CSharp_Syntax_Basics.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxx
tcp ip networks nd ip layering assotred slides
Paper PDF World Game (s) Great Redesign.pdf
An introduction to the IFRS (ISSB) Stndards.pdf
Module 1 - Cyber Law and Ethics 101.pptx
Cloud-Scale Log Monitoring _ Datadog.pdf
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
durere- in cancer tu ttresjjnklj gfrrjnrs mhugyfrd
artificial intelligence overview of it and more
WebRTC in SignalWire - troubleshooting media negotiation
522797556-Unit-2-Temperature-measurement-1-1.pptx
Sims 4 Historia para lo sims 4 para jugar
QR Codes Qr codecodecodecodecocodedecodecode
introduction about ICD -10 & ICD-11 ppt.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
The Internet -By the Numbers, Sri Lanka Edition

NoSQL on microsoft azure april 2014

  • 1. Developing Open Source Solutions with NoSQL and Other Cloud Services on Azure Brian Benz, Sr. Technical Evangelist Microsoft Open Technologies, Inc.
  • 2. 2 http://www.anglebrackets.org Agenda  Azure  NoSQL  NoSQL on Azure  MongoDB and CouchDB Options  NoSQL on Azure IaaS, PaaS, SaaS  Azure Web Sites  Q&A
  • 5. Azure Virtual Machines – OS Options Windows Server 2008 and 2012 OpenSUSE and SUSE Enterprise CentOS Ubuntu Oracle Linux
  • 7. 7 http://www.anglebrackets.org NoSQL Alternative to traditional relational DBMS  Flexible schema  Quicker/cheaper to set up  Massive scalability  Relaxed consistency = higher performance & availability  No declarative query language = more programming  Relaxed consistency = fewer guarantees
  • 8. 8 http://www.anglebrackets.org NoSQL Applications  Document: JSON, XML, other semistructured formats  Operations: Insert(), Fetch(key), Update(key, doc), Delete(key)  (Key, Value) pairs  Operations: Insert(key,value), Fetch(key), Update(key), Delete(key)  Implementation: efficiency, scalability, fault-tolerance  Records distributed to nodes based on key  Replication  Single-record transactions, “eventual consistency”
  • 9. 9 http://www.anglebrackets.org New Terms RDBMS NoSQL Database Database Table Collection View, Row Document Index Index Join Embedding, Linking Partition Shard Partition Key Shard Key
  • 10. 10 http://www.anglebrackets.org Example – Posts, Categories, Tags, and Comments
  • 11. 11 http://www.anglebrackets.org Basic Document Structure { "_id" : ObjectId("508d27069cc1ae293b36928d"), "title" : "This is the title", "body" : "This is the body text.", "tags" : [ “tag 1" ], "created_date" : ISODate("2012-10-28T12:41:39.110Z"), "author_id" : ObjectId("508d280e9cc1ae293b36928e"), "category_id" : ObjectId("508d29709cc1ae293b369295"), "comments" : [ { "subject" : "This is comment 1", "body" : "This is the body of comment 1.", "author_id" : ObjectId("508d345f9cc1ae293b369296"), "created_date" : ISODate("2012-10-28T13:34:23.929Z") }, ] }
  • 12. 12 http://www.anglebrackets.org Less Basic Document Structure { "_id" : ObjectId("508d27069cc1ae293b36928d"), "title" : "This is the title", "body" : "This is the body text.", "tags" : [ ObjectId("508d35349cc1ae293b36929c") ], "created_date" : ISODate("2012-10-28T12:41:39.110Z"), "author_id" : ObjectId("508d280e9cc1ae293b36928e"), "category_id" : ObjectId("508d29709cc1ae293b369295"), "comments" : [ ObjectId("508d359a9cc1ae293b3692a2") ] }
  • 13. 13 http://www.anglebrackets.org The Landscape - NoSQL on Azure  MongoDB  Also MongoLab MongoDB-as-a-Service  Also MongoDB Inc. MongoDB-as-a-Service (beta)  CouchDB  Cloudant CouchDB-as-a-Service  Cassandra  Riak  Redis
  • 14. 14 http://www.anglebrackets.org What is MongoDB?  Open Source, by MongoDB, Inc.  Community and Enterprise Editions  Language: c++  Data model: Using BSON (binary JSON)  Replication and Sharding  Azure VMS, PaaS, and SaaS
  • 15. 15 http://www.anglebrackets.org http://docs.mongodb.org/ecosystem/drivers/ • C, C++ • C# • Go • Erlang • Java • JavaScript • Node.js • Perl • PHP • Python • Ruby • Scala
  • 16. 16 http://www.anglebrackets.org  Support and Alerts  Custom Admin Tools  Backup and Recover  Performance Analysis – Slow Query Analyzer  Monitoring and Support
  • 19. 19 http://www.anglebrackets.org What is CouchDB?  Apache Project  Language: Erlang  Data model: Using JSON and REST  Map/Reduce Views and Indexes  Replication  Azure VMs, PaaS, SaaS
  • 20. 20 http://www.anglebrackets.org  Managed, hosted fork of CouchDB  Incremental MapReduce engine  Horizontal scaling & built-in Lucene search  8 committers to Apache CouchDB  13,000+ users  Apache CouchDB features  BigCouch: Horizontal scaling framework  based on Amazon Dynamo paper  Fauxton: Futon replacement  modular CouchDB Web dashboard  live JSON editor with JavaScript hinting 20
  • 21. 21 http://www.anglebrackets.org What is Cassandra?  Apache Project  Language: Java  Data model: Thrift & custom binary  Fast Writes, Memory management  Replication  Azure VMs, PaaS
  • 22. 22 http://www.anglebrackets.org What is Redis?  Open Source  Language: c  Data model: RESP (REdis Serialization Protocol)  Key/Value  In Memory  Persistence via snapshotting or journaling to disk  Azure VMs, PaaS
  • 23. 23 http://www.anglebrackets.org What is Riak?  Open Source  Language: Erlang & C, some JavaScript  Data model: HTTP/REST or custom binary  Key/Value  In Memory  Persistence via snapshotting or journaling to disk  Azure VMs, PaaS, SaaS
  • 24. Replica set hosted on Azure worker roles or virtual machines Replica Set DriverYour Application Replica Sets: High Availability
  • 25. Shards, config servers and mongos (router) hosted on Azure worker roles or virtual machines Key range A-D Sharding: Scalability Key range E-G Key range G-Z Mongos (router)Your Application Config 1 Config 2 Config 3 Mongos (router)
  • 26. 26 http://www.anglebrackets.org Deploying to Virtual Machines  Compared to worker role (PaaS), VM-based replica sets offer more control, as well as more responsibility  MongoDB Installer for Azure is a great learning tool. Not typically used for production deployment.  Puts MongoDB on OS disk instead of attached disk  Limited to 30gb, not performant for writes, Windows-only  http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+- +Windows+Installer  .deploy-mongo.ps1 <node-count> <dns-prefix> <image-name> <password> <location> <pub-settings-file-path> [replica-set- name]  For Linux VM deployment, see tutorial - http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM+- +Linux+Tutorial
  • 27. azure topic verb options Command Line Syntax Overview prompt> account account location account affinity-group vm vm disk vm endpoint vm image service service cert site config download import list show delete start restart shutdown capture create attach detach browse set username password dns-prefix vm-name lb-port target-image-name source-path disk-image-name size-in-gb thumbprint value -v -vv
  • 28. 28 http://www.anglebrackets.org Example: Provisioning a Replica Set azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531- en-us-30GB.vhd" username password -l "West US" -e azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531- en-us-30GB.vhd" username password -l "West US" -e 23 -c azure vm create mongoc9 "OpenLogic__OpenLogic-CentOS-62-20120531- en-us-30GB.vhd" username password -l "West US" -e 24 -c azure vm endpoint create mongoc9 27017 27017 azure vm endpoint create mongoc9-2 27018 27018 azure vm endpoint create mongoc9-3 27019 27019 To set up MongoDB, SSH into each instance and: get mongodb binaries and install create db dir start mongod, initialize replica set
  • 29. Automation Support Capabilities • Fully Customize VM with Data Disks and Endpoint Configuration • Automate Virtual Network Settings
  • 32. 32 http://www.anglebrackets.org Conference Scheduler  Attendees can track sessions, vote sessions up and down  Offline Capabilities  IndexedDB  CouchDB VM for Data Storage  Web site hosting the application  Node.js  Grunt
  • 35. 35 http://www.anglebrackets.org Docs - azure.microsoft.com/documentation/
  • 39. 39 http://www.anglebrackets.org Where to learn more Tutorial: Building a multi-tier cloud application on Windows Azure using MongoLab, node.js, and Socket.IO http://msopentech.com/blog/2013/09/18/tutorial-building-multi-tier-cloud-application- windows-azure-using-mongolab-node-js-socket-io/ Tutorial: Using MongoDB, Windows Communication Foundation, OData, and PowerBI to build a Business Intelligence solution on Windows Azure http://msopentech.com/blog/2014/02/19/tutorial-using-mongodb-windows-communication- foundation-odata-powerbi-build-business-intelligence-solution-windows-azure/ Tutorial – Building a Multi-Tier Windows Azure Web application use Cloudant’s Couchdb-as-a-Service, node.js, CORS, and Grunt http://msopentech.com/blog/2013/12/19/tutorial-building-multi-tier-windows-azure-web- application-use-cloudants-couchdb-service-node-js-cors-grunt-2/
  • 40. 40 http://www.anglebrackets.org Where to learn more  MongoDB on Azure VM - http://www.mongodb.org/display/DOCS/MongoDB+on+Azure+VM  Install MongoDB on a virtual machine running CentOS Linux in Azure: http://www.windowsazure.com/en-us/manage/linux/common-tasks/mongodb-on- a-linux-vm/  Install MongoDB on a virtual machine running Windows Server in Azure: http://www.windowsazure.com/en-us/manage/windows/common-tasks/install- mongodb/  Node.js Web Application with Storage on MongoDB (Virtual Machine): http://waweb.windowsazure.com/en-us/develop/nodejs/tutorials/website-with- mongodb-(mac)/  Create a Azure web site that connects to MongoDB running on a virtual machine in Azure: http://www.windowsazure.com/en-us/develop/net/tutorials/website-with- mongodb-vm/
  • 41. 41 http://www.anglebrackets.org Other Resources  Microsoft Open Technologies Blog: http://blogs.msdn.com/b/interoperability  VM Depot: http://vmdepot.msopentech.com  Windows Azure development: www.WindowsAzure.com  SDKs and Command Line Tools:  http://www.windowsazure.com/en-us/downloads/  Windows Azure Training Kit: http://windowsazure-trainingkit.github.com/  Microsoft Web Platform Installer:  http://www.microsoft.com/web/downloads/platform.aspx  Web Matrix  http://www.microsoft.com/web/webmatrix/  Project Kudu  https://github.com/projectkudu/kudu  The application I showed today  https://github.com/axemclion/conference
  • 42. Q&A