<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Azure, SQL and all things Microsoft</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/neerajjoshi/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/neerajjoshi/feed.xml</link>
    <description>This blog is an attempt to talk about Azure, SQL and related Microsoft technologies.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:41:32 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Milliman – Expanding the Integrate™ Cloud Solution with BI and Reporting in the Cloud</title>
      <link>https://docs.microsoft.com/archive/blogs/neerajjoshi/milliman-expanding-the-integrate-cloud-solution-with-bi-and-reporting-in-the-cloud</link>
      <pubDate>Mon, 13 Jul 2015 08:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Neeraj A Joshi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/neerajjoshi/2015/07/13/milliman-expanding-the-integrate-cloud-solution-with-bi-and-reporting-in-the-cloud/</guid>
      <description><![CDATA[A former colleague and personal friend, Paul Maher - CTO of Integrate &amp; MG-ALFA at Milliman has...]]></description>
      <content:encoded><![CDATA[<p>A former colleague and personal friend, Paul Maher - CTO of Integrate &amp; MG-ALFA at Milliman has been working extensively on expanding their solution with BI and Reporting on Azure. <a href="https://www.milliman.com/?rb">Milliman</a> is a great example of a company utilizing Cloud in a &ldquo;BIG&rdquo; way. <a href="https://www.integrate-solutions.com/?utm_source=milliman&amp;utm_medium=website&amp;utm_content=hp-ad&amp;utm_campaign=integrate">Integrate</a>, an end-to-end, revolutionary cloud-based system for the life insurance market, has been built on the Microsoft Azure platform and reimagines the relationships between people, process and technology. Integrate clients are able to run large actuarial jobs on-demand year round, benefiting from the Azure platform&rsquo;s scale and extensibility in a pay-as-you-go business model.</p>
<p>In this post, you will hear from <strong>Paul Maher, CTO - Integrate &amp; MG-ALFA at Milliman</strong>, on the work his team are doing as they expand Integrate to include BI and reporting in the Cloud.</p>
<p>&ldquo;In 2014, we expanded Integrate to include a new product called Data Management. Data Management provides input data preparation and management, actuarial reporting, and extraction of actuarial data to support the financial reporting process.</p>
<p><strong>Data Preparation, Processing, and Reporting</strong></p>
<p>Integrate Data Management is built using Azure Data Factory and Azure HDInsight, a Hadoop-based cloud service, used to fulfill data preparation and processing requirements. We are also evolving the reporting capabilities of Integrate to provide a feature-rich and immersive experience for our clients. For example, we are evaluating Microsoft Office 365 and Power BI for new reporting functionality.</p>
<p>Azure Data Factory is a cloud service that orchestrates, manages, and monitors the integration and transformation of structured and unstructured data from on-premises and cloud sources at scale. By using Azure Data Factory, we were able to meet our go-to-market plans by providing a rich and reliable platform to manage Azure HDInsight jobs. Without this new integration, we would have had to build the service itself at great time and expense.</p>
<p>Data Management is leveraging Azure Data Factory to create workflows or pipelines that integrate and transform data from multiple sources for reporting. Integrate Data Management sends structured and unstructured input data through Azure Data Factory to a compute grid that is distributed across multiple Azure data centers. This provides high levels of scalability and redundancy. Integrate Data Management also ensures strong security and privacy.</p>
<p>Simplifying data input was a major goal of Integrate Data Management, because pulling multiple types of data together from diverse sources across the enterprise could be time-consuming and challenging. After we run our data model in the cloud, it generates terabytes of information. Our clients get great value from the aggregation of the data, so we needed to make it more manageable and accessible.</p>
<p><strong>Turning Big Data into Big Insights</strong></p>
<p>Clients create complex custom Pig scripts (Hadoop query language) to manipulate and shape data. The scripts are then executed by Azure Data Factory workflows and run on Azure HDInsight. Clients can use their favorite reporting tools to work with the new, smaller data sets. By working quickly and easily with large volumes of data from multiple sources, our clients gain real-time insight into their financial data.</p>
<p>We are already working on enhancements that will further automate and improve actuarial workflows, as well as evolving their cloud reporting capabilities.</p>
<p>Azure Data Factory and HDInsight has provided the capabilities needed to support data management, data manipulation, and reporting requirements for our clients. Actuaries should be focused on analyzing results and creating value for the company, not worrying about massaging data and managing reporting systems. Now, actuaries spend less time managing data, and more time on valuable projects such as better understanding the risks and evaluating management actions to best manage them&rdquo;.</p>
<p><strong>For further information, please use the following resources:</strong></p>
<ul>
<li><br /><a href="https://www.milliman.com/?rb">Milliman<br />website</a></li>
<li><br /><a href="https://www.integrate-solutions.com/?utm_source=milliman&amp;utm_medium=website&amp;utm_content=hp-ad&amp;utm_campaign=integrate">Integrate<br />website</a></li>
<li><br /><a href="https://customers.microsoft.com/Pages/CustomerStory.aspx?recid=20096">Integrate<br />Customer Story</a></li>
<li><br /><a href="https://www.microsoft.com/en-us/server-cloud/cloud-os/data-insights.aspx">Microsoft<br />Data Management and Analytics</a></li>
</ul>
<p>Paul Maher began his career at a small actuarial firm in the U.K., building pension software, and transitioned to IT roles and leadership positions at Microsoft, KPMG, and others prior to joining Milliman in 2013. He has a passion for building software solutions that help solve challenging business problems. <a href="https://www.linkedin.com/profile/view?id=6598184&amp;authType=NAME_SEARCH&amp;authToken=04CM&amp;locale=en_US&amp;srchid=65981841436697597496&amp;srchindex=1&amp;srchtotal=226&amp;trk=vsrp_people_res_photo&amp;trkInfo=VSRPsearchId%3A65981841436697597496%2CVSRPtargetId%3A6598184%2CVSRPcmpt%3Aprimary%2CVSRPnm%3Atrue">Contact Paul at LinkedIn</a>.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Proof of Concept to test scalability of stream data processing in Azure.</title>
      <link>https://docs.microsoft.com/archive/blogs/neerajjoshi/proof-of-concept-to-test-scalability-of-stream-data-processing-in-azure</link>
      <pubDate>Fri, 24 May 2013 14:14:00 GMT</pubDate>
      <dc:creator><![CDATA[Neeraj A Joshi]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/neerajjoshi/2013/05/24/proof-of-concept-to-test-scalability-of-stream-data-processing-in-azure/</guid>
      <description><![CDATA[Co-authors: Neeraj Joshi (Microsoft),&nbsp;Jason Short (Microsoft), Ercenk Keresteci (Full Scale...]]></description>
      <content:encoded><![CDATA[<h5>Co-authors: Neeraj Joshi (Microsoft),&nbsp;Jason Short (Microsoft), Ercenk Keresteci (Full Scale 180, Inc.)</h5>
<p>&nbsp;</p>
<h3><a name="_Toc357155313"></a>Introduction</h3>
<p>The Developer Platform Evangelism team has been engaged with partners that have solutions on instrumentation requiring a very high rate of data ingestion. This Proof of Concept (PoC) is designed with proving the scalability of Windows Azure for processing the data.</p>
<h3><a name="_Toc357155314"></a>Background</h3>
<p>Currently all of the instrumentation solution providers typically have a solution like this:</p>
<p>&middot; Each sensor capable recording data at specified time interval.</p>
<p>&middot; Each unit (Secondary Instance) capable of capturing different sensor data streams</p>
<p>&middot; Each central instance (Primary instance) capable of receiving data from 100s of Tier2 with over 1000 sensors with data streams</p>
<p>&middot; Each tenant (or company) may have multiple Secondary tiers depending on factors like Geo locations, business partitioning etc.</p>
<p>Finally each Tier1 or Tenant needs to process the data streams and then do some business logic on top of those and store them in an accessible fashion for reporting. The output is most certainly grouped by the sensor tags. Reporting on that data will take place after that.</p>
<p>We have been asked whether Windows Azure is really capable of the current scale of on premise solutions. The next order is whether we can even support a multi-tenant solution with each tenant doing such operations.</p>
<p>We were able to deconstruct the PoC into three projects:</p>
<p>1. Ingestion: To test scalability to copy the data streams to Azure</p>
<p>2. Data Processing: Assume that data is there in input blobs and process in worker role and then index the data.</p>
<p>3. Reporting</p>
<p>An earlier PoC was completed to demonstrate the first part i.e. ingestion of data. This PoC is targeted specifically to demonstrate the rate of Data Processing.</p>
<h3><a name="_Toc357155315"></a>PoC Setup &amp; Architecture</h3>
<h4><a name="_Toc357155316"></a>Diagram</h4>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/2744.image002_03A3F2CC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/2744.image002_5F00_03A3F2CC.png"><img style="border: 0px currentcolor; display: inline;" title="image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/7043.image002_thumb_6388E60E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/7043.image002_5F00_thumb_5F00_6388E60E.png" alt="image002" width="456" height="329" border="0" /></a></p>
<h4><a name="_Toc357155317"></a>Input</h4>
<h6>Storage Accounts</h6>
<p>For the purposes of this PoC we will assume that the data is pre-generated in one storage account. We will have functionality to pull the data from multiple storage accounts should the need arise for more performance.</p>
<p>Conceptually this could also be used as an isolation boundary especially in cases of very large tenants who might want to own their own data in their own cloud subscription.</p>
<h6>Datasets</h6>
<p>Each dataset is a set of data potentially belonging to a tenant. In the current PoC the dataset is implemented as a container containing individual files.</p>
<h6>Files</h6>
<p>The input file contains the actual data. Each line will contain one data point namely the GUID representing the tagID, Timestamp and Value. Currently our input generator randomly generates an input file from 1MB to 4MB containing the specified amount of distinct tags.</p>
<h4><a name="_Toc357155318"></a>Output</h4>
<p>Output is stored in files on a per tag basis. To avoid contention we implemented a series of optimizations namely - For every tag, each thread on every instance will write a separate file. Total number of threads is optimally determined by the Task Parallel Library. Every line in the file will contain a timestamp and a value of that tag.</p>
<p>Note this is the most basic form of storing output data. There are many other ways of compressing the tag values especially for those that change infrequently.</p>
<p>Currently the files are stored in the same dataset they are being processed.</p>
<p>e.g. 05052013055816/302fbaac-0107-438a-84d9-252ea87ec34f-088d6f8e29084ac78464db1419c29044-DataMorph.Processing.Worker_IN_1-0.bin</p>
<h4><a name="_Toc357155319"></a>Data Processing</h4>
<h6>Queues</h6>
<p>Currently we have two queues datamorphworkqueue and datamorphprogressqueue.</p>
<p>The first queue indicates the total amount of work to be done and gets populated as soon as we start the run. The second queue is not necessary for processing logic. The web role we display the UI listens on this queue to post updates back to the browser using SignalR.</p>
<h6>Worker Roles</h6>
<p>1-n number of worker roles are spun up to process in the inbound data from the queue. The number of threads within each worker role is optimally determined by the Task Parallel Library (TPL).</p>
<h3>&nbsp;</h3>
<h3><a name="_Toc357155320"></a>Results</h3>
<h4><a name="_Toc357155321"></a>Metrics:</h4>
<p>Before we talk about the numbers, here is our data collection mechanism.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/8623.image003_2E7C56DE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/8623.image003_5F00_2E7C56DE.png"><img style="border: 0px currentcolor; display: inline;" title="image003" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/6560.image003_thumb_3C4E9CD9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/6560.image003_5F00_thumb_5F00_3C4E9CD9.png" alt="image003" width="396" height="271" border="0" /></a></p>
<p>&nbsp;</p>
<table style="width: 275px;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="154">
<p><strong>Metric </strong></p>
</td>
<td valign="top" width="119">
<p><strong>Calculation</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="154">
<p><strong>Total Processing Time</strong></p>
</td>
<td valign="top" width="119">
<p>T8 &ndash; T1</p>
</td>
</tr>
<tr>
<td valign="top" width="154">
<p><strong>Read Time</strong></p>
</td>
<td valign="top" width="119">
<p>T3 &ndash; T2</p>
</td>
</tr>
<tr>
<td valign="top" width="154">
<p><strong>Parse Time</strong></p>
</td>
<td valign="top" width="119">
<p>T5 &ndash; T4</p>
</td>
</tr>
<tr>
<td valign="top" width="154">
<p><strong>Write Time</strong></p>
</td>
<td valign="top" width="119">
<p>T7 &ndash; T6</p>
</td>
</tr>
</tbody>
</table>
<h4>&nbsp;</h4>
<h4>&nbsp;</h4>
<h4><a name="_Toc357155322"></a>Increasing Instances (Constant Total Cores)</h4>
<p>In this set of experiment, we kept the total number of cores constant at 64 and controlled for the number of instances.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/1602.image005_6E463D63.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/1602.image005_5F00_6E463D63.png"><img style="display: inline;" title="image005" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/1373.image005_thumb_7C18835E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/1373.image005_5F00_thumb_5F00_7C18835E.png" alt="image005" width="455" height="275" border="0" /></a></p>
<h6>Summary:</h6>
<p>Performance goes up we increase the number of instances even though total cores remain the same.</p>
<p>Conversely, on an individual basis the average read and write times degrade as the instances increase. This could be because for the 8-core systems we are multiplexing the IO whereas for the single instance cases we have to setup/teardown the IO path more often. However, this time gets masked because of the asynchronous scale-out aspect of the workload and the fact that the <em>Parse time has decreased significantly. </em></p>
<h4><a name="_Toc357155323"></a>Increasing Roles &amp; Total cores (Constant cores per Role)</h4>
<p>In this experiment we kept 1 core per instance and controlled for the total number of instances. Thus we increased the total number of cores to observe the performance.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/5415.image007_2E1023E9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/5415.image007_5F00_2E1023E9.png"><img style="display: inline;" title="image007" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/59/66/metablogapi/3362.image007_thumb_0DF5172C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-59-66-metablogapi/3362.image007_5F00_thumb_5F00_0DF5172C.png" alt="image007" width="463" height="279" border="0" /></a></p>
<h6>Summary</h6>
<p>The performance increases as we increase the total number of cores. However, the tags per sec do not increase linearly as the cores increase with total instances. The scale factor is significantly less than 2 (1.55) for 32 instances and 1.47 for 64 instances.</p>
<p>This can be attributed to the workload and the fact that we are doing very little work. So just adding roles and cores is increasing our Read &amp; Write times <em>while keeping the Parse Time constant</em>.</p>
<h3>&nbsp;</h3>
<h3><a name="_Toc357155324"></a>Conclusion</h3>
<h4><a name="_Toc357155325"></a>Scale-out pattern works on Azure</h4>
<p>Since the highest system on Azure is an 8-core box, the scale-up performance will hit a bottleneck very fast. The only way to achieve greater performance is through a scale-out architecture. The items below should be considered when designing an architectural pattern to process streaming data on Azure:</p>
<h5><a name="_Toc357155326"></a>Avoid contention as much as possible</h5>
<p>A key design factor into achieving scale out is avoiding contention. In our setup there is contention in three different places: reading the input, parsing the data and writing the output.</p>
<p>Input consists of read-only files and there is no contention in their processing by the Worker role.</p>
<p>Parsing the data is a specific business logic function which may or may not have contention. In our case, we assumed that the tag data read can be processed by the same thread without any other resource constraint.</p>
<p>Finally the key optimization is in writing the output. We specifically implemented some key assumptions which will avoid contention while writing the data:</p>
<p>&middot; We create a file per tag per thread per instance of the worker role. So once the thread picks up the data from the input file, it will own the files related to the tags it processes. There is literally no contention.</p>
<p>&middot; We also index the data in Azure Table so that we know which file contains which data point. Azure Table will only contain the file and the tag along with the timestamp.</p>
<h5><a name="_Toc357155327"></a>Use Queues to optimize processing</h5>
<p>Queues are used in this pattern to list the work that remains to be done. The worker roles will poll the queue and then process the input files based on the messages in the queue. The messages will be deleted by the worker role only after it has written to the output file.</p>
<p>In general, use one queue and multiple processors to achieve highest throughput is an efficient way to process multiple requests.</p>
<h5><a name="_Toc357155328"></a>Asynchronous Processing</h5>
<p>This loosely-coupled pattern helps with both contention and scale-out of resources. In our case the reading and writing are done by worker roles who are not dependent on each other as well as on the order of processing. They will process the work from the queue and update the queue</p>
<h5><a name="_Toc357155329"></a>Resiliency</h5>
<p>All of the data in Azure gets stored in at least 3 copies (For local redundant storage) and 6 copies across two datacenters (for Geo-Redundant storage). This assures that we will not lose either the input or output in event of a disaster.</p>
<p>If any role goes down, the message in the queue doesn&rsquo;t get deleted and it will be picked up by the other instances as a part of the next batch of messages.</p>
<h4><a name="_Toc357155330"></a>Further customization for optimizing a specific workload</h4>
<p>Our current project was a Proof of Concept. For real applications there are multiple customizations which would need to be done to fit their specific requirements.</p>
<h5><a name="_Toc357155331"></a>Batch Size</h5>
<p>In our implementation we processed messages in batches of 10. This has a direct impact on memory as well as processing time for an instance. Too few batch sizes would increase the impact of the time to retrieve &amp; process a message, and too large batch size would potentially starve other role instances.</p>
<h5><a name="_Toc357155332"></a>Memory used</h5>
<p>If the actual business logic in the worker role is dependent on memory, then the code will need to change to accommodate that. This could be implemented by reducing batch size, processing tags in a different way.</p>
<h5><a name="_Toc357155333"></a>Tag compression and decompression</h5>
<p>Our input data as well as the output data is the simplest implementation of streaming sensor data. Almost all of the available sensor data collection systems utilize some compression. The compression can be significant if the data doesn&rsquo;t change that often. This can be leveraged to project an even higher number of tags per second.</p>
<h5><a name="_Toc357155334"></a>Tenant prioritization</h5>
<p>Currently we treat all tenants (represented as Datasets) equally. This could be easily modified to prioritize tenants or a set of tenants.</p>]]></content:encoded>
    </item>
  </channel>
</rss>