In my previous article I gave you an overview of Azure Functions and discussed about the benefits of the Azure Functions. With this session I will cover you with necessary steps to create an initial basic functions app.

Getting Started:

Login to Azure Portal, you will see Function Apps section in the left menu. This is where all your Function Apps will be listed, once you login.

Using the Functions –> Integrate section we can configure Input, Output parameters and Schedule Timers, to make it available as a WebAPI methods. You can call this functional logic from another application to invoke as a web API call by passing necessary inputs, to start another functional process.

One example for this scenario would be to invoke a Database record archival call after completion of an order. This is will be applicable in case we choose the scenario WebHook + API during the creation of your functional logic.

That’s all for now for this topic. I will cover more details about WebHook + API in next series.

Please share your comments and rate this article to help me understand areas of improvement.

Azure Functions is a new cloud solution from Azure that would let you execute small pieces code or “functions” in the cloud. This means you do not have to worry about the infrastructure or environment to execute your little piece of code to solve any of your business problems.

Functions can make development even more productive, and you can use your development language of choice.

Benefits:

Pay only for the time your code runs and trust Azure to scale as needed.

ServiceBusTopicTrigger – Connect your code to other Azure services or on-premises services by subscribing to topics.

TimerTrigger – Execute cleanup or other batch tasks on a predefined schedule.

Integration Support with other Azure Services:

Following are the services integration supported by Azure Functions app.

Azure Cosmos DB

Azure Event Hubs

Azure Mobile Apps (tables)

Azure Notification Hubs

Azure Service Bus (queues and topics)

Azure Storage (blob, queues, and tables)

GitHub (webhooks)

On-premises (using Service Bus)

Twilio (SMS messages)

Costing:

Azure functions will be charged based on two pricing plans below:

App Service Plan – if you already have an Azure App Service running with Logic, Web, Mobile or Web Job, you can use the same environment for your Azure functions execution without needing to pay for extra resources. You will be charged based on regular app service rates.

Consumption plan – with this plan you only need to pay for how long and how many times your functions runs and computational needs/resource usage during that execution time. Consumption plan pricing includes a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption per month.

This Microsoft program will help you to learn necessary skills from cloud storage and databases to Hadoop, Spark, and managed data services in Azure. Curriculum of this program involves learning how to build big data solutions for batch and real-time stream processing using Azure managed services and open source systems like Hadoop and Spark.

Are you intend to pursue a Data Analytics career, this is the right program for you to gain necessary insights.

Thistrack provides you necessary skills to get started with Advanced Front End development using HTML5, CSS3, JavaScript, AngularJS and Bootstrap. At the end of the curriculum you will become master in Front End Development with all predominant modern web technologies.

So if you are a front end UI developer, this is something you can try out to enhance your skills.

Track detail

Each course runs for three months and starts at the beginning of a quarter. January—March, April—June, July—September, and October —December. The capstone runs for four weeks at the beginning of each quarter: January, April, July, October. For exact dates for the current course run, please refer to the course detail page on edX.org.

In my previous article we discussed about setting local development environment using Cosmos DB Emulator for Windows. With this part 2 of the article, we will cover developing, debugging and integration related aspects of using Cosmos DB Emulator.

Developing with Cosmos DB Emulator

Once you have Cosmos DB emulator installed and running on your machine, you can use any supported Cosmos DB SDK or Cosmos DB REST API to interact with emulator. This process is same as you are using a Cosmos DB cloud service.

Cosmos DB Emulator also provides a build-in visual explorer through which you can view,create and edit collections and documents.

Before you integrate Cosmos DB SDK or Cosmos DB REST API you would need to generate master key for authentication. Unlike cloud service, Cosmos DB emulator only support single fixed account and master key. You would not be able to communicate with Emulator without this master key.

PS: This key is only to be used in Emulator. You cannot use the same key for Production(Cosmos DB Cloud Service).

Furthermore, if you want to set your own key. You can go to command line references and run DocumentDB.Emulator.exe with sufficient command switch to set your own key. Remember it should meet the key security requirements. See command-line tool reference for more information.

In the above code block we are directly embedding endpoint, key in the source code.But as a suggested approch keeping in mind to easily point to production service would be maintain the key in Web.config appSettings.

Add NuGet reference to Microsoft.Azure.DocumentDB (always use the latest version of the library)

For the ease of this article, I am going to use the existing ToDoList sample from DocumentDB Samples provided by Microsoft. You can originally find the same source from C:\Program Files\DocumentDB Emulator\Packages\DataExplorer\quickstart.

Copy and Unzip DocumentDB-Quickstart-DotNet.zip and open todo.sln in Visual Studio 2017 and your solution structure will look like below:

Now run the application in your Visual Studio.

1. You will see an initial screen:

2. Click on Create New:

3. New record will be added to your Azure Cosmos DB Emulator:

4. To verify in Cosmos DB emulator now open Cosmos DB explorer, click on Collections and Select ToDoList

Azure Cosmos DB is a multi-API, multi-model highly scalable NoSQL database services from Microsoft Azure platform. In order to develop an application consuming Azure Cosmos DB requires an azure live subscription or emulator in your local machine.

The Azure Cosmos DB Emulator provides a local development/test environment for Azure Cosmos DB development purposes. Using Azure Cosmos DB Emulator, you can develop and test your application locally, without needing an azure subscription or without subscription costs.

With this article I am going to take you through necessary steps and requirements to set up your local environment.

1. Pre-Requisites:

Azure Cosmos DB emulator has the following software and hardware requirements:

Software requirements

Windows Server 2012 R2, Windows Server 2016, or Windows 10

Minimum Hardware requirements

2 GB RAM

10 GB available hard disk space

2. Installation:

Download Azure Cosmos DB Emulator (DocumentDb.Install.msi) **do not get confused by the name. Azure Cosmos DB is a super set of Document DB, and the DocumentDb emulator they tweaked a bit to support Cosmos Db.

Install DocumentDb.Install.msi

Additionally Azure CosmosDB emulator can be run on Docker for Windows. After installing Docker for Windows, you can pull the Emulator image from Docker Hub.

docker pull microsoft/azure-documentdb-emulator

3. Start/Launch Azure Cosmos DB Emulator:

After some time you can see the emulator started. When the Azure Cosmos DB emulator launches it will automatically open the Azure Cosmos DB Data Explorer in your browser.

Since the Azure Cosmos DB Emulator provides an emulated environment running on a local developer workstation, there are some fundamental differences between the emulator and an Azure Cosmos DB account in the cloud:

The following table is also helpful in determining when to use Cosmos DB Emulator and when direct cloud service. Depending on the choice of requirement, you would need to use associated services efficiently.

Cosmos DB Emulator

Cosmos DB Cloud Service

Supports only a single fixed account and a well-known master key. Key regeneration is not possible.

Supports multiple accounts and different master keys. You can regenerate keys any time from Azure Portal.

With my earlier article Azure in China, it came in to my interest to look for any other country/region specific independent cloud data center requirements. I came across Azure for US Govt(Similar to Amazon Govt Cloud) instance and Azure Germany data center. For this article context I will be covering only Azure in Germany.

What is Azure Germany?

Just like regional regulatory requirements in China, Germany also wanted a completely locally owned/managed Azure Data Center for EU/EFTA/UK requirements. This is also to ensure stricter access control and data access policy measurements. This approach is to enable organizations doing business in EU/EFTA and UK can better harness the power of cloud computing.

All customer data and related applications and hardware reside in Germany

Geo-replication between datacenters in Germany to support business continuity

Highly secured datacenters provide 24×7 monitoring

It meets all Public sector or restricted industry requirements

Follows all Compliance requirements for EU/EFTA and UK.

Lower cost, locally accessible within your business locations in Germany/EU.

“ Azure Germany is an isolated Azure instance in Germany, independent from other public clouds.”

Who controls it?

An independent data trustee controls access to all customer data in the Azure Germany datacenters. T-Systems International GmbH, a subsidiary of Deutsche Telekom and an experienced, well-respected IT provider incorporated in Germany, serves as trustee, protecting disclosure of data to third parties except as the customer directs or as required by German law.

**Even Microsoft does not have access to customer data or the datacenters without approval from and supervision by the German data trustee.

What Compliance?

Azure Germany has an ongoing commitment to maintaining the strictest data protection measures, so organizations can store and manage customer data in compliance with applicable German laws and regulations, as well as key international standards. Additional compliance standards and controls that address the unique role of the German data trustee will be audited over time. Refer to:Microsoft Trust Center compliance.

“In learning you will teach, and in teaching you will learn.” -Phil Collins

About

Nithin Mohan – A passionate hardcore application programmer, software architect, and technology evangelist with over 13 years of experience in Web, Mobile, and Cloud applications design and development.
A hardware geek, a kick-starter, and a quick learner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. This blog is to share knowledge, tips & tricks on software development using Emerging Technologies. Thanks to the readers and sincere thanks to all author's of crossposted blogs. Blog is powered by theme gitsta, customized for this blog. Enjoy reading the blog and subscribe to the RSS feed.