How To Build Planet Scale Mobile App in Minutes with Xamarin and DocumentDB

Most mobile apps need to store data in the cloud, and  DocumentDB is an awesome cloud database for mobile apps. It has everything a mobile developer needs, a fully managed NoSQL database as a service that scales on demand, and can bring your data where your users go around the globe — completely transparently to your application. Today we are excited to announce Azure DocumentDB SDK for Xamarin mobile platform, enabling mobile apps to interact directly with DocumentDB, without a middle-tier.

Here is what mobile developers get out of the box with DocumentDB:

Rich queries over schemaless data. DocumentDB stores data as schemaless JSON documents in heterogeneous collections, and offers rich and fast queries without the need to worry about schema or indexes.
Fast. Guaranteed. It takes only few milliseconds to read and write documents with DocumentDB. Developers can specify the throughput they need and DocumentDB will honor it with 99.99% SLA.
Limitless Scale. Your DocumentDB collections will grow as your app grows. You can start with small data size and 100s requests per second and grow to arbitrarily large, 10s and 100s of millions requests per second throughput, and petabytes of data.
Globally Distributed. Your mobile app users are on the go, often across the world. DocumentDB is a globally distributed database, and with just one click on a map it will bring the data wherever your users are.
Built-in rich authorization. With DocumentDB you can easy to implement popular patterns like per-user data, or multi-user shared data without custom complex authorization code.
Geo-spatial queries. Many mobile apps offer geo-contextual experiences today. With the first class support for geo-spatial types DocumentDB makes these experiences very easy to accomplish.
Binary attachments. Your app data often includes binary blobs. Native support for attachments makes it easier to use DocumentDB as one-stop shop for your app data.

Let&;s build an app together!

Step . Get Started

It&039;s easy to get started with DocumentDB, just go to Azure portal, create a new DocumentDB account,  go to the Quickstart tab, and download a Xamarin Forms todo list sample, already connected to your DocumentDB account. 

Or if you have an existing Xamarin app, you can just add this DocumentDB NuGet package. Today we support Xamarin.IOS, Xamarin.Android, as well as Xamarin Forms shared libraries.

Step . Work with data

Your data records are stored in DocumentDB as schemaless JSON documents in heterogeneous collections. You can store documents with different structures in the same collection.

In your Xamarin projects you can use language integtated queries over schemaless data:

Step . Add Users

Like many get started samples, the DocumentDB sample you downloaded above authenticates to the service using master key hardcoded in the app&039;s code. This is of course not a good idea for an app you intend to run anywhere except your local emulator. If an attacker gets a hold of the master key, all the data across your DocumentDB account is compromised.

Instead we want our app to only have access to the records for the logged in user. DocumentDB allows developers to grant application read or read/write access to all documents in a collection, a set of documents, or a specific document, depending on the needs.

Here is for example, how to modify our todo list app into a multi-user todolist app, a complete version of the sample is available here: 

Add Login to your app, using Facebook, Active Directory or any other provider.
Create a DocumentDB UserItems collection with /userId as a partition key. Specifying partition key for your collection allows DocumentDB to scale infinitely as the number of our app users growth, while offering fast queries.
Add DocumentDB Resource Token Broker, a simple Web API that authenticates the users and issues short lived tokens to the logged in users with access only to the documents within the user&039;s partition. In this example we host Resource Token Broker in App Service.
Modify the app to authenticate to Resource Token Broker with Facebook and request the resource tokens for the logged in Facebook user, then access users data in the UserItems collection.  

This diagram illustrates the solution. We are investigating eliminating the need for Resource Token Broker by supporting OAuth in DocumentDB first class, please upvote this uservoice item if you think it&039;s a good idea!

Now if we want two users get access to the same todolist, we just add additional permissions to the access token in Resource Token Broker. You can find the complete sample here.

Step . Scale on demand.

DocumentDB is a managed database as a service. As your user base grows, you don&039;t need to worry about provisioning VMs or increasing cores. All you need to tell DocumentDB is how many operations per second (throughput) your app needs. You can specify the throughput via portal Scale tab using a measure of throughput called Request Units per second (RUs). For example, a read operation on a 1KB document requires 1 RU. You can also add alerts for "Throughput" metric to monitor the traffic growth and programmatically change the throughput as alerts fire.

  

Step . Go Planet Scale!

As your app gains popularity, you may acquire users accross the globe. Or may be you just don&039;t want to be caught of guard if a meteorite strkes the Azure data centers where you created your DocumentDB collection. Go to Azure portal, your DocumentDB account, and with a click on a map, make your data continuously replicate to any number of regions accross the world. This ensures your data is available whereever your users are, and you can add failover policies to be prepared for the rainy day.

We hope you find this blog and samples useful to take advantage of DocumentDB in your Xamarin application. Similar pattern can be used in Cordova apps using DocumentDB JavaScript SDK, as well as native iOS / Android apps using DocumentDB REST APIs.

As always, let us know how we are doing and what improvements you&039;d like to see going forward for DocumentDB through UserVoice, StackOverflow azure-documentdb, or Twitter @DocumentDB.
Quelle: Azure

December 2016 Leaderboard of Database Systems contributors on MSDN

We continue to receive encouraging comments from the community on the Leaderboard. Thank you.
Many congratulations to the top-10 contributors featured on our December leaderboard!

Olaf Helper and Alberto Morillo top the Overall and Cloud database this month. Six of this month’s Overall Top-10 (including all of the top three) featured in last month’s Overall Top-10 as well, and four others are new entrants.

The following continues to be the points hierarchy (in decreasing order of points):

For questions related to this leaderboard, please write to leaderboard-sql@microsoft.com.
Quelle: Azure

Automated Partition Management with Azure Analysis Services

Azure Analysis Services tabular models can store data in a highly-compressed, in-memory cache for optimized query performance. This provides fast user interactivity over large data sets.

Large datasets normally require table partitioning to accelerate and optimize the data-load process. Partitioning enables incremental loads, increases parallelization, and reduces memory consumption. The Tabular Object Model (TOM) serves as an API to create and manage partitions.

The Automated Partition Management for Analysis Services Tabular Models whitepaper is available for review. It describes how to use the AsPartitionProcessing TOM code sample with minimal code changes. It is intended to be generic and configuration driven.

The sample is compatible with Azure Analysis Services. The following diagram shows an example architecture.

Azure SQL Database is used for the configuration and logging database.

Azure Functions is used for execution, and can be triggered in various ways. The following list shows some of the many options available with Azure Functions.

Scheduled using a Timer function CRON expression. In this case, it is not necessary to set up a separate scheduling system.
Using a webhook request for a WebHook function, or an HTTP request for an HttpTrigger function. This allows integration with existing scheduling systems that can call a URL.
Triggered from Azure Queue using built-in integration points in Azure Functions.

Thanks to Marco Russo (SQLBI) and Bill Anton (Opifex Solutions) for their contributions to the whitepaper and code sample.
Quelle: Azure

Azure SQL Data Warehouse: Secondary indexes on column store now available

In Azure SQL Data Warehouse, you can now create secondary B-Tree indexes on column store tables.

Most analytic queries aggregate large amounts of data and are served well by scanning the column store segments directly. However, there is often a need to look for a "needle in a haystack," which translates to a query that does a lookup of a single row or a small range of rows. Such lookup queries can get an improvement in response time in orders of magnitude (even 1,000 times) and potentially run in sub-second if there is a B-Tree index on the filter column.

To create a secondary index on a column store table, follow the same syntax as the generic Create Index Transact-SQL statements.
Quelle: Azure

Can blockchain secure supply chains, improve operations and solve humanitarian issues?

In my last post, I posed the question: What does identity mean in today’s physical and digital world? I was coming off the ID2020 Summit at the UN where we announced our work on blockchain self-sovereign identity. What struck me most was the magnitude of the problems identified and I haven’t been able to stop thinking about solving these already at scale problems ever since. One of the things that Microsoft thinks about when it looks at products is solving problems at scale. It is and has always been a mass market product juggernaut. Yesterday we strove for a vision of “a PC on Every Desk” and today we look to Azure, our hyperscale cloud to solve the world’s productivity problems at scale through massive compute, memory and storage workloads operating at a nice little hum in datacenters that span the globe. But I digress.

The important question is: How do we take this DNA and think about societal problems that already exist at scale? We have proven that most technology in one form or another can perform when architected for scale. But where and how do we start and then how do we penetrate with swarms of adoption to make meaningful impact on society’s greatest problems?

I started to think about where the problem space crosses the corporate and enterprise landscape. What if we can link corporate objectives directly to the problem of child labor? What if we can find businesses that might benefit from the exploitation witnessed and eliminate them? Alas, these approaches are too direct and won’t scale as first steps on this journey.

Another approach would be to look at ways we can back into solving the problems. So I began to think more indirectly about the attack surfaces that corporations operate on where there might be child labor, trafficking or other infractions. If we could identify large attack surfaces in a specific industry that might be a good starting point. This led me squarely to an industry I know very well that has been struggling to evolve ever since Amazon entered their playground: Retailers, Brands, and Ecommerce sites. The landscape gives us an unprecedented opportunity to maximize coverage via a corporate attack surface trifecta:

1. Retailers: think Macy’s, Nordstrom, Best Buy

2. Brands: think Perry Ellis, Nike, Under Armor

3. Ecommerce: Amazon, Tmall, and all of the retail.com variants like Macys.com

The one thing they all have in common is Supply Chain.

Their supply chain ends in the developed world with retail stores to shippers, truck drivers, dock and port workers and their employers. It extends back to overseas warehouses, distribution centers and all of their laborers, whether contracted, full time or part time or temporary workforce. The origin of the supply chain extends all the way back to the factory and local shippers handling the goods.

Take the case of a company like Perry Ellis that is tagging each item of clothing at the manufacturing factory, called source tagging. When a worker hangs a tag on a piece of clothing or sews an RFID tag into a pair of jeans the life of the tracked good begins. Retailers and brands have been evaluating and deploying RFID and other sensor and tracking technology in the Supply Chain and Retail stores for many years. In 2004 I built an RFID Practice at IBM Global Services. That year Walmart demanded all of its suppliers tag their products with RFID.

So, like other blockchain projects, this begs the question, why now? What is so special about this technology that lets us simultaneously add value to Macys.com and Perry Ellis while starting to chip away at one part of the un-identified, trafficked or exploited world population?

I believe the answer lies in a very subtle tweak to the existing tracking systems that are being deployed across the entire retail and ecommerce landscape. What if we could use something like RFID chips and scanners to securely and provably identify every touchpoint of every piece of product all along the supply chain? Why does that add value if we are sort of doing that already?

A little history. The reason tracking tags like RFID are being deployed by brands and retailers is to be able to effectively compete with Amazon.com. What is the single biggest competitive threat a retailer has against Amazon? The answer is a seemingly simple feature on a website:

“Buy Online, Pick up In store”

Underneath what looks like a simple ecommerce site feature lies a very big problem: Inventory Transparency. Retailers cannot effectively invoke this competitive advantage without Inventory Transparency. Retailers cannot achieve Inventory Transparency without RFID or other tracking tags.

RFID systems today simply allow you to track inventory at each waypoint in the supply chain and all the way through the retail store stockroom, floor and checkout. On any given day, you can tell in which part of your supply chain or store replenishment process your product is located. Part of the challenge is that many systems deployed today don’t do a good job providing visibility tracking all the way through the supply chain. This is partly because of siloed tracking systems and databases that live in a multitude of legal entities.

So why is it that even with all of this tracking, there is still a high percentage of lost product due to fraud?

How can a simple identity tweak improve this situation for retailers and brands while simultaneously chipping away at child exploitation?

Enter the trust protocol we call blockchain and specifically blockchain self-sovereign identity. The state change is to plug the holes in your supply chain by identifying and provably tracking every scan at a waypoint by a device or human being operating in your supply chain. This starts with the factory worker who sews the RFID tag into the jeans to the Distribution Center RFID Door reader to the employees or contractors at the DC. It extends to the entities involved, the factory owner, the Contractor that employs the DC contractors, etc. By doing this you create a closed system of verifiably known actors across the supply chain. Blockchain also lets us create a shared single ledger of truth across these independently owned waypoints, driving forward full supply chain inventory transparency. We are using this concept in a number of projects to reduce fraud in other industries. This use case meets my sniff test criteria for blockchain value in a project.

Blockchain can provide value if:

1. There is fraud or lack of trust in the system

2. There are multiple parties to a transaction

This identity tweak takes a corporate system used for tracking goods and transforms it into a system that can reduce fraud, operating costs, and product loss while simultaneously reducing reliance on exploited people, not to mention new opportunities for supply chain financing and insurance.

Should a box of Perry Ellis jeans fall out of the supply chain somewhere, it will immediately be known when it does not reach the next waypoint in the expected time. The forensic investigation will start with the prior transaction that recorded the custody of that item at the prior touch point. A blockchain identity creates the provable record of who last touched the product. This factor holds workers and contracting companies accountable. Reputation gets asserted or attested for that worker and that reputation is rolled up to the Contracting company to create a reputation score for the vendor.

The result is that Supply Chain Contractors will stop hiring unverified or reputationally attested high risk workers. This system of compliance and rating will force Supply Chain workers to be held accountable for their actions therefore reducing fraud (the corporate benefit) while simultaneously requiring a worker to register a self-sovereign identity that travels with them from job to job. This small tweak to existing RFID deployments paid for by corporations will drive undocumented workers from the system over time thus beginning the process of chipping away at the 1.5B undocumented and exploited people identified by the UN’s Sustainable Development Goal 16.9.

Is this the beginning of an opportunity to offer a “Verifiably Clean Supply Chain Certification” for brands, retailers and ecommerce sites? It is certainly achievable technically. My thesis is even if social responsibility isn’t a big enough reason, there are enough financial reasons to move forward. To this end we have launched Project Manifest and made recent announcements with partners like www.Mojix.com and ID2020.  More details in my next post.
Quelle: Azure

Failure Anomalies alert now detects dependency failures

We’ve upgraded Smart Detection – Failure Anomalies so that it monitors your web app’s outgoing dependencies and AJAX calls as well as incoming server requests. If you’re monitoring your app with Application Insights, you’ll be notified within minutes if there’s a sudden disruption or degradation in your app’s performance.

Provided your app has a certain volume of traffic, Smart Detection – Failure Anomalies configures itself. It learns your app’s usual background level of failures. It triggers an alert if the rate of failures goes above the learned pattern. The diagnostic information in the alert can help you fix the problem before most users are aware of it.

Until recently, Smart Detection monitored only failed incoming requests. (Although you can manually set alerts on a wide variety of metrics.) Now, it also monitors the failure rate of dependency calls – that is, calls that your app makes to external services such as REST APIs or SQL databases. This includes both server-side calls, and AJAX calls from the client side of your app.

Here’s a sample of an alert you might get:

This upgrade improves the chances of your finding a fault quickly, especially if it’s caused by one of the services you depend on. You’ll get the alert even if your app returns a non-failure response to your users.

By default, you get a shorter alert mail than this example, but you can switch to this detailed format by selecting “Get more diagnostics…” in Failure Anomalies rule settings:

Quelle: Azure

Collaboration and federation: Azure Service Bus Messaging on-premises futures

Azure Service Bus Messaging is the one of the most powerful message brokers with the deepest feature set available anywhere in public cloud infrastructure today. The global Azure Service Bus broker infrastructure, available in all global Azure regions and the Azure Government cloud, processes nearly 500 Billion message transactions per month. Each cluster in these regions is backed by as many as hundreds of compute cores, Terabytes of memory, and Petabytes of backing storage capacity, far exceeding the cluster deployment scale of any commercial or open source broker you could acquire and run.

As a fully transactional broker that builds on the ISO/IEC standard AMQP 1.0 protocol, Service Bus provides a robust foundation for commercial and financial workloads.It provides strong assurances on message delivery and message retention, with SLA-backed, and sustainably achieved availability and reliability rates unmatched in the industry at its functional depth and scale. The Azure Premium Messaging tier provides performance predictability and further enhanced reliability by exclusively reserving processing resources on a per customer basis inside an environment that provides all the management and cost advantages of cloud scale.

We’re confident to state that Azure Service Bus, delivered from the nearest Azure datacenter over redundant network connectivity, is a choice far superior in terms of cost and reliability to most on-premises messaging cluster installations, even if the core workloads run and remain in an on-premises environment.

Hybrid is the future

The future of hybrid in Azure is twofold. First, we provide world-class services and capabilities with open protocols that can be composed with and leveraged by on-premises services run anywhere. Second, we license the software backing these services for on-premises delivery on top of Azure Stack.

This strategy is also guiding the future for Azure Service Bus Messaging and all other capabilities delivered by the Messaging team, which includes Azure Event Hubs and Azure Relay.

As a consequence, we are announcing today that we will not provide an immediate successor for the standalone Service Bus for the Windows Server 1.1 product. Service Bus for Windows Server 1.1 was shipped as a free download that could be installed inside and outside of the Azure Stack precursor Azure Pack. The product is available as a free download and will go out of mainstream support on January 9, 2018.

While we are continuing to significantly strengthening the commitment to deliver Service Bus, as well as our other messaging technologies, on top of the packaged on-premises Azure technology stack, we will no longer deliver a Windows Server or Windows Client installable message broker outside of that context.

We have come to this conclusion and decision after a careful analysis of market and community needs, trends, and considering what our true technology strengths are.

After decades of monoculture, there has been a “cambric explosion” in messaging platforms. There are many kinds of brokers and messaging libraries that fill many niches. We believe that the breadth of choice customers now have for running messaging middleware on singular special purpose devices, in communication gateways and the fog, on factory floors, in retail stores, in bank branches, inside building control systems, or inside a delivery truck or a container vessel is very, very exciting.

Microsoft Azure’s strengths lay in building and running robust cloud-scale systems that deal with high-volume, high-velocity, consolidated message flows in and through the cloud, via Azure Service Bus Messaging, Azure Relay, and Azure Event Hubs. We believe that “hybrid” also means collaboration and integration to create a “better together” story of a healthy messaging platform ecosystem that fills all the niches across IT and IoT, and that leverages public cloud as a backplane and integration surface.

Microsoft therefore continues to invest in advancing the AMQP and MQTT protocols in OASIS and working with organizations, such as the OPC Foundation, in vertical industries to establish a solid set of choices for messaging protocol standards. Based on that standards foundation, we are looking forward to collaborating with many vendors and communities to build specialized messaging infrastructure, creating federation bridges and integration into and through Azure and Azure Stack. The timeline for availability of our services on Azure Stack will be announced at a future date.
Quelle: Azure

Announcing the availability of Clear Linux* OS in Azure Marketplace

Today, we’re excited to announce the availability of Clear Linux* OS for Intel® Architecture in Azure Marketplace. Clear Linux OS is a free, open source Linux distribution built from the ground up for cloud and data center environments and tuned to maximize the performance and value of Intel architecture.

Microsoft Azure is the first public cloud provider to offer Clear Linux, and we’re really excited about what it means for Linux users in the cloud and the community at large. Here’s a little bit more about the Clear Linux offerings in Azure Marketplace that we are announcing today:

A bare-bones VM, intended to serve as a starting point for those wanting to explore and build out a system with bundles of their choosing
A container image that includes the popular Docker container runtime, and,
A sample solution image for developing machine learning applications, pre-loaded with popular open source tools

In addition to the performance features of Clear Linux, we believe that DevOps teams will benefit from the stateless capabilities of Clear Linux in Azure. By separating the system defaults and distribution best practices from the user configuration, Clear Linux simplifies maintenance and deployment which becomes very important as infrastructure scales. This also pairs well with bundles, a powerful way of distributing software that allows for scenarios like this system update with new kernel and reboot in just a few seconds:

The availability of Clear Linux in Azure Marketplace adds more open source options to the portfolio of teams and organizations that are looking to accelerate business value and increase agility in the cloud, and it’s a testament to our continued focus on great experiences for Linux users in the hybrid cloud.

It also highlights the openness and flexibility of Azure, enabling teams to choose from a wide array of Linux and open source solutions from Marketplace, partner offerings or their own portfolio, and adding value with a rich and powerful set of cloud services, and is an important milestone of the broad collaboration between Microsoft and Intel as we worked together throughout 2016 to bring the Azure Linux Agent to Clear Linux, and collaborated in kernel and system improvements focusing on improving boot times and performance.

“Our team is delighted to have worked with Intel since day one on this project, and to bring Clear Linux to Azure Marketplace and our customers as a result of that collaboration”, said KY Srinivasan from the Enterprise Open Source Team at Microsoft.

Get started with Clear Linux in Azure today by deploying any of the images in Azure Marketplace, and checking out the Documentation on the Clear Linux site. Don’t have an Azure subscription yet? Get started with a free 30-day trial!
Quelle: Azure

Azure Automation available in UK and West Central US regions

Azure Automation is now available in the Azure UK and West Central US regions. These new regions give you more options for locating Automation accounts in geographic locations that work best for you.

You can use Azure Automation to create, monitor, deploy, and maintain resources in your Azure, on-premises, and third-party cloud environments, by using highly scalable and reliable process execution and desired state configuration engines.

To learn more and get started with a free trial, see the Azure Automation overview.
Quelle: Azure

Microsoft Azure Government is First Commercial Cloud to Achieve DoD Impact Level 5 Provisional Authorization, General Availability of DoD Regions

Furthering our commitment to be the most trusted cloud for Government, today Microsoft is proud to announce two milestone achievements in support of the US Department of Defense.

Information Impact Level 5 DoD Provisional Authorization by the Defense Information Systems Agency

Azure Government is the first commercial cloud service to be awarded an Information Impact Level 5 DoD Provisional Authorization by the Defense Information Systems Agency. This provisional authorization allows all US Department of Defense (DoD) customers to leverage Azure Government for the most sensitive controlled unclassified information (CUI), including CUI of National Security Systems. 

DoD Authorizing Officials can use this Provisional Authorization as a baseline for input into their authorization decisions on behalf of mission owner systems using the Azure Government cloud DOD Region. 

This achievement is the result of the collective efforts of Microsoft, DISA and its mission partners to work through requirements pertaining to the adoption of for infrastructure, platform and productivity across the DoD enterprise.

General Availability of DoD Regions

Information Impact Level 5 requires processing in dedicated infrastructure that ensures physical separation of DoD customers from non-DoD customers. Over the past few months, we ran a preview program with more than 50 customers across the Department of Defense, including all branches of the military, unified combatant commands and defense agencies.

We are thrilled to announce the general availability of the DOD Region to all validated DoD customers. Key services covering compute, storage, networking and database are available today with full service level agreements and dedicated Azure Government support.

Dave Milton, Chief Technology Officer for Permuta Technologies, a leading provider of business solutions tailored for the military affirmed the significance of the general availability of the Azure DoD regions, saying:

“Azure Government DOD Regions has given us the ability to deploy our SaaS offering, DefenseReady Cloud, to the US Department of Defense in a scalable, secure, and cost-effective environment. The mission-critical nature of DefenseReady Cloud requires high availability, compliance with DoD’s SRG Impact Level 5 requirements, and scalability to support our customers changing demand, with a flexible pricing structure that allow us to offer capability to large enterprises as well as local commands. With Azure Government DOD Region, we are now able to onboard a customer in weeks, not months, allowing for a time-to-value that is unparalleled when compared with on-premises or other government-sponsored options. Through our partnership, Microsoft provided direct access to product group engineers, compliance support, training, and other resources needed to bring our SaaS solution to DoD.”

These accomplishments and the commentary of our customers and partners further reinforce our commitment to, and the strength of, our long-standing partnership with the US Department of Defense. For more information on Microsoft Cloud for Government services with Information Impact Level 5 provision authorization visit the Microsoft in Government blog, and for more detail on the Information Impact Level 5 Provision authorization (including in-scope services), please visit our Microsoft Trust Center.

To get started today, customers and mission partners may request access to our Azure Government Trial program.
Quelle: Azure