CosmosDB Graph Read optimization with ReadDocument

One of the interesting things that caught my eye in the newly released 0.3.0-preview SDK was the .limit() step optimization.
Like we saw in one of my older posts, limit() was executed client side, so you’d get the entire result set from the server and the client side sdk would filter and return it back to caller.

Read More

Share Comments

CosmosDB Graph gremlin tips

After fiddling with the requests for inserting data using Gremlin, I decided to check on some other common calls and I was not super impressed with the results.

Read More

Share Comments

CosmosDB Graph Read optimization with ReadDocument

Like we saw before, you can use the DocDB API or Gremlin interchangeably for inserting data, and you can also do the same for reads. Complex queries or traversals will still need Gremlin, but for simple reads you could (and probably should) use the DocDB API - and by simple reads, I mean reads where you know the ParititonKey and the Id of the node you need to retrieve.

Read More

Share Comments

Imagine a database system...

Imagine a database system…
… where you don’t need to define a schema ahead of time. Which means you don’t need to worry about schema migrations or syncing your data models.

Imagine a database system…
… that is globally available by design and you can enable it in a matter of minutes with a few clicks.

Imagine a database system…
… that is elastically scalable by design and in near real-time. You pay for what you need, when you need it without spinning VMs up and down.

Imagine a database system…
… that is fully managed, on the best cloud out there, so you don’t ever need to worry about infrastructure and everything that comes with managing that infrastructure

Imagine a database system…
… that supports multiple data models (relational, table, graph, document) so you don’t ever have to compromise on one type, or have to use multiple databases for your needs.

Imagine a database system…
… that supports multiple APIs for manipulating your data. You can choose from a number of Apis like the familiar SQL, DocumentDB or MongoDB, Gremlin, Table API or even Cassandra.

Imagine a database system…
… that has 5 consistency levels that are easy to understand and define. Break away from just Eventual or Strong consistency of the other distributed database offerings out there.

Imagine a database system…
… that has single digit millisecond latency performance and availability guarantees backed by an SLA at the 99 percentile

If you got excited imagining… imagine no more, CosmosDB is here and it’s everything you’ve ever wanted from a database! Check it out today!

Share Comments

Getting a list of VM SKUs with Powershell

I was working on an ARM template the other day for deploying an ElasticSearch cluster on Azure. One of the things I needed to decide on was the SKUs of the VMs in the cluster. I knew I wanted a Linux machine but I wasn’t familiar with the SKU Names that I had to enter.

Read More

Share Comments

Build 2017 Day 1 Keynote notes

Part 1 - Introduction

Timeless values and principles

  • Empower people
  • Inclusive design
  • Build trust in technology

Microsoft mission

Empower every person and every organization on the planet to achieve more.

The Numbers

500 MM Windows 10 devices
100 MM O365
140 MM Cortana users

Read More

Share Comments

Xamarin DevOps event Toronto

Calling all Xamarin developers and enthusiasts. Microsoft and Xamarin is organizing a Xamarin developer event here in Toronto. Members of the Xamarin team form San Francisco are in town and will be delivering presentations and end-to-end mobile devops with Xamarin Mobile Lifecycle Solution

If you’re at all involved with Mobile app development with Xamarin you should definitely try to make it as I’m sure this will be a jam-packed information event.

You will likely find me in the attendance if you want to chat. Below you can find the event details and registration options.

Date: Thursday 13th April 2017
Time: 10:00AM to 1:00PM (EST)
Event Location: Microsoft Toronto Office, Suite 1201, 222 Bay Street, Toronto, ON, M5K 1E7
Registration: Spaces are limited, so please email Catherine Kerr with your name and contact details at your earliest

See you there!

Share Comments

BotFramework v3 emulator

I just upgraded one of my older bots to v3 and I have to embarrassingly admit it took me way too much to figure something out.

All v3 bots, unlike the v1 bots get an AppId and Password that you need to set to your configuration file so it can communicate with the online bot. This is also true for the bots you deploy on the new Azure Bot Service

1
2
3
4
5
<appSettings>
<!-- update these with your appid and one of your appsecret keys-->
<add key="MicrosoftAppID" value="7346****8c7f8270bf63" />
<add key="MicrosoftAppPassword" value="g***B" />
</appSettings>

However, once you add those values in your config, you might notice that your bot no longer works in the emulator, returning an 500 Internal Server Error exception.
Here’s how to fix that:

Read More

Share Comments

RenderTargetBitmap in action

I recently talked about some techniques to use RenderTargetBitmap to generate images for your live tiles. Today, we’ll look at some code that goes along with that.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public static async Task SaveTileImage(UIElement control)
{

var element = (Border)XamlReader.Load("<Border xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'/>");
element.Child = control;

var bitmap = new RenderTargetBitmap();
await bitmap.RenderAsync(element);

var renderSize = new Size(bitmap.PixelWidth, bitmap.PixelHeight);
var pixelBuffer = await bitmap.GetPixelsAsync();
var encodedBuffer = await EncodeBuffer(pixelBuffer.ToArray(), renderSize);

await SavePixelsToFile(encodedBuffer, Tile_Wide_100_Name, Tile_Wide_100_Size);
await SavePixelsToFile(encodedBuffer, Tile_Wide_400_Name, Tile_Wide_400_Size);
}

Read More

Share Comments

Using RenderTargetBitmap

RenderTargetBitmap is a very useful UWP class if you are looking to render a piece of XAML to an image.

Some use cases that come to mind are saving a signature from an InkCanvas or maybe even more common to generate an image for a live tile.

The visual tree

One of the most important prerequisites is that the control you are trying to render is part of the Visual Tree. That means that you cannot just instantiate a UIElement and pass it in to the RenderTargetBitmap, but rather you need to pick it up directly from the page. That is easy enough when you’re rendering an image when your app is in the foreground but becomes a bit more tricky when you are rendering the image in your background task.

Read More

Share Comments