Subscribe: Latest Microsoft Blogs
http://weblogs.asp.net/aspnet-team/rss.aspx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
azure documentdb  azure  code  core  documentdb  emulator  jsonproperty propertyname  local  net core  net  public  scale  write 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Latest Microsoft Blogs





 



NoSQL .NET Core development using an local Azure DocumentDB Emulator

Sun, 04 Dec 2016 03:07:16 GMT

I was hanging out with Miguel de Icaza in New York a few weeks ago and he was sharing with me his ongoing love affair with a NoSQL Database called Azure DocumentDB. I've looked at it a few times over the last year or so and though it was cool but I didn't feel like using it for a few reasons: Can't develop locally - I'm often in low-bandwidth or airplane situations No MongoDB support - I have existing apps written in Node that use Mongo No .NET Core support - I'm doing mostly cross-platform .NET Core apps Miguel told me to take a closer look. Looks like things have changed! DocumentDB now has: Free local DocumentDB Emulator - I asked and this is the SAME code that runs in Azure with just changes like using the local file system for persistence, etc. It's an "emulator" but it's really the essential same core engine code. There is no cost and no sign in for the local DocumentDB emulator. MongoDB protocol support - This is amazing. I literally took an existing Node app, downloaded MongoChef and copied my collection over into Azure using a standard MongoDB connection string, then pointed my app at DocumentDB and it just worked. It's using DocumentDB for storage though, which gives me Better Latency Turnkey global geo-replication (like literally a few clicks) A performance SLA with <10ms read and <15ms write (Service Level Agreement) Metrics and Resource Management like every Azure Service DocumentDB .NET Core Preview SDK that has feature parity with the .NET Framework SDK. There's also Node, .NET, Python, Java, and C++ SDKs for DocumentDB so it's nice for gaming on Unity, Web Apps, or any .NET App...including Xamarin mobile apps on iOS and Android which is why Miguel is so hype on it. Azure DocumentDB Local Quick Start I wanted to see how quickly I could get started. I spoke with the PM for the project on Azure Friday and downloaded and installed the local emulator. The lead on the project said it's Windows for now but they are looking for cross-platform solutions. After it was installed it popped up my web browser with a local web page - I wish more development tools would have such clean Quick Starts. There's also a nice quick start on using DocumentDB with ASP.NET MVC. NOTE: This is a 0.1.0 release. Definitely Alpha level. For example, the sample included looks like it had the package name changed at some point so it didn't line up. I had to change "Microsoft.Azure.Documents.Client": "0.1.0" to "Microsoft.Azure.DocumentDB.Core": "0.1.0-preview" so a little attention to detail issue there. I believe the intent is for stuff to Just Work. ;) The sample app is a pretty standard "ToDo" app: The local Emulator also includes a web-based local Data Explorer: A Todo Item is really just a POCO (Plain Old CLR Object) like this:namespace todo.Models{ using Newtonsoft.Json; public class Item { [JsonProperty(PropertyName = "id")] public string Id { get; set; } [JsonProperty(PropertyName = "name")] public string Name { get; set; } [JsonProperty(PropertyName = "description")] public string Description { get; set; } [JsonProperty(PropertyName = "isComplete")] public bool Completed { get; set; } }}The MVC Controller in the sample uses an underlying repository pattern so the code is super simple at that layer - as an example:[ActionName("Index")]public async Task Index(){ var items = await DocumentDBRepository.GetItemsAsync(d => !d.Completed); return View(items);}[HttpPost][ActionName("Create")][ValidateAntiForgeryToken]public async Task CreateAsync([Bind("Id,Name,Description,Completed")] Item item){ if (ModelState.IsValid) { await DocumentDBRepository.CreateItemAsync(item); return RedirectToAction("Index"); } return View(item);}The Repository itself that's abstracting away the complexities is itself not that complex. It's like 120 lines of code, and really more like 60 when you remove whitespace and curly braces. And half of that is just initialization a[...]



Azure DocumentDB Elastic Scale - Partitioning

Fri, 02 Dec 2016 01:37:17 GMT

DocumentDB collections are logical resources that can span multiple partitions to provide practically limitless scale. In this episode of Azure Friday, Shireesh Thota talks with Scott Hanselman about scaling DocumentDB with a partitioning collection and how best to choose your partition keys to optimize for read and write workloads. Partition management is fully managed by Azure DocumentDB and it is completely transparent to your application, so you do not have to write complex code or manage your partitions.

(image) DocumentDB collections are logical resources that can span multiple partitions to provide practically limitless scale. In this episode of Azure Friday, Shireesh Thota talks with Scott Hanselman about scaling DocumentDB with a partitioning collection and how best to choose your partition keys to optimize for read and write workloads. Partition management is fully managed by Azure DocumentDB and it is completely transparent to your application, so you do not have to write complex code or manage your partitions.


Media Files:
http://video.ch9.ms/ch9/5669/e46db994-a3e6-4c86-8d15-9045efd75669/AzureDocumentDBElasticScalePartitioning.mp4




Visual Studio Tools for Azure Functions

Thu, 01 Dec 2016 15:00:00 +0000

Warning: We have discovered that installing this Preview breaks the ability to create or open .NET Core projects in Visual Studio 2015.  We are currently investigating, and will make a fix available as soon as it is ready.  In the meantime, do not install this on any machines where you plan to work with .NET... Read more



I suck at vacation - What I did this week

Thu, 01 Dec 2016 08:20:09 GMT

Well, it seems I'm lousy at vacation. I'm still learning what I'm supposed to do. My wife is working and the kids are still in school so here was my week.

3D Printed Brackets for my new HTC Vive

I treated myself to an HTC Vive Room-Scale VR system. I'll blog extensively about this later but let me just tell you. It's AMAZING. I've used Google Cardboard, I've used Gear VR, I've used Oculus. Vive is it. Full Room-scale VR with something like the Doom 3 VR Mode is amazing. This fellow has a version of Doom 3 coded up at GitHub that modifies your existing purchased version and adds a REALLY compelling VR experience. I will say spent less time fighting demons and more time looking closely at wall textures. I admit it.

There's a joke about folks who have 3D Printers. We just end up printing brackets to hold stuff.  Well, I got a Vive so I wanted a nice way to mount it. Problem solved.

I dig #3Dprinting because you can make EXACTLY the brackets you need in a few hours!

A photo posted by Scott Hanselman (@shanselman) on

(image)
With Application Logging turned on, you can choose the log level you want and see them in Kudu console, or Visual Studio. (see image below)

(image)

Application Logs in Kudu

This week Damian went over how to use some of the new features in ASP.NET Core 1.1  Preview 1. For more details on ASP.NET Core 1.1 please check out the announcement from last month. Thanks for watching.