Chapter 15. Azure Web Service Integration

When Microsoft first announced to the public in late 2008 the concept that it had been working on for years called Azure, the paradigms associated with integrated solutions changed yet again. Azure presents new possibilities that are only now starting to be realized, and in our opinion, Azure represents the beginning of a fundamental shift in how users and organizations interact with applications and data.

What Is Azure?

Internet-scale cloud computing platforms such as Azure provide a full range of functionality to build a plethora of applications: from consumer web- to enterprise-based, all hosted on Microsoft data centers. Supported by (REpresentational State Transfer [REST] and Simple Object Access Protocol [SOAP]), Azure presents a new open standard–based and interoperable environment enabling new application development to run the cloud or enhance existing applications. Because Azure is an open platform–based computing service, developers will find it particularly useful to build and operate web applications and hybrid solutions and to offer cloud computing support for enterprise-based solutions. Azure follows a traditional building block platform format, with several blocks to build upon. Automated and on-demand response for infrastructure management and application troubleshooting makes it a rather handy tool for future web-based computing architecture.

Now applications can be conveniently operated and maintained through provisions of on-demand compute and storage to host, scale, and manage web and connected applications.

Infrastructure management is automated with a platform that is designed for high availability and dynamic scaling to match usage needs with the option of a pay-as-you-go pricing model.

Developers can create their own personal customer offerings by offering the foundational components of compute, storage, and building block services to author and compose applications in the cloud (see Figure 15.1).

Figure 15.1 The Azure services platform.

image

Windows Azure

Windows created a cloud services operating system, Windows Azure, which facilitates the development, service hosting, and service management environment for the Azure Services Platform. Through the operating system, developers and enterprises are powered with on-demand processing power and storage space to host, scale, and manage web applications online within Windows data centers.

Because it is an open platform, Windows Azure intends to support both Microsoft and non-Microsoft languages and environments. This open platform of Azure ensures that developers can quickly and easily create applications running in the cloud through their knowledge of the Microsoft Visual Studio development environment and the .NET Framework. This benefit greatly reduces the need for up-front technology purchases such as servers and switches.

Microsoft SQL Azure Database

Microsoft SQL Azure Database offers highly scalable, on-demand data storage and query processing utility services. SQL Azure Database is constructed on robust SQL Server technologies and Windows Server and therefore provides highly available, secure, standards-based web services.

Users can store unstructured, semistructured, and structured data through SSD capabilities (web-based services). A rich set of integrated services will enable users to perform relational queries, search, reporting, analytics, integration, and to synchronize data with mobile users, remote offices, and business partners.

Microsoft .NET Services

Microsoft .NET Services provide key building blocks needed by many cloud-based and cloud-aware applications. These services represent a collection of Microsoft-hosted, highly scalable, developer-oriented services. Similar to its .NET Framework, the services provide higher-level class libraries that enable developers to focus more on application logic rather than building and deploying their own cloud-based infrastructure services.

At present, Microsoft .NET Services consist of three central components:

• Access control service

• Service bus

• Workflow service

Through the use of industry-standard protocols, .NET services are also accessible to other development technologies for the purpose of interoperability.

Live Services

As shown in the Figure 15.2, Live Services represents various mechanisms to handle user data and application resources within the Azure Services Platform. Developers can develop rich social applications that can connect with more than 450 million Windows Live users. This ability is facilitated by Live Mesh technologies, which actually synchronize user data and web applications, which in turn can be extended to multiple devices.

Figure 15.2 Live Framework.

image

Live Services consists of the following services:

• Identity Services

• Directory Services

• Communication Services

• Presence Services

• Geospatial Services

• Search Services

• Mesh Services

Microsoft SharePoint Services and Dynamics CRM Services

The integration of Microsoft SharePoint and CRM services will aid users in developing stronger customer relationships. Developers using Visual Studio can quickly build applications that make the most of SharePoint and CRM capabilities. A broad range of capabilities encompass the spectrum of On-Premises, Online, and the Azure Services Platform.

Architecting Services for Windows Azure

Windows Azure is an operating system for the cloud; layers and layers of software enable you to run applications across multiple server farms. It can handle many dynamic systems, and the layers and layers of software collectively make an operating system for the cloud.

Windows Azure manages services, not just servers. Tell it what you want, and it will help automate the details and will provide you with what you want exactly as you want it.

Windows Azure frees developers from many platform issues. Developers can concentrate more on business and application logic rather than platform issues.

The service life cycle can be automated by Azure, through its model-driven automation, by which the system manages the allocation and deployment of all services included in the platform.

In addition, the system turns the resources into a shared pool. Users pay only for what they use, and the platform ensures complete service isolation.

To consider your system for cloud services capability, each node needs to be viewed as a cache, and the state has to have the ability to be rebuilt from a predefined configuration. Second, every part of the application needs to have the capability to reinitialize to restart, and there must be no presumptions that the previous local state is available. Third, dynamic configuration changes must be dealt with, and your software must be able to handle these changes.

Fourth, after the services have been installed, they are always running; both upgrades or downgrades and schema changes must be handled by services. Do not assume that the services can be reinstalled. Furthermore, services are built using multiple nodes/roles.

Therefore, your service architecture and the communication paths of elements must be immaculately documented. Lastly, upon successful acquisition of Azure, the service will become very large, and state needs to be carefully managed at a larger scale.

The Azure service life cycle comprises four stages. The goal is to automate the life cycle to reduce the cost and increase the availability of the systems as much as possible.

You, the developer/deployer, do the coding/modeling step, in which new services functionality or upgrades are integrated. In the next step, the desired configuration is implemented, and resources are binded. Then, in a test phase, or run phase, resources are incorporated by the developer/deployer. From there onward, everything else is automated; the Windows Azure platform takes the logical model and maps and deploys it to the actual hardware. In the last step, the service life cycle begins to maintain the goal state by monitoring and reacting to events such as hardware/software failures. Throughout these steps, the developer/deployer is always in control and can stop the process wherever desired. There is always a feedback loop for improvement or upgrade purposes. The goal of this life cycle is to minimize costs as much as possible.

The Azure service model guides the automation services, which are described as distributed entities that are authored and configured by the service developer. The mapping to actual hardware is done at deployment. It is basically a hardware abstraction layer for service developers.

Possibilities with Azure and CRM

Here are some ways to leverage Azure to gather data from various locations (Microsoft Dynamics CRM, Dynamics GP, and other data sources) and better optimize the business process for companies whose assets are distributed.

Example for Companies with Distributed Machinery

Companies that have machinery distributed in various locations are perfect candidates for cloud computing integration with CRM. This technology can enable enterprises to better understand the status of the machines. A piece of machinery owned by your company can have an embedded computer capable of monitoring the status, health, and functionality of the machinery in use and update the SQL Azure services with this data. Your company’s IT service deployers and developers can modify their system requirements to an extent where information such as location, current status updates, life of machinery, wear and tear, and functionality is automatically sent to their Azure .NET services. In case of breakdowns or machinery nearing breakdown or an unhealthy state, the computer embedded in those machines can invoke a business process in the Azure .NET service and, in turn, open a service ticket inside their CRM system. The CRM database can be modified to follow a logical business process in terms of trouble-shooting and fixing unhealthy or broken-down machinery.

Automation is the key to success here.

Real Estate Industry Uses

The real estate industry provides a similar example. When visitors arrive at a place of interest (one/two-bedroom apartment), a small computer unit is present at the entrance. Visitors type in their personal details. This information can be modified accordingly to rendezvous with the real estate agency’s CRM system. The CRM system can be controlled and specifically instructed to automate B2B processes that are invoked to produce such data. Transfer of high-quality data with the lead’s details can be sent back to the real estate agent on-site. Based on this information, the enterprises can concentrate their selling on prospective customers or even give recommendations.

Sample Application

In this demo, we develop a web service, test and debug locally on the development fabric (a configuration of the settings needed for the application, irrespective of the underlying hardware), and deploy it to a cloud.

This is an integration to show the data from cloud computing inside the CRM application. Other asynchronous services can be used to integrate with the CRM system.

Developing the Application

In this section, we create a sample Azure .NET application and deploy it to the cloud services. For demonstration purposes, we will create a notes entity, so that you can offload the notes functions to the remote users:

1. Start Visual Studio 2008.

2. Click File.

3. Click New Project.

4. Select Cloud Services.

5. Select Web and Worker and Cloud Services, and then click OK (see Figure 15.3).

Figure 15.3 Creating a new cloud services project.

image

6. In the ServiceConfiguration.cscfg file, enter the following code:

image

7. In the ServiceDefinition.csdef file, enter the following code:

image

8. In the Default.aspx.cs file, add the following piece of code:

image

9. Create a new control and add the following piece of code:

image

10. Create a new model and add the following piece of code:

image

image

11. Create an ASPX file to upload new notes with the following piece of code:

image

12. Create an ASPX file to upload new notes with the following piece of code:

image

image

Note

Azure SDK is required to view the cloud services project templates.

Testing the Application

This section demonstrates how to use the local cloud emulator to test and debug the Azure services:

1. In Visual Studio, click Debug.

2. Click Start Debugging to launch a website running on your local machine, with the web application.

3. Click the development to view the console status of the application (see Figure 15.4).

Figure 15.4 Development fabric with the console running.

image

Deploying the Application

Once we are satisfied with the functions, we need to deploy to the Azure cloud fabric. In this section, we deploy the application from directly within the Visual Studio environment:

1. In the Solution Explorer, right-click the project name and select Publish (see Figure 15.5).

Figure 15.5 Solution Explorer in Visual Studio.

image

2. It will automatically launch the Azure Services Developer Portal. Select the appropriate project to deploy. Select Deploy, as shown in Figure 15.6.

Figure 15.6 New Azure project.

image

3. Enter the appropriate app package and the appropriate configuration settings. Then click Deploy, as shown in Figure 15.7.

Figure 15.7 Uploading the newly built project.

image

4. Select Run. Then use the link below to test the application functionality (see Figure 15.8).

Figure 15.8 Starting the Azure application.

image

5. When you are happy with the functionality, use the two arrows to move the code into production, as shown in Figure 15.9.

Figure 15.9 Deploying the application, from staging to production.

image

6. Verify the application by browsing to the URL.

Viewing the Analysis of the Application

This is a great feature that enables developers and system administrators to monitor the resource usage of the application. Being able to do so greatly aids system administrators to allocate resources appropriately and to scale the application:

1. Log in to the Azure Services Developer Portal.

2. Click the appropriate project.

3. Click Analytics to view the usage of the application (see Figure 15.10). This helps developers scale the application appropriately.

Figure 15.10 Viewing the performance of the application.

image

Deploying Azure Using IFrames

A common way to integrate the Azure application is by using IFrames (located within the main screen of the CRM) that use the Azure services. To set up this feature in Microsoft Dynamics CRM, complete the following steps:

1. Open Microsoft Dynamics CRM.

2. Click Customizations from the left navigation.

3. Click Customize Entities.

4. Open the Accounts entity.

5. Click Forms and Views.

6. Open the form.

7. Click Add a Tab from the Common Tasks located on the right side.

8. Give it a Name (for example, Azure), and then click OK.

9. Navigate to the new tab created.

10. Select Add a Section, and give it a friendly name (for example, AzureSection). Then click OK.

11. Click the newly created IFrame.

12. Click Add an IFrame with the following properties:

Name: AzureIFrame

URL: http://<SiteURL>/

13. Select the check box for Pass Record Object-Type Code and Unique Identifier as Parameters.

14. Click OK.

15. Click Save and Close to save the form modifications.

16. Click Save and Close to save the entity modifications.

17. Click the Accounts entity, and then select Publish.

Summary

Azure is a new up-and-coming technology that can provide access to data from nearly any location. The most appropriate use of this technology is to gather data from various locations. Consolidate that information to a singular location (for example, the Azure data storage). After the data has been consolidated into a singular location, we can flow that information to the CRM system for further analyses and thus enhance business decision making.

Azure also allows remote applications to have an application proxy layer in the cloud for gathering data from various sources and for making the application available globally.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.80.88