software tests with mongodb
TRANSCRIPT
![Page 1: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/1.jpg)
20.03.2012 Dipl.-Inf. (FH) Johannes Hoppe
Getting started with Node.js and MongoDB on MS Azure
®
![Page 2: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/2.jpg)
Hello
01
![Page 4: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/4.jpg)
JavaScript?
![Page 5: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/5.jpg)
As a server side
language?
![Page 6: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/6.jpg)
Executed inside
a database?
![Page 7: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/7.jpg)
For a hardware-
accelerated
3D game?
![Page 8: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/8.jpg)
Hosted on
WINDOWS?
![Page 9: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/9.jpg)
Yes! of course
![Page 11: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/11.jpg)
![Page 12: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/12.jpg)
SDK for Node.js
02
![Page 13: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/13.jpg)
PaaS / IaaS
Visual Studio 2010
Targets .NET, but also and now officially:
Java, PHP, Node.js… MongoDB
platform
Cloud
![Page 14: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/14.jpg)
Event-driven Asynchronous I/O
JavaScript Google V8 engine
Server-side MIT License
![Page 16: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/16.jpg)
What you get › Node.exe
› IISNode (native IIS module)
› NPM for Windows (package manager)
› […]
![Page 17: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/17.jpg)
Live Demo / Windows PowerShell
› New-AzureService helloworld
› Add-AzureNodeWebRole
› Start-AzureEmulator -launch
![Page 18: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/18.jpg)
server.js var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello world!'); }).listen(process.env.PORT);
![Page 19: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/19.jpg)
Azure SDK for Node.js
Troubleshooter
![Page 20: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/20.jpg)
Tricky Emulator › Webinstaller: Decide for IIS Express
› Start PowerShell with Admin Rights
![Page 21: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/21.jpg)
Tricky Emulator › Check the Windows Event log
› Last resort: start node.exe manually
![Page 22: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/22.jpg)
Deployment / Windows PowerShell
› Get-AzurePublishSettings
› Import-AzurePublishSettings filename.publishSettings
› Publish-AzureService -name UniqueName -location "North
Europe" -launch
![Page 23: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/23.jpg)
Node.js Web Application Tutorial:
http://www.windowsazure.com/en-
us/develop/nodejs/tutorials/getting-started/
![Page 24: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/24.jpg)
MongoDB
03
![Page 25: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/25.jpg)
“Microsoft has been working with 10gen
to provide MongoDB database
integration for Windows Azure,
including deployment packaging,
documentation, and code samples.” MSDN, December 2011: http://msdn.microsoft.com/en-us/library/gg441573.aspx
![Page 26: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/26.jpg)
http://downloads.mongodb.org/azure/
AzureMongoDeploymentCmdlets.msi
![Page 27: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/27.jpg)
PowerShell › Only once: Get-AzureMongoDBBinaries
› New-AzureService helloMongo
› Add-AzureMongoWorkerRole
› Join-AzureNodeRoleToMongoRole WebRole1
› npm install mongodb
![Page 28: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/28.jpg)
Node.js Web Application
with Storage on MongoDB Tutorial:
https://www.windowsazure.com/en-
us/develop/nodejs/tutorials/web-app-with-mongodb/
![Page 29: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/29.jpg)
TODO!
![Page 30: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/30.jpg)
![Page 31: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/31.jpg)
Questions?
![Page 32: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/32.jpg)
Thank you! Johannes Hoppe
![Page 33: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/33.jpg)
Next Speaking Engagements › 12.04.2012 – .NET UG Niederrhein: AOP / .NET
› 10.05.2012 – .NET UG Karlsruhe: NoSQL / .NET
› 14.05.2012 – .NET Developer Conference (DDC)
Nürnberg: NoSQL / .NET (2 talks)
![Page 34: Software Tests with MongoDB](https://reader033.vdocuments.site/reader033/viewer/2022052523/5557d5d2d8b42af2178b4d8d/html5/thumbnails/34.jpg)
Picture credits
wave © THesIMPLIFY – Fotolia.com
Stressed businessman © Selecstock – Fotolia.com
Ausgewählter Ordner © Spectral-Design – Fotolia.com
Warnhinweis-Schild © Sascha Tiebel – Fotolia.com
Liste abhaken © Dirk Schumann – Fotolia.com