This talk concentrates on Microsoft's cloud platform, called Azure. Johannes gives an introduction to the new platform and speaks about its possibilities and limitations. By utilizing the Windows Azure SDK for Node.js he is going to demonstrate a simple JavaScript-driven browser game that bases on Node.js and MongoDB.
27. “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
30. node-mongodb-native
// the normal way
var mongoServer = new MongoServer("localhost", 27017, {});
mongoDb = new MongoDb(MONGO_DATABASE, mongoServer,
{ native_parser: false });
mongoDb.open(function () { });
31. On Azure
var azureMongoEndpoints = new AzureMongoEndpoint('ReplicaSetRole', 'MongodPort');
azureMongoEndpoints.on('topologyChange', function () {
if (mongoDb != null) {
mongoDb.close();
mongoDb = null;
}
var mongoAzureServer = azureMongoEndpoints.getMongoDBServerConfig();
mongoDb = new MongoDb(MONGO_DATABASE, mongoAzureServer,
{ native_parser: false });
mongoDb.open(function () { });
});
azureMongoEndpoints.on('error', function (error) { throw error; }); }
32. Node.js Web Application
with Storage on MongoDB
Tutorial:
https://www.windowsazure.com/en-
us/develop/nodejs/tutorials/web-app-with-mongodb/
34. Node.js on Azure?
› Stable, works like expected
› Often fiddling on the startup scripts
› Installation binaries: slow upload
(a general Azure problem)
› Thumbs up to iisnode
35. MongoDB on Azure?
› Development version (2.1.1-pre-) of MongoDB
› Not recommended for production.
› No Sharding!
› Works stable for me