Mobile App Advantages

In this post we can consider the Advantages of Mobile App Feature of App Service.

Offline Storage

The Offline Storage provides data storage during No-Internet times.

Improved Responsiveness

For critical applications which require read/write response within 1 seconds can be achieved through Offline Storage of data helping read/write seamless.

Push Notifications

Azure Notification Hub support for Sending messages to multiple devices/platforms of Android, iOS, Windows etc.

Identity Management

AD Enabled for easier Security Integration

Social Media Integration

Facebook, Twitter Integration for Federated Authentication, Post Integration etc.

Scalability

Multiple devices can be supported through Auto Scale feature.

Staged Deployments

We can do Staged deployments where Production switching is possible through changing IPs

Continuous Integration

Continuous Integration with Visual Studio & Github possible.

Create Mobile App Service

We can create Mobile App Service from below link.

image

Azure Hosting Plans

Azure provides various Hosting Plans with various Hardware & Price mix.  We can select a Plan well suited for our purpose.

FREE Plan – F1

This plan is meant for Development Or Testing purposes.

It has restriction of 60 minutes/day compute.

This is Free!

But the hardware will be on shared basis.

image

image

image

Custom Domains are available with D1 and B1 plans.

Production Plans

Production level hosting plans are starting with S1.

image

S1 supports Auto Scalability up to 10 instances, Traffic Manager etc.

image

image

image

P1v1 supports Auto Scalability up to 20 instances.

image

image

Isolated Plans

These plans runs in their own network in  Single Tenancy mode.

image

image

image

Note

These plan includes the IaaS + PaaS components of hardware, operating system etc.

References

https://azure.microsoft.com/en-in/pricing/details/app-service/windows/

High Availability for Azure Deployments

Following are High Availability strategies while developing Azure Applications.

Multiple Instances

Ensure the application components, services have multiple instances.

Retry Pattern

In case of Transient failures that should not last long, the application should implement a Retry pattern to repeat the invoke and get through the service.

Circuit Breaker Pattern

For prolonged failures, the application should implement Circuit Breaker pattern so that subsequent failures will not hang the application.  Once the failure is resolved, the Circuit Breaker should open the gates back.

Message Broker

Implement a Message Broker for high critical tasks to ensure the tasks in the Queue is definitely processed.

Automate Deployments

Consider using Automated Deployments including for Updates too.

Deployment Slots

Usage of Deployment Slots enable switching between Production & Staging deployments.

Geo-replicate Database

Geo-Replicate the database for higher availability.

Monitoring Systems

Implement proper monitoring systems to track failures, notify on errors, long duration tasks etc.

Disaster Recovery

Create a multi-site recovery plan for mission critical applications.

Deployment Slots in Azure

Deployment Slots enable robust deployment through Production and Staging slots.

The default slot will be Production Slot.

The advantages of Deployment Slot are:

  • Staged Deployment
  • Swapping
  • Incremental Deployment
  • Rolling back Deployment

Staged Deployment

Here were can deploy the application to a non-production slot.  This allows to conduct UAT, QA verifications on the app to ensure it validates for a Production build.

Swapping

Once we verify the app, we can Swap the slots making it as Production.  This operation is so quick that it takes only few seconds.

Incremental Deployment

Step by Step changes are possible after deployment.

Rolling back Deployment

Swapping feature enables to rollback the deployment from production to staging, in case any errors occurs.

Azure Cosmos DB

Azure Cosmos DB provides a NoSQL database in Azure premises.  It is globally distributed, highly available, massively scalable database.  It is an extension of the previous DocumentDB which was used for storing databases.

image

Advantages

Following are the Advantages of Cosmos DB.

Scalability It is horizontally scalable

Globally Distributed It is available from multiple edge server end points reducing latency

Multi-Model It supports document, key-value & graph models

Multi-API It supports sql, mongodb, cassandra, azure table, gremlin apis.

Security It is fully & transparently encrypted

Create Cosmos DB

Open Azure Portal  > Search for Cosmos DB > Use Create Option as below.

image

Enter the details in appearing window.

image

You can access the same from Azure Cosmos DB tab from the left.

image

Development

Clicking on the Quick Start pane will give you the Development Code & Samples.

image

Azure Redis Cache

Azure provides the popular Redis Cache service in all the service plans.

History of Redis Cache

Redis Cache is an Open Source caching framework.  Its popularity among developers made Azure adapt it and available to Azure development platform.

Advatages of Redis Cache

Following are the advantages of Redis Cache:

  1. Highly Scalable Redis Cache can be horizontally scaled based on demand
  2. Low Latency Improved availability through edge servers makes low latency in calls
  3. Highly Secure Redis cache provides better security than traditional caches.
  4. Better Data Structure Redis Cache provides storage of cache as key-value pair as strings, hashes, lists, sets and sorted sets.
  5. Better Atomicity through Transactions feature
  6. Persistence Redis Cache allow persisting data into database.

Creating a Redis Cache

Open Azure Portal and choose Create a resource option.  Search for Redis Cache and you will get the following option.

image

In the appearing window we can specify the cache name.

image

Programming

We can use Redis Cache in application as below:


// Open Connection
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect("YOURCACHENAME.redis.cache.windows.net, ssl=true,password=YOURPOASSWORD”);

IDatabase cache = connection.GetDatabase();

// Create Value
cache.StringSet("mykey", "myvalue");
// Retrieve Value
string value = cache.StringGet("mykey");

Access Keys

You can get the Access Keys from the Azure Portal window.

image 
image 

Summary

In this post we have explored about Redis Cache.