That post will not be about “The Shard” building in London but as the building it will be something about scale, “Sharding” well it’s a DB architecture or technique of horizontal partitioning data between servers to provide application scale-out. As every technique has good pros and cons and there are already some implementations, and guess what using federation of Windows Azure SQL Databases you can build that architecture on Azure platform . There is a great article “How to Shard with Windows Azure SQL Database” on Technet Wiki which explains in details all benefits and challenges around that area. Happy reading and/or happy “sharding” !
The article is also published on http://msdynamicsworld.com
If you are using Windows Azure, then you have probably noticed huge amount of recent changes. We have a new portal which looks and functions very nicely, more IaaS, and a lot of extended capabilities.Scott Guthrie published a summary article on his blog about new Azure 2.0 that is worth a look.
Let’s than start with another part of Windows Azure that might be a very helpful for those of us working in Microsoft Dynamics world, the “Worker Role”. (You can see our previous explorations on routing orders and brokered messaging also.) It sounds very mysterious but it’s actually simple and powerful at the same time. Worker roles are applications that are developed to run asynchronously and to work on long-running or perpetual tasks independent of user interaction or input. I would definitely compare them to the older (before cloud era ) “Windows Service” . The beauty of the worker role comes also with interoperability – a worker role can host almost any type of application including Java-based, Apache Tomcat, .NET of course, even WCF web services.
But enough theory let’s present our…
Company XYZ is adding more and more customers and they need to perform more and more periodic jobs. Two of these jobs in particular are consuming a lot of resources. One is generation and transfer of invoices and the other is monitoring of their SLA’s (Service Level Agreements).
Generation of invoices seems like a pretty simple job, but our company has many to prepare and they are generated as PDF files. That process happens only during the last two days of every month. In the old days they would have needed to invest in a new server to perform that task effectively and the server would be fully utilized over those two days only. Now they have access to the Windows Azure platform and worker roles. The worker role is designed to execute long-running processes. It can connect to their Dynamics CRM systems, generate PDF files, and attach those PDFs to emails or SharePoint libraries.
And because a worker role uses the same principle as other Azure Services, it can be scaled on demand. Combining the strength of the Windows Azure Diagnostics API and the Service Management API makes really easy to implement custom logic for auto-scaling Azure Services. That means Company XYZ will pay only for effective usage of compute when they will need it. And if suddenly the number of invoices increases, they will be able to handle that very quickly without ordering and waiting for new hardware.
The worker role comes in very handy for all sorts of monitoring type activities. Usually in the Dynamics CRM world all kind of SLAs are handled by workflow and that works quite well usually. But workflows have some limitations when it comes to quick, scalable behaviour, and also it is difficult to run workflows across multiple instances of Dynamics CRM. For that reason, XYZ invested in one central, scalable SLA monitor in an Azure worker role that monitors not just Dynamics CRM cases, but also other systems.
Worker roles can be very handy for Dynamics CRM implementations and other business applications that require periodic activities and reliable background processes. They provide effective scalability, very good elasticity, and full control over background processes. Yet again, Azure plus Dynamics CRM 2011 prove to be good match
The XRM User Group will host a very interesting webcast which some of the Azure & MS CRM enthusiasts will like it, see description from their website
Shan McArthur will discuss some of the highlights of the important changes made to Windows Azure in the 2012 spring wave and how you can leverage some of the new changes in your CRM environment.
Focus will be on Azure Web Sites and the new deployment model for your xRM Portals or extensions as well as Azure Virtual Machines where you can set up development or demo CRM environments running in the cloud.
Link to Meeting
Yes, it’s today and it’s new, fresh and it’s better well I could write the long blog post about it (I’ll probably write some posts about new servicves ) but Scott Guthrie already did a great post about it so please go and read and enjoy http://weblogs.asp.net/scottgu/archive/2012/06/07/meet-the-new-windows-azure.aspx .
The article is also published on http://msdynamicsworld.com
After a long break it’s time for the next part of this series on connecting Dynamics CRM with Windows Azure. In the last article I presented the “brokered” messaging pattern. Now I’d like to show you a somewhat more advanced messaging pattern; but let’s start with the business problem.
Our favourite company XYZ is still using Microsoft Dynamics CRM Online, but now they have acquired another company that has Dynamics CRM 2011 on-premise. They also have more business partners who can fulfil their orders. XYZ wants still leverage Windows Azure as it’s already been proven for providing secure and reliable cross-boundary communication.
The situation looks a bit more complex – we have at least 2 Dynamics CRM systems that are “publishing” orders and we have few business partners who are waiting for orders. That situation should drive us to use a very common and powerful messaging pattern called publish/subscribe.
A bit of theory: Publisher/subscribe is a pattern whereby senders of messages do not send anything directly to specific receivers, but instead they publish message and subscribers express interest in those message and only receive messages that are of interest, without knowledge of the exact publishers. The diagram bellow shows how we can implement the pub/sub pattern using Windows Azure component:
In the previous example we had queues and each message was consumed by a single consumer. Now we can have one-to-many communication. Messages are sent to a topic and delivered to one or more associated subscriptions depending on filter rules defined on a per-subscription basis. The subscriptions can use additional filters to restrict the messages that they want to receive. A topic subscription is a virtual queue that receives copies of the messages that are sent to the topic.
Enough theory, let’s go back to our case diagram below shows real live example of Dynamics CRM 2011 + Azure leveraging the pub/sub pattern:
Two publishers send orders to the queue. Then the router (worker role) picks them up and assigns additional properties. Those properties are leveraged then by filter rules that define where a particular message should be delivered. In our case, we want to dictate to which business partner we want to send an order. That’s why we need this additional queue and one worker role to act as a router/marker to set additional properties and reroute the message.
Let’s review the benefits summary of what we achieved:
- Great scalability;
- Many-to-many communication;
- Secure and reliable cross-boundary communication;
- Lowered coupling – The publisher is not aware of the number of subscribers, of the identities of the subscribers;
- Improved security – The communication infrastructure transports the published messages only to the applications that are subscribed to the corresponding topic.
As disadvantage, I’d point that this pattern is a bit more complex and requires a bit of deeper understanding what’s happening , also with pub/sub we don’t have any confirmation that a message has been delivered – we assume someone is listening somewhere.
We’ve only really scratched the surface of the publisher/subscribe in this article and that is really the goal of that series – to encourage people to start using these great available architectural patterns with MS CRM 2011 and Windows Azure