Mongo db on azure for developers

Preview:

DESCRIPTION

 

Citation preview

MongoDB on Azure for Developers

Mark Greenway

@markkgreenwaymgreenway@gmail.com

Follow me on twitter now

Beat the rush!!

Gold Sponsors

Platium Sponsors

What we will talk about

Use Mongo db with C#Patterns for data access /

storage

What I won’t cover

Managing serversShardingMassive scaleAbsolutes

Why not cover that?

Dev Team Photo

My Biggest Collection (thus far)

NoSQLNo ACID –PerformanceScaling Simplicity Not Only SQL

http://css.dzone.com/articles/how-acid-mongodb

Mongo itself

Document Database Database

CollectionDocument

Key Value

Single Threaded (its JS!)Server side JS execution

BSON Capped Collections

Offerings

C# Access

demo

Story Time!

Schema

Uptime Robot

www.uptimerobot.com

So That’s how I used mongo on a project

Curveball

Map

Reduce

Finalize

C#

PHP internals person, author of Xdebug; OpenStreetMap and mapping enthusiast. Works as PHP Engineer/Evangelist for MongoDB at 10gen. derickrethans.nl

Normalizing DataFamiliar with this with SQLBenefitsDrawbacksScenario

Author -- Books

De normalizing DataPoint in Time DataThings that will be accessed

togetherTags Join tables

Documents should try to be self sufficient

Embed for Atomicity

{    "_id": {        "$uuid": "419265a2-f31e-7f06-f8be-1b1649c3db8f"    },    "PolicyId": 41662,    "TagId": 33,    "TagName": "Engines",    "d": false,    "l": false,    "CurrentVersion": {        "Filename": "Marine Jan10.xls",        "MD5": "67F6D6C62478F0482B1C1006CD2ABC83",        "C": {            "$date": "2010-01-14T19:22:36.407Z"        },        "Usr": "tbridges",        "ContentType": "application/x-msexcel",        "Uri": "8578",        "uploading": false    },

    "Versions": [        {            "Filename": " Marine Jan10 (1).xls ",            "MD5": "8C53285C42B0D8DCEAEAA63125DC248D",            "C": {                "$date": "2010-02-02T13:31:40.970Z"            },            "Usr": "kcameron",            "ContentType": "application/x-msexcel",            "Uri": "9389",            "uploading": false        },        {            "Filename": "Marine Jan10.xls ",            "MD5": "67F6D6C62478F0482B1C1006CD2ABC83",            "C": {                "$date": "2010-01-14T19:22:36.407Z"            },            "Usr": "tbridges",            "ContentType": "application/x-msexcel",            "Uri": "8578",            "uploading": false        },        {            "Filename": " Marine Jan10(1).xls ",            "MD5": "17975AD7D2375CA0FB02F1CAA067CFCC",            "C": {                "$date": "2010-01-22T15:49:24.500Z"            },            "Usr": "kcameron",            "ContentType": "application/x-msexcel",            "Uri": "8945",            "uploading": false        }    ]

Now With Linq!

C# Access

C# Constructor with Factory

Demo

Web API with SQL

My way - CRUD start

Web API with Mongo

Demo!Side by Side

Giant page of numbersSQL Mongo

Get all Get 1 Create Update Get all Get 1 Create Update1 84 79 257 261 66 49 51 812 81 77 165 157 60 50 46 493 68 68 165 176 53 49 46 474 79 74 254 197 52 47 50 545 87 85 240 302 49 51 48 526 75 62 166 164 50 48 51 467 66 60 162 169 52 47 51 468 80 68 156 191 61 46 48 559 112 69 226 184 85 48 51 48

10 71 66 173 201 50 50 48 47

1 2 3 4050

100150200250300350

Orange SQL - Blue Mongo

Average Percent Faster

Get all Get 1 Create Update

28% 31% 75% 74%

References http://docs.mongodb.org/manual/ 50 Tips and Tricks for MongoDB Developers by Kristina

Chodorow (O’Reilly). Copyright 2011 Kristina Chodorow, 978-1-449-30461-4.

MongoDB Applied Design Patterns by Rick Copeland (O’Reilly). Copyright 2013 Richard D. Copeland, Jr., 978-1-449-34004-9.

MongoDB on Azure for

DevelopersMark Greenway

@markkgreenway

mgreenway@gmail.com

August 11th – 13th 2014Same Place, Same Time

The children who benefit from our camp have medical conditions including arthritis, asthma, cancer, bleeding disorders, gastrointestinal disease, heart disease, and kidney disease. We’ve designed every detail of the camp experience to help our campers leave sickness behind while they’re here.

Extra Time?Name a scenario

normalize vs. de-normalize data

Recommended