Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Accessing Azure Table Storage in Node.js Applications

Microsoft Azure Storage services provides features of storing NoSQL data in the Table Storage. The Azure Table Storage stores schema-less data using Key/Value pairs. Since the data store is schema-less, we can use Table Storage to store the data for those applications that are designed and targeted to flexible data capture. Although the data is stored as schema-less, it is easy to query the data using simple querying mechanism.

You can consider using Table storage where you need not to use complex joins, stored procedures for any data operations. 

Table Storage and Creating Resource Group and Storage Account


Following are some of the features of Azure Table Storage
  • Table is a collection of entities. These entities does not enforce any schema. This provides a flexibility to store data for different set of properties for entities.
  • Entity is a set of properties. Conceptually we can map an entity with a table row on relational database. The max size of entity in Table is 1 MB.
  • Property is a name/value pair. We can have max 252 user defined properties in entity and along with these there are 3 system properties present in entity. These properties are RowKey, PartitionKey and Timestamp.
  • PartitionKey, this is the key based on which the data in the Table Storage is stored in logical partition. This provides query optimization while retrieving data from table storage.
  • RowKey, is the unique identification of the entity in the table storage.        
To use Azure Storage, we need a Microsoft Azure Subscription. Please visit this link to create a free subscription. Make sure that you read all features and limits of using Azure Free Subscription. Once you have a subscription, login to the portal and you can start using its features.

Using Mongoose Framework to Access Azure Cosmos DB MongoDB API

Cosmos DB is a globally-distributed, multi-model database service on Microsoft Azure. Cosmos DB provides database services like SQL API, MongoDB API, Cassandra, Gremlin for storing NoSQL data.

We can create a Cosmos DB account to create a database and perform Read/Write operations on these databases using various SDKs like .NET, .NET Core, Node.js, JAVA etc. If you are working on  theJavaScript stack for building isomorphic apps using Node.js and other JavaScript frameworks like Angular, Vue.js or libraries like React.js, then you will mostly prefer to use MongoDB database for storing data. 

Most of the isomorphic apps those which are using MongoDB database, uses Mongoose framework to perform CRUD operations on the MongoDB Database. On Microsoft Azure, if you are using MongoDB API database service of Cosmos DB to store data,   there is a support available for Mongoose framework. This provides a similar coding experience of using MongoDB in on-premise applications. 

In this article, we will see how to access Azure Cosmos DB for MongoDB API using Node.js, Express application. Figure 1 explains the application structure

How to Create a Service connection from Azure DevOps to your Azure account

Many a times, we want to deploy our built application to Azure. Such deployment can be done using a service connection from Azure DevOps to Azure.

We may have an Azure account and also an Azure DevOps account created at different times. If both the accounts are created using the same Microsoft account (with same email address) then the authentication and authorization is seamless. In this article, I am going to show you how we can create a service connection to Azure from Azure DevOps even if you have used different Microsoft accounts to create Azure and Azure DevOps accounts.

I am putting a scenario in front of you.

I have an Azure DevOps account named SubodhS66, created using my email address subodhs66[at]hotmail.com. I do not have an Azure account against this account.

My Azure account and subscription named SS-VSTS is against the email address subodhsohoni[at]hotmail.com. I have a Web App Service (PaaS) resource created under this account. The name of that app service is DemoWebApp. It uses the Azure Resource Manager model. The code for this app service is in a git repository in a Team Project named “SSGS EMS” on my Azure DevOps account.

Accessing Azure CosmosDB database using Node.js and Express REST APIs

Last week, I was conducting a session on MEAN Stack. In this training, I taught my students how to access MongoDB in an Express application.

One of the attendees asked me to create a demo on accessing CosmosDB using Node.js apps.

In this tutorial, I will show you the steps to do the same.

CosmosDB is a multi-model, globally distributed database service on Microsoft Azure. It provides NoSQL data storage using Table Storage, SQL API, MongoDB, Gremlin, etc. More information on this can be read here https://docs.microsoft.com/en-us/azure/cosmos-db/introduction. I have also written a post on using Azure CosmosDB with ASP.NET Core and Angular. You can read about it over here https://www.dotnetcurry.com/windows-azure/1395/cosmosdb-webapi-angular-client.

In modern web application development  based on Isomorphic apps (pure JavaScript from Client-to-server e.g. MEAN/MERN Stack), the data storage is preferred as NoSQL data store. On  top of that, if this data store is provided and managed by and on cloud, then such storage services are highly preferred.

Windows Azure Tools v1.4 for Visual Studio 2010

Windows Azure Tools for Microsoft Visual Studio extend Visual Studio 2010 to enable the creation, configuration, building, debugging, running, packaging and deployment of scalable web applications and services on Windows Azure.

The tool is now available as a standalone download as well as via the Web Platform Installer. Microsoft recommends installing Azure Tools using the Web Platform Installer. You can automate the installation with the WebPICmd Command-Line Tool using the AppID: WindowsAzureToolsVS2010.

The latest version of the tools is designed to enable developers to profile Windows Azure applications. Using profiling, you can easily detect performance bottlenecks in your application while it is running in Windows Azure. The latest version also supports the creation of ASP.Net MVC3 Web Roles.

In addition, the Windows Azure tools now support multiple service configurations in the same Windows Azure Project. This is especially useful for managing different Windows Azure Storage connection strings for local debugging and running in the cloud. The tool also supports better validation of Azure projects.

SharePoint 2010 and Azure Free Training

I had recently published a list of SharePoint 2010 Tutorials For Beginners and Intermediate Developers. If you are a developer/architect who is interested in understanding how SharePoint 2010 and Windows Azure can leverage each other, then Microsoft recently released the July 2011 update of SharePoint 2010 & Windows Azure Training Kit. The kit contains twelve modules that include PowerPoint decks, hands-on labs and source code that shows how the SharePoint 2010 platform and Windows Azure platform can work together.

Here are the modules covered in this kit:
  • Windows Azure Development Overview
  • SharePoint 2010 Development Overview
  • Getting Started with Integrating SharePoint 2010 and Windows Azure
  • Integrating Windows Azure Web Services with SharePoint 2010
  • Integrating jQuery, SharePoint 2010 and WCF Services in Windows Azure
  • Integrating Windows Azure in Office 2010 Solutions
  • Using Bing Maps in SharePoint 2010 with SQL Azure and Business Connectivity Services
  • Securing Windows Azure Services for SharePoint 2010
  • Using Windows Azure Blob Storage with SharePoint 2010
  • Azure Hosted Application Design Pattern for SharePoint
  • Using Windows Azure with SharePoint Event Handlers
  • Using Windows Azure with SharePoint Workflow

Create Social Games in Windows Azure

I recently stumbled upon the Windows Azure Toolkit for Social Games that includes accelerators, libraries, developer tools, and samples that can be used in games created using .NET or HTML5. The goal is to let game developers focus on development instead of operational hurdles. The Windows Azure platform provides game developers with on-demand compute, storage, content delivery and networking capabilities, so they can start with less resources, backend costs and other overheads and then scale up as per the requirement.

If you are curious about what can be possible using the FREE Windows Azure Toolkit for Social Games, check out a new proof-of-concept game called Tankster  created using this toolkit.

HTML 5 Tankster

Microsoft quoted “This game is built with HTML5 and comes complete with reusable server side code and documentation. It also supports a variety of ways gamers can interact with each other, such as messaging, wall posts, and comments; player achievements and game stats are presented on a live leaderboard. After all, what’s a social game without being able to talk a little trash?”"

I think it is a good approach by the Azure team to capitalize on the game dev force which is looking to create games on the Azure platform. The toolkit allows you to quickly get started building new social games in Windows Azure! 

Windows Azure Sample Project - .NET Stock Trader 5 Sample Application

Ask an experienced programmer and he/she will tell you that the best way to learn a new technology is by getting some hands-on experience in it. Microsoft has released a .NET Stock Trader 5 Sample SOA application that is an end-to-end sample application illustrating Windows Azure Platform Cloud Migration and Integration and will give you a good head start as well as demonstrate how to create scalable, connected systems on the cloud, with best practices. The best part is that the application is FREE to download and study.

Here’s a sample screenshot of the application

Azure Architecture

Here are some key features of this application:
  • Highly Scalable, Cloud Connected SOA based on ASP.NET 4.0 and WCF 4.0
  • Windows Presentation Framework (WPF) desktop client
  • Migration of an on-premise application to the Windows Azure Platform
  • Best-practice programming practices for Windows Azure, SQL Azure, .NET and WCF including the use of an n-tier, service-oriented design
  • Can be deployed to a traditional server, Hyper-V private clouds or the Azure public cloud
  • Best programming practices for building high-performance and horizontally scalable applications for the cloud
  • Rich technical documentation that explain how to run and reconfigure the application, distributed caching, load-balancing, failover and much more
  • and

Windows Azure Free Training Videos

If you have been looking out to get some free training on windows azure, then this post is for you. The Windows Azure Jump Start video series is for all architects and developers interested in designing, developing and delivering cloud-based applications leveraging the Windows Azure Platform. Here are the contents of this 12-hour free windows azure video series which can be viewed online or downloaded in WMV, Mp4 or Mp3 format.

Session 01: Windows Azure Overview - This session provides an engaging overview of why the Cloud is such a popular choice for applications, and how the Windows Azure Platform is the best alternative for you and your team.

Session 02: Introduction to Compute - This session deals with options for sensitive data, considerations from a legal and regulatory perspective, and the availability of Cloud resources.

Session 03: Windows Azure Lifecycle, Part 1 - This is Part 1 of a two-part section and covers the following components of the Application Life Cycle: Design, Development, and Deployment.

Session 04: Windows Azure Lifecycle, Part 2 - This is Part 2 of a two-part section and covers the following components of the Application Life Cycle: Testing, Management, Scale and Upgrade.

Session 05: Windows Azure Storage, Part 1 - This is Part 1 of a two-part section and covers the following options for storage as well as ways to access storage when leveraging the Windows Azure Platform: Non-Relational Storage, Relational SQL Azure Storage, Blobs, Drives, RESTful web services, and Content Delivery Networks (CDN).

Session 06: Windows Azure Storage, Part 2 - This is Part 2 of a two-part section and covers the following options for storage as well as ways to access storage when leveraging the Windows Azure Platform: Queues, Tables, RESTful web services.

Session 07: Introduction to SQL Azure – This session provides an introduction to SQL Azure, including Motivation, Architecture, Working with SQL Azure and Sync.

Session 08: Windows Azure Diagnostics - This session walks users through how to perform diagnostics in the Cloud. It covers the Diagnostics Monitor, ways to collect diagnostics data, persisting data in Windows Azure Storage and common usage scenarios.

Session 09: Windows Azure Security, Part 1 - This is Part 1 of a two-part section and walks users through options for Security in the Cloud. It covers the advantages and disadvantages of Role base Identity vs. Claim based Identity and Windows Identity Framework (WIF).

Session 10: Windows Azure Security, Part 2 - This is Part 2 of a two-part section and walks users through options for Security in the Cloud. It covers Access Control Service (ACS) and Shared Access Signatures.

Session 11: Scalability, Caching & Elasticity, Part 1 - This is Part 1 of a two-part section and helps learners understand how to ensure appropriate scalability, caching and elasticity into their applications using the Windows Azure Platform. Achieving linear scale, scaling up vs. scaling out, and choosing VM sizes are covered.

Session 12: Scalability, Caching & Elasticity, Part 2, and Q&A - This is Part 2 of a two-part section and also includes some Q&A discussion covering various aspects of content from the entire course. Approaches to caching and cache storage, as well as the automation of scaling are among the topics covered

Windows Azure Free Training Kit - December

Microsoft recently released an updated version of the Free Windows Azure Platform Training Kit which includes technical content including hands-on labs, presentations, and demos that are designed to help you learn how to use the Windows Azure platform including: Windows Azure, SQL Azure and the Windows Azure AppFabric - for FREE!

Here are some highlights of the training kit

  • Updated demos covering Azure SDK 1.3
  • Hands on Lab for new Windows Azure features such as Virtual Machine Role, Elevated Privileges, Full IIS
  • Introduction to SQL Azure Reporting
  • Managing, Debugging, and Monitoring Windows Azure
  • Deploying and Managing SQL Azure Databases with VS 2010 Data-tier Applications
  • Three sample Training Agendas that cover one-day, two-day, and four-day workshops
  • Many more new HOL’s, presentations and scripts

Download the Windows Azure Free Training Kit

Windows Azure Software Development Kit (September Refresh)

Microsoft recently released a September Refresh of the Windows Azure Software Development Kit. The SDK still remains the same as the one released in June/July, but with a few bug fixes and some additions, including the following:

  • Support for .Net 4 based services
  • Support for IntelliTrace to debug Windows Azure services
  • [Microsoft.WindowsAzure.StorageClient.dll] Application crashes with unhandled NullReferenceException that is raised on a callback thread.
  • [Microsoft.WindowsAzure.StorageClient.dll] MD5 Header is not passed to the Azure Blob Service in block blob uploads

Download the September Refresh of the Windows Azure SDK.

The Windows Azure SDK provides developers with the APIs, tools, documentation, and samples needed to develop Internet-scale applications that run on Windows Azure.

Windows Azure AppFabric SDK V1.0 (July Update)

Microsoft released the updated version of the Windows Azure AppFabric SDK to help developers build on top of Windows Azure AppFabric.

Windows Azure AppFabric is a key component of the Windows Azure Platform. It includes two services: AppFabric Access Control and AppFabric Service Bus.

As quoted by Microsoft

This SDK includes API libraries and samples for building connected applications with the .NET platform. It spans the entire spectrum of today’s Internet applications – from rich connected applications with advanced connectivity requirements to Web-style applications that use simple protocols such as HTTP to communicate with the broadest possible range of clients.

You can download the Windows Azure AppFabric SDK v1.0 here

You can also download the Windows Azure AppFabric Labs SDK – August Update which provides developers with the APIs, tools, documentation, and samples to help developers build applications that use Windows® Azure AppFabric in the Labs environment.

Windows Azure Platform Training Kit Update

Microsoft recently released the latest update to its FREE Windows Azure Platform Training Kit.

Quoted from the site “The Azure Services Training Kit includes a comprehensive set of technical content including hands-on labs, presentations, and demos that are designed to help you learn how to use the Windows Azure platform including: Windows Azure, SQL Azure and AppFabric. The June release includes new and updated labs for Visual Studio 2010.”

Here is what is new in the kit:

  • Introduction to Windows Azure - VS2010 version
  • Introduction To SQL Azure - VS2010 version
  • Introduction to the Windows Azure Platform AppFabric Service Bus - VS2010 version
  • Introduction to Dallas - VS2010 version
  • Introduction to the Windows Azure Platform AppFabric Access Control Service - VS2010 version
  • Web Services and Identity in the Cloud
  • Exploring Windows Azure Storage VS2010 version + new Exercise: “Working with Drives”
  • Windows Azure Deployment VS2010 version + new Exercise: “Securing Windows Azure with SSL”
  • Minor fixes to presentations – mainly timelines, pricing, new features etc.

This training kit also contains Hands On Labs, Presentations and Videos, Demos, Samples and Tools.

Download the Windows Azure Platform Training Kit.

Developing Windows Azure Applications - Security Best Practices

Microsoft recently released a whitepaper on Security Best Practices For Developing Windows Azure Applications

“This paper focuses on the security challenges and recommended approaches to design and develop more secure applications for Microsoft’s Windows Azure platform. Microsoft Security Engineering Center (MSEC) and Microsoft’s Online Services Security & Compliance (OSSC) team have partnered with the Windows Azure team to build on the same security principles and processes that Microsoft has developed through years of experience managing security risks in traditional development and operating environments.”

This paper is intended to be a resource for technical software audiences: software designers, architects, developers and testers who design, build and deploy more secure Windows Azure solutions.

Download Link