<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Radu Vunvulea on Medium]]></title>
        <description><![CDATA[Stories by Radu Vunvulea on Medium]]></description>
        <link>https://medium.com/@raduvunvulea?source=rss-95c39d28a3b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uYX_PnayzcM37Ya9dYIAHQ.jpeg</url>
            <title>Stories by Radu Vunvulea on Medium</title>
            <link>https://medium.com/@raduvunvulea?source=rss-95c39d28a3b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:24:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raduvunvulea/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Microsoft Copilot or Copilot for Microsoft 365 (M365) or ChatGPT.]]></title>
            <link>https://medium.com/@raduvunvulea/microsoft-copilot-or-copilot-for-microsoft-365-m365-or-chatgpt-04e9b7778b3b?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/04e9b7778b3b</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Fri, 22 Mar 2024 12:28:13 GMT</pubDate>
            <atom:updated>2024-03-22T12:28:13.077Z</atom:updated>
            <content:encoded><![CDATA[<p>Does Copilot ring a bell? I am more than sure that YES. But what kind of bell? Microsoft Copilot or Copilot for Microsoft 365 (M365) or ChatGPT.</p><p>In this article, I am trying to highlight their core differences. I am sure things might change in the next months, but defining a boundary between them is still a good starting point.</p><p>I will start with the summary because I know that you don’t have too much time:</p><p><em>Microsoft Copilot is an AI assistant built for personal use (Windows 11). It can be used for Windows 11 tasks, adjusting Windows settings, and performing similar activities.</em></p><p><em>Copilot for Microsoft 365 is an AI-powered business tool. It is used with professional tools from the O365 stack and assists us in creating, understanding, and gaining insights related to the digital content in our organization.</em></p><p><em>ChatGPT provides a platform that can be used for broader activities and can be an AI assistant for different tasks (e.g., coding). It can better understand a problem or question and provide a better response.</em></p><p><em>Remember that Copilot can access the internet and deliver updated information with links and additional information. This is something that ChatGPT is not able to do.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0YGIWBp6nYn6r65kCfQYQ.jpeg" /></figure><p><strong>Microsoft Copilot</strong></p><p>It’s an AI tool for Windows 11 and helps us to navigate and interact better in our day-to-day work with Windows. It is part of the OS. It provides capabilities related to changing the PC settings, themes and desktop personalization, getting custom results from Bing Seach and generating images using the DALL-E AI model.</p><p><strong>Copilot for Microsoft 365</strong></p><p>This AI-powered tool is for your day-to-day work-related activities. It integrates well with Microsoft 365 applications (e.g., Excel, Word, Teams, Outlook). The potential of this AI tool is very high, and I am sure that in 6–12 months, it will change how we work and interact with the company’s digital knowledge base.</p><p>The current capabilities allow us to write Word documents, create presentations and work with Excel content. The features related to Outlook, Teams and OneNote are essential, but I am sure this is only the beginning.</p><p>Yes, the Copilot for Microsoft 365 is not free but has much potential.</p><p><strong>ChatGPT</strong></p><p>It is an AI system that can gain insights, automate tasks, answer questions, compose emails, code and have engaging conversations. It is a natural language processing chatbot driven by AI technology. The NLP technology behind ChatGPT allows us to integrate and use AI in ways we don’t even imagine. I would say that the sky is the limit. He can interact with us as human beings and can be our companion. The OpenAI technology has already been incorporated into Bing Chat, Teams, GitHub Copilot, Microsoft Copilot, and Copilot for Microsoft 365.</p><p>ChatGPT is and will be the core of many other products and features. For example, it connects the LLM capability with Microsoft Graph (email, documents, calendar, meetings, Teams and many more). It provides thought Copilot for Microsoft 365, productivity tools that change how we work.</p><p><strong>Tips for Copilot for Microsoft 365</strong></p><p>I discovered that Copilot for M365 works much better at copilot.microsoft.com or in the mobile app. I don’t understand what the difference is but give it a try. This might happen because, at this moment, the web version uses GPT4. I assume the ones in Office and Teams are older, but I am unsure. I noticed that Chat GPT works much better.</p><p>The graph capability is impressive. Having the ability to ‘search’ and extract information from all the documents from your tenant makes Copilot for M365 very powerful. I expect to change how we interact and use company internal information in the near future.</p><p>It already has Data Protection (Enterprise-grade Data Protection) that ensures that all the data stays with you (tenant boundaries). This is a big plus and opens new doors for organizations. The Commercial Data Protection is activated automatically in the web version (no access from Microsoft &amp; no chat data is saved).</p><p>What is an Enterprise Data Protection Framework? An enterprise data protection framework is a set of guidelines, best practices, and tools to ensure an organization’s data’s confidentiality, integrity, and availability (CIA). It encompasses a comprehensive approach that goes beyond merely implementing security solutions (source: <a href="https://atlan.com/enterprise-data-protection-framework/)">https://atlan.com/enterprise-data-protection-framework/)</a></p><p><strong>Personal thoughts</strong></p><p>Microsoft Copilot &gt; At this moment, it has its behaviour and sometimes does not listen to us as we expect (both web and Edge versions)</p><p>Copilot for Microsoft 365 &gt; Does not always produce the expected outcome (e.g., search capabilities in documents, TEAMS search capability, or document generation based on specific templates). ChatGPT with Word documents works much better. Copilot for M365 is still in its beginning.</p><p>Chat GPT &gt; ChatGPT with GPT4 surprises me each day. It’s very powerful and provides good results. It is much better than Gemini, mainly because of the fine-tuning done for GPT4. The business tools built on top of it, connected to the internet and real-time data, are groundbreaking changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04e9b7778b3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud (re)patriation and Hybrid Cloud]]></title>
            <link>https://medium.com/@raduvunvulea/cloud-re-patriation-and-hybrid-cloud-8b73d5c76fb5?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b73d5c76fb5</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[future]]></category>
            <category><![CDATA[arhcitecture]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 17:44:50 GMT</pubDate>
            <atom:updated>2024-03-12T17:44:50.596Z</atom:updated>
            <content:encoded><![CDATA[<p>The cloud has revolutionized the way businesses operate, providing agility, efficiency, and scalability. However, in recent years, cloud repatriation has emerged as a trend where businesses are moving data or workloads back to on-premises. According to the ESG group, over 60% of companies have repatriated at least one workload back to on-premise.</p><p>Dropbox is a well-known example of cloud repatriation. In 2016, they shifted their workloads from AWS to on-premises data centers driven by economics, better operational flexibility, and control. From the cloud adoption point of view, cloud repatriation was part of their cloud journey. Today, Dropbox has multiple cloud vendors and on-premises partners that cover business-specific needs.</p><p>As cloud computing continues to evolve, it’s important for businesses to evaluate their cloud strategies and identify what works best for them. Whether it’s public, private, or hybrid cloud, the key is to find a solution that meets the organization’s unique needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9rlDQoFgvGG_p5b6r1Nocg.jpeg" /></figure><p><strong>The leading causes of cloud repatriation</strong></p><p>Top concerns related to the cloud that force companies to make a strategic shift include cost, efficiency, compliance, security and control. While cloud adoption is driven by cost-saving potential, the lack of visibility and control over expenses can lead to cloud repatriation. Additionally, industries with strict data security and compliance requirements may find that cloud security is not always sufficient, leading to cloud repatriation as a mechanism to mitigate security risk and align with regulations.</p><p>Customization, control, and performance levels are often limited in a cloud environment, especially for unique businesses where more than a one-size-fits-all approach is required. The latency introduced by the cloud can also affect critical applications, leading to performance degradation. To ensure high performance, businesses may prefer to run their applications on the edge network or locally.</p><p>Vendor lock-in concerns related to cloud services, migration complexity, effort, and business disruption can cause businesses to rethink their operations and data strategy. As such, it is important for businesses to carefully weigh the pros and cons of cloud adoption and determine the best approach for their unique needs.</p><p><strong>Potential pitfalls of cloud repatriation</strong></p><p>Are you considering moving your data centre to the cloud? Remember to factor in the often underestimated infrastructure cost of an on-premises solution. Rebuilding and maintaining a data centre can be much higher than initial estimates, with additional costs for software and hardware, as well as the human resources necessary to run it. Data compliance can also be challenging, with regular audits increasing running costs.</p><p>On the other hand, cloud platforms have built-in disaster and recovery capabilities, providing speed, flexibility, and fast access to new technologies. It’s important to consider both cost and business benefits when making the move. Don’t underestimate the complexity of data migration back to on-premises either, which can lead to data loss, business disruption, and additional costs.</p><p>Remember, scalability and flexibility are among the strengths of the cloud. So, before making a strategic decision, make sure to weigh all the options carefully, and choose the solution that best suits your business needs.</p><p><strong>Cloud repatriation evaluation</strong></p><p>Cloud repatriation is a complex process that requires a comprehensive cost-benefit analysis, performance evaluation, and consideration of several key aspects. A detailed analysis of all cloud accounts, potential investment required for on-site datacenter, and customer requirements is essential for cost-benefit analysis. Repatriation can provide better control for highly regulated industries or when data sovereignty requirements are strict. However, challenges related to skill availability during repatriation can be real problems that can influence costs and hiring strategy. Depending on the organization-specific context and type of business, cloud repatriation could be cheaper or more expensive. Ultimately, a thorough assessment of all aspects is necessary to make an informed decision.</p><p><strong>Conclusion</strong></p><p>Cloud repatriation is not an all-or-nothing decision. A hybrid approach is a much better strategy, where both methods are used and workloads are moved from on-premises to cloud and vice-versa, depending on the business driver. Business needs should drive all decisions related to moving to the cloud or repatriation.</p><p>As each organization is unique, it must evaluate its needs, operational expectations, potential growth, budget, and technical expectations to identify the best investment. Cloud repatriation is part of the cloud journey and reminds us that decisions should not be binary. A hybrid cloud strategy driven by operational needs should ensure a cloud adoption journey. Migration to cloud or on-premises should be seen as an ongoing process that evolves over time together with the business.</p><p>#cloudcomputing #cloudstrategy #hybridcloud #businessstrategy #cloudrepatriation #cloudjourney</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b73d5c76fb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Azure Functions on AWS and on-premises]]></title>
            <link>https://medium.com/@raduvunvulea/how-to-run-azure-functions-on-aws-and-on-premises-4bba4ba392ec?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bba4ba392ec</guid>
            <category><![CDATA[ak]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Wed, 20 Feb 2019 15:00:52 GMT</pubDate>
            <atom:updated>2019-02-20T15:00:52.000Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays cloud and hybrid cloud solutions are highly demanded by companies. In this post, we will talk about a technical solution for business logic that it’s supported by multiple clouds provides and can run on-premises without any kind of issues.<br>The requirements for the given scenario is the following:<br>We need to be able to expose an API that can execute tasks that runs for 2–5 minutes each in parallel. The native platform shall be Microsoft Azure, but it should be able to run on dedicated hardware in specific countries like China and Russia. With minimal effort, it should be able to run on the AWS platform.</p><p>The current team that we had available was a .NET Core team, with good skills on ASP.NET. There are numerous services available on Azure that can run in different environments also. The most attractive ones are the ones on top of Kubernetes and microservices.<br>Even so, we decided to do things a little different. We had to take into considerations that an autoscaling functionality would be important. Additional to this the current team needs to deliver the first version on top of Azure. The current team capabilities were not so good on Kubernetes and the delivery timeline was strict.</p><p><strong>Solution</strong><br>Taking this into considerations, we decided to go with a 2 steps approach. The first version of the solution would be built on top of Azure Functions 2.X, fully hosted on Microsoft Azure. The programming language that would be used is .NET Core 2.X.<br> To be able to deliver what is required the following binding needs to be used:</p><ul><li>HTTP that plays the role of the trigger. External systems can use this binding to kick off the execution.</li><li>Blob Storage that plays the role of data input. The chunk of data is delivered in JSON format from the external system and loaded to blob storage before execution starts.</li><li>Webhooks that plays the role as data output. An external system is notified where the result (scoring information) is provided</li></ul><p>The power of Azure Functions is revealed at this moment. The team can focus on implementation, without a minimal effort on the infrastructure part. Initially, the solution will be hosted using Consumption Plan that enables us to scale automatically and pay per usage.<br>Even if it might be a little more expensive than the App Service Plan, where dedicated resources are allocated, the Consumption Plan is a good starting point. Later, based on the consumption level the solution might be or not migrated to App Service Plan.<br>Execution Time<br>When you are using the Consumption Plan, a function can run a maximum of 30 minutes. The initial estimation of a task duration is 2–5 minutes. There is a medium risk that the 30 minutes limits to be reached. To be able to mitigate this risk, during the implementation phase, the team will execute some stress tests with real data to estimate the task duration in Azure Function context.<br>Additional to this, every week a custom report will be generated where different KPIs related to execution times. A scatter charts, combined with a clustering chart shall be more than enough. The reports are generated inside Power BI.<br>The mitigation plan for this is to migrate to the App Service Plan, where you have the ability to control what kind of resources you have available and to allocate dedicated resources only for this. On top of this, in App Service Plan you don’t have a timeout limitation, you can run a function as long as you want.<br>There are also other mechanisms to mitigate it, like code optimization or split the execution into multiple functions, but this will be decided later on if there will be problems with the timeout time.<br>Remarks: Azure Functions 1.X execution timeout for Consumption Plan is 10 minutes, in comparison with Azure Function 2.X where the maximum accepted value is 30 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*ar0uuWQlDBJ3LfBha0pQlg.jpeg" /></figure><p><strong>On-premises support</strong><br>The current support of Azure Function for t on-premises system if you want to have a stable system where you can run high loads is Kubernetes cluster. The cool thing that Microsoft is offering to us is the ability to run Azure Functions inside Kubernetes cluster as a Docker image.<br>The tool that is available on the market at this moment is allowing us to create from an Azure Function a Docker image that it is already configured with Horizontal Pod Autoscaler. This enables us without to do any custom configuration to have an Azure Function hosted inside Kubernetes as a container that can scale automatically based on the load. Beside this the deployment and service configuration part it’s also generated.<br>The tool that is allowing us to do this is called Core Tools and it is designed by the Azure Function team. Besides this, because it is a command line tool can be easily integrated with CI/CD systems that we have already in place.</p><p><strong>AWS Environment</strong><br>The same solution as for on-premises can be used to host our Azure Functions inside AWS EKS or in any other services based on Kubernetes.</p><p>The official support from Core Tools is allowing us to create images for Docker and deploy them in Kubernetes using/on top of:</p><ul><li>Virtual-Kubelet</li><li>Knative</li><li>Kubectl</li><li>AKS (Azure Kubernetes Services)</li><li>ACR (Azure Container Registry) — Image hosting</li><li>ACS (Azure Container Services)</li><li>AWS EKS</li></ul><p>Azure Functions Core Tools is available for download from:</p><ul><li>Github — <a href="https://github.com/Azure/azure-functions-core-tools">https://github.com/Azure/azure-functions-core-tools</a></li><li>npm- azure-functions-core-tools</li><li>choco — azure-functions-core-tools</li><li>Brew — azure-functions-core-tools</li><li>Ubuntu — <a href="https://packages.microsoft.com/config/ubuntu/XX.XX/packages-microsoft-prod.deb">https://packages.microsoft.com/config/ubuntu/XX.XX/packages-microsoft-prod.deb</a></li></ul><p><strong>Conclusion</strong><br>As we can see at this moment Azure Functions is allowing us to not be locked to run our solution only inside Azure as Functions. We have the ability to take our functions and spin-up as a console application or even inside Kubernetes. Azure Function Core Tools is enabling us to create Docker images and run them inside Kubernetes in any kind of environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bba4ba392ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to access Power BI resources from client application (first and third party embedding)]]></title>
            <link>https://medium.com/@raduvunvulea/how-to-access-power-bi-resources-from-client-application-first-and-third-party-embedding-7700946f7f2d?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7700946f7f2d</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[azure-ad-b2c]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Tue, 12 Feb 2019 13:40:44 GMT</pubDate>
            <atom:updated>2019-02-12T13:40:44.243Z</atom:updated>
            <content:encoded><![CDATA[<p>Source: <a href="http://vunvulearadu.blogspot.com/2019/02/how-to-access-power-bi-resources-from.html">http://vunvulearadu.blogspot.com/2019/02/how-to-access-power-bi-resources-from.html</a></p><p>In this post, we will talk about different ways on how we can authenticate and authorize our applications to access our Power BI Reports. Things become a little bit confusing because there are reports that can be owned by the users that access them or by another user. Additional to this there are cases when the users own the report, but not the data that are displayed.<br>Before jumping to the solution, we need to understand a few concepts related to how Power BI works when you use embedded functionality. The basic idea of Power BI embedded functionality is the ability to integrate an IFRAME inside your application. Inside the IFRAME we can display any content we want from reports to dashboards.<br>The IFRAME content is loaded directly from Power BI services using an URL and a security token. The security token can be obtained from Azure AD thought your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*25xeGc8PrGs0merI.jpg" /></figure><p>This involves two steps for authentication. The first step is happening when you call directly or indirectly the Azure AD to obtain an access token to access Power BI. The second step is done using the access token that it is used by your application to call the Power BI and load the IFRAME. Inside the IFRAME the Power BI can load all requested content, including controllers.</p><p><strong>First-Party Embedding</strong><br>The access mechanism presented above is called First-Party Embedding. The access to content it’s smooth and is customized for each user. Each user that access the Power BI has a Power BI ‘account’ where you can manage what the user is able to do. Even so, each user needs to be a Power BI user and owns the data model (user-owns-data model). It is a great solution for applications and reports used internally inside an organization.<br>Anonymous access is not supported using this approach.</p><p><strong>Third-Party Embedding</strong><br>For cases when you need to provide access to your reports or Power BI resources to users that are not part of your organization or anonymous users, the approach needs to be a little different. You will not need to authenticate each user in front of AD and get obtain the security token.<br>In this scenario, you will need to authenticate to Power BI to obtain an embedded token. The embedded token can be used to access resources from Power BI, but keep in mind that each embedded token is generated for every single resource. It means that if you want to display two different reports, you will need to obtain two embedded tokens from Power BI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*2lLQx7lo9JZkHQNn.PNG" /></figure><p>This is possible using master accounts, that is allowing us to get the embedded token directly from Power BI. The problem with master accounts is the way how it works. They are offering access to a wide number of resources and data inside Power BI. Because of this people tends to create multiple master accounts, for each user type. This approach is not only non-scalable but it’s hard to manage and control.<br>The recommended solution is to use the roles that the user has and add them to the embedded token inside the EffectiveIdentity field. Using this information, the roles based on access to different data sets will work the same as it works for First-Party Embedding.</p><p><strong>Samples</strong><br>At this step, we have a base understating related to how Power BI works when we want to use embedding functionality. Let’s take a look at some samples related to how we should to the authentication and authorization.<br>Code source: <a href="https://community.powerbi.com/t5/Developer/Authorization-Code-Grant-Flow-Power-BI-Embedded/td-p/551889">this</a></p><p>(1) Third-Party Embedding without user interaction (console app)<br>The first step is to provide access to the master user account from the Azure AD Application.</p><pre>...<br>  <strong>private</strong> <strong>static</strong> <strong>string</strong> aadAuthorizationEndpoint = &quot;https://login.microsoftonline.com/common&quot;;<br>  <strong>private</strong> <strong>static</strong> <strong>string</strong> resourceUriPowerBi = &quot;https://analysis.windows.net/powerbi/api&quot;;<br>  <br>  <strong>private</strong> <strong>static</strong> <strong>string</strong> applicationId = ConfigurationManager.AppSettings[&quot;application-id&quot;];<br>  <strong>private</strong> <strong>static</strong> <strong>string</strong> userName = ConfigurationManager.AppSettings[&quot;aad-account-name&quot;];<br>  <strong>private</strong> <strong>static</strong> <strong>string</strong> userPassword = ConfigurationManager.AppSettings[&quot;aad-account-password&quot;];</pre><pre>  <strong>private</strong> <strong>static</strong> <strong>string</strong> <strong>GetAccessToken</strong>() {</pre><pre>    AuthenticationContext authenticationContext = <strong>new</strong> AuthenticationContext(aadAuthorizationEndpoint);</pre><pre>    AuthenticationResult userAuthnResult =<br>      authenticationContext.AcquireTokenAsync(<br>        resourceUriPowerBi,<br>        applicationId,<br>        <strong>new</strong> <strong>UserPasswordCredential</strong>(userName, userPassword)).Result;</pre><pre>    <strong>return</strong> userAuthnResult.AccessToken;<br>  }<br>...</pre><p>(2) Third-Party Embedding inside a web app where user already auth<br>The below sample adds to the embedded token the user roles. This information can be used later to restrict content accessed by a specific user.</p><pre><strong>string</strong> currentUserName = HttpContext.Current.User.Identity.GetUserName();<br>  ApplicationDbContext context = <strong>new</strong> ApplicationDbContext();<br>  <strong>var</strong> userManager = <strong>new</strong> UserManager&lt;ApplicationUser&gt;(<strong>new</strong> UserStore&lt;ApplicationUser&gt;(context));<br>  ApplicationUser currentUser = userManager.FindByName(currentUserName);</pre><pre>  <strong>var</strong> roleManager = <strong>new</strong> RoleManager&lt;IdentityRole&gt;(<strong>new</strong> RoleStore&lt;IdentityRole&gt;(context));</pre><pre>  List&lt;<strong>string</strong>&gt; roles = <strong>new</strong> List&lt;<strong>string</strong>&gt;();</pre><pre>  <strong>foreach</strong> (<strong>var</strong> role <strong>in</strong> currentUser.Roles) {<br>    roles.Add(roleManager.FindById(role.RoleId).Name);<br>  }</pre><pre>  <strong>string</strong> accessLevel = HttpContext.Current.User.IsInRole(&quot;Admin&quot;) ? &quot;edit&quot; : &quot;view&quot;;</pre><pre>  PowerBIClient pbiClient = GetPowerBiClient();</pre><pre>  <strong>var</strong> report = <strong>await</strong> pbiClient.Reports.GetReportInGroupAsync(workspaceId, reportId);<br>  <strong>var</strong> embedUrl = report.EmbedUrl;<br>  <strong>var</strong> reportName = report.Name;<br>  <strong>var</strong> datasetId = report.DatasetId;</pre><pre>  GenerateTokenRequest generateTokenRequestParameters =<br>    <strong>new</strong> <strong>GenerateTokenRequest</strong>(accessLevel: accessLevel,<br>                            identities: <strong>new</strong> List&lt;EffectiveIdentity&gt; {<br>                              <strong>new</strong> <strong>EffectiveIdentity</strong>(username: currentUser.UserName,<br>                                                    datasets: <strong>new</strong> List&lt;<strong>string</strong>&gt; { datasetId  },<br>                                                    roles: roles)<br>                            });</pre><pre>  <strong>string</strong> embedToken =<br>        (<strong>await</strong> pbiClient.Reports.GenerateTokenInGroupAsync(workspaceId,<br>                                                            report.Id,<br>                                                            generateTokenRequestParameters)).Token;</pre><pre>  <strong>return</strong> <strong>new</strong> ReportEmbeddingData {<br>    reportId = reportId,<br>    reportName = reportName,<br>    embedUrl = embedUrl,<br>    accessToken = embedToken<br>  };</pre><p>(3) First-Party Embedding<br>Source<a href="https://github.com/Microsoft/PowerBI-Developer-Samples/blob/master/User%20Owns%20Data/integrate-report-web-app/PBIWebApp/Default.aspx.cs">: https://github.com/Microsoft/PowerBI-Developer-Samples/blob/master/User%20Owns%20Data/integrate-report-web-app/PBIWebApp/Default.aspx.cs</a></p><p>Source: <a href="http://vunvulearadu.blogspot.com/2019/02/how-to-access-power-bi-resources-from.html">http://vunvulearadu.blogspot.com/2019/02/how-to-access-power-bi-resources-from.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7700946f7f2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Events and Messages based system comparison]]></title>
            <link>https://medium.com/@raduvunvulea/events-and-messages-based-system-comparison-e3402eb095a9?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3402eb095a9</guid>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 10:59:55 GMT</pubDate>
            <atom:updated>2019-02-05T10:59:55.717Z</atom:updated>
            <content:encoded><![CDATA[<p>Source: <a href="http://vunvulearadu.blogspot.com/2019/02/events-and-message-based-system.html">http://vunvulearadu.blogspot.com/2019/02/events-and-message-based-system.html</a></p><p>heard very often discussion related to messaging and event systems. People are trying to compare them and decide on one solution that suits all their needs on a platform. Comparison of an Enterprise Service Bus (ESB) and an Event base messaging system it’s wrong from the beginning.</p><p>Even if both solutions are great, they resolve different problems that we might have on a platform. ESB and Events are able to transport data between two or multiple systems, but this is where the similarities end. From the way how they are design, core features and what we can achieve with each of them, we will notify that their capabilities are limited and they don’t compete between each other.</p><p>As we will discover, later on, a complex solution might need to use both approaches to offer a consistent and competitive solution.<br>To be able to give hands-on examples, we will use for comparison two services that Microsoft Azure is offering.</p><ul><li>Azure Service Bus — an ESB solution hosted inside Microsoft Azure, that gives us the ability to work with Queues and Topics/Subscribers.</li><li>Azure Event Hub — an event-based solution hosted inside Microsoft Azure, that gives us the ability to push and consumer millions of events in just a few seconds.</li></ul><p>One of the causes why we see events and messages solutions similar it causes by how both look like. Each of them has a header and a payload and their main mission is to transport content from one location to one or multiple destinations. This concept is similar to the one provided by a Datagram that is the basic transfer unit associated with a packet-switched network and well documented in the TCP/IP protocol — RFC 1594.<br>I like the analogy with a datagram because of how it is defined: self-contained, no dependencies of previous content exchanged and connectionless (without support/requiring of fixed connection). This can be translated in our case of supporting data exchange between two parties if fixed block sizes without requiring a stable and open connection.</p><p><strong>Messages</strong><br>When we are working on a communication channel where we need to ensure that the content is received with success a message based solution is recommended. A solution like the Azure Service Bus Queue or Topic provides us with a reliable communication channel that ensures that the message is not lost. There are times when we expect an acknowledge from the receiver(s), the case when a message based system is the best option. <br>In general, we need a message base solution when we are working with a command like an approach, where we have a publisher that publishes content on the wire. The expectation is that at least one system will handle the command and a job is executed. For these situations, we shall rely on messages.<br>A characteristic of message base systems like Azure Service Bus is the contract that exists between producer and consumer. Both sides know exactly how the message looks like, the data format and expect information in a specific way. In general, even the producer expect a response in a specific format.</p><p><strong>Events</strong><br>From the previous example with datagrams, events are more close to datagrams that messages. The purpose of data that is transported by events is more to inform than to expect a specific action to happen. They capture activities or changes on a system and publish them on different channels.<br>One of the biggest difference between events and messages is the expectation of the producer. For messages, the producer expects activity to happen, in comparison with an event producer that does not have any expectation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*VFFR-CSUcSdQpUgt.PNG" /></figure><p>In comparison with messages, events don’t contain any information related to who triggered the data and context information. They just report a state change or a specific value.<br>In general, events are used as data points generated by different systems or store information in the change of state of different actions. A sensor that reads the car speed does not expect a reaction from the consumer each time when the speed is reported. Beside this, it generates a stream of data that can be consumed and viewed in different ways — data points. In comparison with this, a device that starts the car remotely is sending a command to the car and expect action to be executed together with some acknowledgments. In this case, the device needs to generate a message that is sent to the car.<br>Another characteristic of events stream is the ability to consume events from specific time periods multiple times, or even peek data at a specific time interval. For message base system, like Azure Service Bus a message can be consumed only once by all subscribers and cannot be retrieved later on once it was consumed.</p><p>You might say that there are cases when a consumer can react to different events. Yes, this is true, but the logic and the way a consumer reacts it is detailed in the consumer, not in the event itself. Losing a few events in an IoT solution is accepted and will not impact the solution stability. In comparison losing a message that contains a SELL, THE SHARES can make a difference between bankruptcy or winning 10M $.<br>Events are seen as streams of events, where the most valuable information is obtaining by comparing events between each other and tracking the trend of data. The value of a single event is ZERO, but analyzing the events that contained the shares value for the last 12 months is priceless.<br>The previous example is related to statistical information or data points. Beside this, we can have events that inform us about different activities that are happening inside the system. The purpose of these events is just to inform and losing such an event would not affect our system.<br>A data points stream of events that are widely used is data logs. One of multiple systems or components can produce data logs events that can be later on processed. Azure Event Hubs allow us to automatically store datalog events directly to storage for later on analyze. In most of the cases you might never analyze the log events or to extract just some report from it.</p><p>Another difference between a message VS event base system is the filtering/routing capability. An event-based system like Azure Event Hub is able to retrieve us messages from the specific time period, but it does not have the capability to filter messages for consumer groups. In comparison, an ESB system like Azure Service Bus is fully capable to filter messages on each subscription based on predefined rules.<br>Azure Service Bus or any other messaging system can guarantee the order delivery. In an event-based system, the order can be different. When we are working with transactions, the data order is very important, making us look at a message based solution. Additional to this an event-based system is not capable to detect duplication. One of the main reasons is because is designed for high throughput, where any data processing would increase latency.</p><p>From a security perspective, at transport and storage level both approaches are similar offering encrypted storage and a secure connection. At authentication and authorization level, the message-based system is offering more options that can be seen exotic from an event-based system. This is happening because when you need to support high thoughts, complex authentication and authorization solutions that might rely on an external system could increase latency.</p><p><strong>Event / Messages comparison</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*vU8OpXnuT2xqKiZwrA1YQA.png" /></figure><p><strong>Conclusion</strong><br>In a complex system, you will need both message and event-based solution. They don’t exclude one another and you can develop a solid system that combines messages and events together. A short personal for both of them can be found below.</p><ul><li>Events — &lt;inform&gt; notifications of a condition of state change</li><li>Messages — &lt;commands&gt; raw data produced by a system to be consumed</li></ul><p>Source: <a href="http://vunvulearadu.blogspot.com/2019/02/events-and-message-based-system.html">http://vunvulearadu.blogspot.com/2019/02/events-and-message-based-system.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3402eb095a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Communication Strategies on top of message base communication for outages or disasters protection]]></title>
            <link>https://medium.com/@raduvunvulea/communication-strategies-on-top-of-message-base-communication-for-outages-or-disasters-protection-bafa23ece9f7?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bafa23ece9f7</guid>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Thu, 31 Jan 2019 15:08:02 GMT</pubDate>
            <atom:updated>2019-01-31T15:08:02.296Z</atom:updated>
            <content:encoded><![CDATA[<p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/communication-strategies-on-top-of.html">http://vunvulearadu.blogspot.com/2019/01/communication-strategies-on-top-of.html</a></p><p>I<a href="http://vunvulearadu.blogspot.com/2019/01/external-messaging-system-around-aks.html">n the last post, we identified different location inside and outside a micro-service architecture where messaging base communication could be used with success.</a> Beside this we identified that to be able to have a high-performance system, we need to use reliable messaging communication channels.<br>If we decide to run our micro-service solution inside Kubernetes on top of Azure Kubernetes Services (AKS), we need to take into consideration messaging and event bases communication channels like Azure Service Bus or Azure Event Hub.<br>Even so, this is not enough to be fully protected of any outages or disasters. Another layer of protection that we should define is at the application level. In this post, we will discuss some communication strategies that can increase our protection against outages and disasters.<br>The below solutions can be used in combination with any messaging system, but in this case, we will present them in combination with Azure Service Bus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*ragbaAEimPliMEe5.png" /></figure><p><strong>Passive Replication</strong><br>This strategy is based on two instances of messaging service instances that run in parallel. In one moment in time, the sender is using only one to send messages — so called the active one. When the sender is not able to communicate with the active instance, it will automatically switch to the second one (called passive), that will be marked as active. Basically, it is a switch between active and passive instance. An active instance remains active until a communication problem occurs.<br>The consumer needs to listen and consume messages from both messaging service instances — active and passive. Because there is a risk to receive the same message on both channels (active and passive) the consumer needs to have a mechanism to identify messages that were already processed.<br>There are cases when business is not effective is a message is processed twice. If your business or performance it is not affected by processing the same message twice, then you should not handle this scenario.<br>If the message order it is important for you, please take into consideration that there are cases when by default the message order might not be respected. For example, if the sender sends message A to the active instance that becomes unavailable for a few seconds and sender send messages B and C over passive instance (that becomes active), the receiver might receive message B and C before message A. Based on what kind of messaging solution you used, you might have a mechanism that protects you for scenarios like this. Azure Service Bus allows us to put a group together multiple messages under the same session, protecting us from this kind of scenarios.<br>Another case is when a message is pushed to the active instance and the send confirmation is not received anymore because the active channels go down. In this case, the message will be sent on the second channel also. For this situation, the receiver needs to be able to detect duplicate messages and decide how to handle them.</p><p><strong>Active Replication</strong><br>This approach involves using two instances of messaging services (like to different instances of Azure Service Bus namespaces) to send messages between sender and receiver. The sender sends the same message twice on both message instances.<br>Each message needs to have a unique ID that it is used by the receiver to detect the message duplication and suppress the second one. When you are using Azure Service Bus, you can use custom property tag, the Label properties of the message or even the BrokeredMessage.MessageId to set the ID used to detect the message duplication.<br>From a cost perspective, Active Replication is more expensive than the passive replication because you send the same message twice, but increase the protection to disasters or outages. Considering your business needs and NFR you should decide what approach suits best your needs.</p><p>In the next post you’ll be able to find a comparison between messages vs event base communication system.</p><p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/communication-strategies-on-top-of.html">http://vunvulearadu.blogspot.com/2019/01/communication-strategies-on-top-of.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bafa23ece9f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decouple external communication inside AKS (Azure Kubernetes Services)]]></title>
            <link>https://faun.pub/decouple-external-communication-inside-aks-azure-kubernetes-services-6cce8ec75ebc?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cce8ec75ebc</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[azure-service-bus]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Mon, 28 Jan 2019 13:34:14 GMT</pubDate>
            <atom:updated>2019-07-18T18:36:17.785Z</atom:updated>
            <content:encoded><![CDATA[<p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/external-messaging-system-around-aks.html">http://vunvulearadu.blogspot.com/2019/01/external-messaging-system-around-aks.html</a></p><p>In a world that it is more and more oriented to microservices, reliable asynchrony communication becomes vital for our system. In this post, we will try to identify different locations where asynchrony communication based on the messaging system could be a good fit.</p><p>Let’s imagine that we have a system that is hosted inside a Kubernetes cluster (AKS). The system is a high-availability and high-performance system that shall be protected for any kind of peaks or temporary outages.</p><p>Of the most important characteristics of such a system is to able to not affect other systems. This means that it shall be able to accept requests even if the internal load would not allow him to process the additional request. Beside this, internally specific groups of services shall be able to send the request to other services during temporary outages. The services shall be able to recover from this outages with minimum effort by using a simple solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*2iot5SMXVVtLoKks.png" /></figure><p>The first location where a dedicated messaging system would increase our availability is at the ingest layer between our system and the external world (1). External picks and high-load can be ‘buffered’ in a messaging system that would be able to accept a new request and store them until the system is ready to process them. Such a solution provides metrics that can be used to increase or decrease the size of the AKS cluster, taking into account the no. of messages that are waiting in the queue to be processed.</p><p>The second location where such a dedicated messaging system would improve the quality metrics is the communication between the system and any other external system. For example, our ASK cluster can communicate with another AKS cluster that is responsible for another set of functionality. For this, an async communication based on the messaging system would fully decouple all the integration points.</p><p>In both scenarios, a messaging system like Azure Services Bus can be used hand in hand with AKS. Being an external service, outside AKS allows us to have an additional redundancy layer in the case of a failing of our microservices hosted inside AKS. With no extra effort, we can spin a new AKS cluster and deploy our system. Messaging backup and redundancy is provided out of the box by Azure Service Bus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*Q7ByXd1CQap66emg.png" /></figure><p>Another location where a messaging system can be used is between the services inside AKS, where we have the option to use direct calls or a messaging system. For internal communication, I don’t recommend to use external messaging systems that are not hosted inside the cluster. External communication would increase the latency to the system, that might affect the end to end process duration. For internal communication a messaging broker like KubeMQ or Redis.</p><p>In general, I would try to avoid for internal communication solution outside the AKS cluster.with some isolated exception, where special requirements are defined. You don’t want to add the extra latency and complexity by calling external services/systems.</p><p>Once you decide to use Azure Services Bus for the above communication, you should know that you will have out of the box features that will resolve common issues related to failure and redundancy.</p><p>On the premium tier, you already have a predictable performance and the ability to scale-up/down the resources available for the messaging system using MU (Messaging Units). Geo-replication and geo-disaster are supported, allowing us to execute a failover or a replication procedure.</p><p>Even so, a part of the actions needs to be managed manually from PowerShell, Portal or code.</p><p>In the next post, we will approach how you can implement a replication of failover procedure.</p><p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/external-messaging-system-around-aks.html">http://vunvulearadu.blogspot.com/2019/01/external-messaging-system-around-aks.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Join our community Slack and read our weekly Faun topics ⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cce8ec75ebc" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/decouple-external-communication-inside-aks-azure-kubernetes-services-6cce8ec75ebc">Decouple external communication inside AKS (Azure Kubernetes Services)</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes and cloud providers]]></title>
            <link>https://medium.com/@raduvunvulea/kubernetes-and-cloud-providers-a2bb22f69dcb?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2bb22f69dcb</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 14:35:01 GMT</pubDate>
            <atom:updated>2019-01-14T14:35:01.873Z</atom:updated>
            <content:encoded><![CDATA[<p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/kubernetes-and-cloud-providers.html">http://vunvulearadu.blogspot.com/2019/01/kubernetes-and-cloud-providers.html</a></p><p>In the microservices era, dominated by cloud providers the standard requirement that I receive on every strategic project is<br>The solution needs to independent from the hosting provider and needs to support on-premises solutions.<br>The standard context for this requirement is to support cloud providers — Microsoft Azure and AWS. Additional to this, with minimum effort (less than 5% of development cost), the solution shall be run on-premises.</p><p>The requirements are tricky even if at first glance you would say that Kubernetes is the solution. Two concerns need to be tackled. The first one is related to what kind of platform shall be used to host the Kubernetes solution. The second one related to how the solution shall use many native cloud services.</p><p>Kubernetes it is a powerful container-orchestration solution that allows us to scale our microservice solution. The downside of Kubernetes is that you need to install and configure many services besides Kubernetes itself if you want to have a working solution. From reverse proxy to package deployment solution, you will need to manage it by yourself.<br>AWS (EKS) and Microsoft Azure (Azure Kubernetes Service) are offering robust environments where you can run your Managed Kubernetes Environment. With low cost, you can spin-up your cluster and run solution inside such an environment. Even if it is super easy to spin-up your cluster, you need to know what you are doing there. Many times, you need to do the same things over and over again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*MjuxFsjiFafw7rxS.PNG" /></figure><p>A solution that is starting to become more and more interesting for companies is OpenShift solution from Red Hat. The solution is constructed on top of Docker and managed using Kubernetes. It is not free but is providing a better experience by having more features included out of the box. Beside image management and deployment configuration, the so-called ‘Routes’ (reverse proxy) are integrated inside OpenShift much better than Ingress Resources and Ingress Controllers that need to be managed by yourself. OpenShift is supported on both AWS and Microsoft Azure ecosystem, and I notified that big organization prefers to pay for OpenShift costs to get them out of the box configuration that is already offered by default.<br>Things can become more interesting if you put on-premises on top of this. Managing the Kubernetes cluster by yourself, it is not an easy task and having the support of OpenShift can make the team life much more comfortable.</p><p>The second problem is the most sensible one because finding the right balance between native cloud services and build-by-yourself is hard. On one side you can optimize development and configuration cost by using native cloud services. This will force you in time to take technical decisions based on specific features available and sometimes forget about topics likes security or redundancy because you already have them by default.<br>When you build-by-yourself the solution, the dependency to a cloud provider is minimal, but the system looks more like on-premises system. The development and configuration effort are high, and you might ask yourself why I’m using a cloud provider.<br>A common approach for this situation is to build an API that isolated the cloud infrastructure from your application. In this way, you can control the area of your solution that has a direct dependency on the cloud provider. At least you know the code areas that need to be changed.<br>Another approach is to start to build components oriented to your functionality and design. The integration with cloud services shall be in only one location, but besides this, the API that is exposed by cloud integration components should take into account the features available cross-cloud provides. In this way, you can ensure that you have a solution that is compatible with other cloud providers too. For example, using Active Directory (AD) to control access to file storage can be a good solution when you are using Microsoft Azure, but you might have a problem if you would look for a similar solution on AWS.</p><p>Remember that no solution fits all and all the time is about tradeoffs. When you decide the approach that you want to use, take into account timeline and when you will need to integrate/use the second cloud provided.</p><p>Source: <a href="http://vunvulearadu.blogspot.com/2019/01/kubernetes-and-cloud-providers.html">http://vunvulearadu.blogspot.com/2019/01/kubernetes-and-cloud-providers.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2bb22f69dcb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tampering a flight reservation]]></title>
            <link>https://medium.com/@raduvunvulea/tampering-a-flight-reservation-3ddfa1e84fb7?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ddfa1e84fb7</guid>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Mon, 10 Dec 2018 11:58:39 GMT</pubDate>
            <atom:updated>2018-12-10T11:58:39.160Z</atom:updated>
            <content:encoded><![CDATA[<p>n this post, I would like to tackle a day to day problem of airplane travelers — booking security.</p><p><strong>Epilogue</strong><br>The story began a few days ago when my friend airplane reservation was canceled by the agency that bought the airplane tickets. The request was made to the agency because my friend was too lazy to access the airplane website and cancel the ticket.<br>I question that pop-up in my mind was related to who are the entities and groups that have the right to cancel or to do changes on airplane reservations. I started to research this topic to find out what are the tools and mechanisms that can ensure us that we can secure our reservation from 3rd parties that could do changes on our ticket without our approval.</p><p><strong>Research </strong><br>I started from the ground using an existing reservation that I had for a business trip in the US. Each airplane reservation has 3 piece of information that enables you to manage your booking<br>(1) Name — The traveler name<br>(2) Booking reference– An alpha-numeric code used to identify a booking<br>(3) Ticket number — No of the ticket that contains 13 digits</p><p>This information is called in the industry PNR (Passenger Name Record) and can contain more than the above data. If you book a car or a hotel, this information also can be found inside it. This data is available starting from the moment when you do a reservation and is available for a certain period after you do the trip.<br>Once you have the booking reference you can visit the airline website and see details about your trip. As long as the data are only for display, this would not be such a big concern. Even if it is private information, you could live with it; it is not the end of the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*lQfYuFyK1zVc8TXi.PNG" /></figure><p>From the airline website, you can do more than just taking a look at the booking information. You can do any changes to the booking, even canceling the reservation.</p><p>STOP! Wait a minute!</p><p>Does it means that if I can put my hand on the booking reference and the traveler name I can cancel his reservation?</p><p>Ohhh YES, big time.</p><p>The biggest problem is that on many airline websites, once you cancel a trip, you cannot undo the cancellation. You need to call the airline, wait for a few hours on the phone until you can talk with somebody from the support that it is not a robot and look for help. If you are too late, you can end up buying a new ticket.<br>There were cases when people booking was modified and only during the check-in, they found out that the final destination was different from what it was in the initial phase.<br>I was surprised not to find any additional step before a trip is canceled or modified. Yes, in general airlines are sending an email that notifies the passager that the trip was canceled. Because of the high no of spam email, there are pretty big chances that you will miss it. Let’s say that you are on holidays and you don’t check the email.<br>More funny is that using the booking reference and the person name you can even call the airline and do changes on the ticket. Except for the name, the date of birth is known by the airline company.</p><p><strong>More digging </strong><br>I started to discuss with a few airlines carries over the phone and Twitter to find out what are my options and what can I do to secure the booking a little more. I was surprised to find out that in general, you don’t have any additional security steps that you can enable.<br>Some airlines are allowing you to set a secret pass that is asked if you call them to change the reservation, but online you can do changes on any booking (in most of the cases). There are some exceptions from this rule, but there are some isolated cases.<br>The current system is allowing us very easily to tamper a flight reservation. Their current system is not only outdated but expose sensitive data to any person that knows the booking reference and your name.</p><p><strong>How did this happen?</strong><br>All airlines and travel agency needs to be able to communicate with each other related to booking information. It is required in the context of agencies that book our flights or when we have a long flight with multiple connections with different carriers.<br>The backend system is based on GDS (Global Distribution System) that enables transactions between airlines and the rest of ecosystem (travel agency, car rental companies and so on). On top of this, many services enable us to track our flight and bookings that are build on top of GDS.<br>The system is powerful, but it was not designed around security. It enables different parties to exchange data, and it is used by all the industry. Doing any changes to the system takes a year, requiring all 3rd parties to update their system, integrate new security protocol and so on.<br>History: GDS was initially designed in 1960 and updated in 1970 to support B2B communication.</p><p>There are many other solutions that you can think and imagine, but now we have GDS that is a legacy system used at a global scale. Changing the API or behavior is expensive and slow. Even if there are only 3 big vendors (Amadeus, Sabre, and Travelport), the complexity of any change is high and updating all the system involved is a time-consuming process. Backward compatibility is important.</p><p><strong>Could we have a hotfix? </strong><br>It is possible to image one, but without understanding the business domain and the complexity, it’s just an opinion and nothing more.<br>A ‘simple’ hotfix that was already implemented by some airlines is to send a confirmation email or SMS that required the owner to confirm the change or the cancellation. The main idea is good, but what happens when the booking is done by an agency, that does not have the passager email or phone? They will use their email; it means that only the agency can do changes on the ticket.<br>Another case is when the agency has the traveler email and provide both emails (passager and agency). Does the confirmation is required from both parties or only one? What will be the master email? There are so many narrows cases that need to be covered, that is pretty hard to find a hotfix that will work on the most scenarios.</p><p>I would prefer to be able to set a passcode that would force that any changes on the ticket to be done from the carrier website only where passcode would be required. The problem is related to the booking information. The booking information does not contain any personal information except name, nationality, and date of birth. Meaning that if I would call the support to set a passcode, how they would identify me? Based on what information? The solution might work only for situations when you book the ticket directly from the carrier website, and you set the passcode when you book the ticket. Another questions pop-up — How you could reset the passcode if you would forget it?</p><p>You see, even if the initial problem was simple and funny, the solutions are not so simple. Of course, we could find a solution, but the problem is more complicated than we think.</p><p><strong>Story — Round-trip cancellation </strong><br>Note: At the end of the post you can find a list of tips that could help you to avoid such situations, but before it, I would like to share with you a case where almost all of us are exposed.</p><p>Imagine that you go on holiday in the UK for 2 weeks. When you arrive at the airport, you drop your baggage and go to the security control. You leave your ticket inside the security box, and the person behind you will do a photo of your ticket.<br>The ticket already contains the booking reference number of the ticket number together with your name. It is more than enough for any person to access your booking and modify it. Let’s say that he cancel your ticket for return. Are you on holiday right? So you don’t check your emails… until the last day when you want to check-in when… surprise… your trip was canceled. Enjoy the time that you will spend on the phone with the support line. In the worst case, you will have to pay for a new ticket. Moreover, remember, it is not the airline fault.<br>In my last trip, at the security queue I was able to see at least 2 tickets that I could ‘hack.’</p><p>This is not an imaginary story. Try to bing it on Google, and you’ll find many situations like this. The internet is full of this kind of stories.</p><p><strong>Tips </strong><br>Below you can find some tips that could help us to avoid situations like this:</p><ol><li>Don’t share the booking information with anybody else</li><li>Register your email to your booking; it enables you to get notifications when changes are done on your ticket</li><li>Try to keep the ticket hidden from other people (don’t leave your ticket on the table when you are at the business lounge)</li><li>Never share the photo of your ticket on social media</li></ol><p>The main general rule is to keep your booking information as safe as possible and when you see any changes on your reservation call the airline as soon as possible. They will give their best to help you.</p><p>SHARE</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ddfa1e84fb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Auto) Scaling dimensions inside Azure Kubernetes Service (AKS)]]></title>
            <link>https://medium.com/@raduvunvulea/auto-scaling-dimensions-inside-azure-kubernetes-service-aks-1749af79145e?source=rss-95c39d28a3b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1749af79145e</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[ak]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Radu Vunvulea]]></dc:creator>
            <pubDate>Mon, 03 Dec 2018 11:11:04 GMT</pubDate>
            <atom:updated>2018-12-03T11:11:04.377Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure Kubernetes Services (AKS) it’s the perfect location where you can deploy and run your Kubernetes system. You just deploy your application, focusing on business needs and letting Microsoft manage your infrastructure.</p><p>Once your application is a big success and you have a lot of visitors or clients you will need to scale-up or down based on different factors like no of users, no of views or many other specific counters. Let’s see how you can scale your Kubernetes solution inside AKS and what Microsoft prepared to us to support our dynamic scaling.</p><p>Of the most appealing feature of a microservice architecture is scaling, that it is more granular than on a classical deployment, providing us the flexibility to scale only the components that are on stress. In this way, we can optimize how we consume our computation resources.</p><p><strong>Scaling dimensions</strong></p><p>Inside Kubernetes, there are different directions on how we can scale our applications. Two have them are more on the software side and can be done automatically. The 3rd one it is more related to hardware and computation resources and even in a cloud provider like Azure or AWS would take a few minutes.</p><p>The first dimension is the no. of instances of a specific service or pods (a pod can include one or multiple types of services). This involves increasing the no. of instances of a service that is under pressure. By having a Kubernetes cluster that has multiple computation units (VM nodes), we can balance the no. of services based on our need without having to spin-up new nodes.</p><p>The second dimension is the cluster size. Each Kubernetes cluster contains multiple VM nodes. When the load on the physical or virtual nodes is high, we can increase the cluster size by adding additional nodes. When scaling in this way, you need to have the computation resources available. AKS and Kubernetes can automatically do all the configuration of the new nodes and move the service instances on them.</p><p>In comparison with the first dimension, the scaling activity can take from a few minutes to even half an hour or more. Why? The infrastructure provider needs to configure and VM with your specific OS configuration. This activity is similar to creating and setting a VM from scratch. To decrease the time, Microsoft and other providers are keeping in the queue some machines already configured with different configurations. This is why you can spin-up an AKS cluster in just 2–3 minutes.</p><p>The 3rd dimension is the VM size (tier). Scaling in this way it is not common because it involves replacing some nodes from the cluster with different VMs. When you scale using this approach, you add more powerful nodes to the cluster, migrate service instances to them and retire a part of the existing nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*6qdkBVWEX-lbHEXt.PNG" /></figure><p><strong>Manual scaling</strong></p><p>I’m pretty sure that you already know about manual scaling and you are not interested too much about it. Manual scaling can happen at pods level. Using the shell, we can specify the no. of replicas that we want to have. In the below example we set the no. of replicas (instances) of Card pod from 5 to 9</p><p><em>kubectl scale — replicas=9 deployment/rv_epi_card</em></p><p>Using ‘get pods’ command we can see the list of pods that we have</p><p><em>$ kubectl get pods</em></p><p><em>READY STATUS RESTARTS AGE</em></p><p><em>rv-epi-card-3545353453–2hfh0 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453-bzt05 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453-fvcvm 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453-hrbf2 1/1 Running 0 15m</em></p><p><em>rv-epi-card-3545353453-qphz8 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453-th3h1 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453–5z504 1/1 Running 0 20m</em></p><p><em>rv-epi-card-3545353453-rvfvm 1/1 Running 0 3m</em></p><p><em>rv-epi-card-3545353453–1rbgf 1/1 Running 0 15m</em></p><p>We can scale the size of the cluster directly from Azure Portal or from the shell by changing the no. of nodes inside the cluster.</p><p><strong>Auto Scaling</strong></p><p>When we talk about auto scaling inside AKS, we need to keep in mind that there are two dimensions of scaling that we can automatize with out of the box features. One is controlled by AKS and Kubernetes and related to the of instances of the same type (services of pods) — so-called replicas inside Kubernetes. The second one is the cluster size, where we can add or remove nodes dynamically based on different counters and formulas that we define and control.</p><p><strong>Horizontal Pod Autoscaler (HPA)</strong></p><p>Horizontal Pod Autoscaler (HPA) can monitor the load of pods and resources and can decide to increase or decrease the number of replicas for each pod. The HPA is the same version that we have any Kubernetes cluster with version 1.8 or higher. It is checking the load on pods and replicas every 30 seconds, and it can decide to decrease or increase the number of replicas. The Metric Server collects the counter information from workers and can provide input for the HPA (e.g., CPU, memory, network).</p><p>There are moments when this is not enough, and you need to collect or use custom metrics. For this situations, we can install and configure other monitoring systems like Prometheus. It is widely used mainly when we have custom metrics that we want to use to archive auto-scaling at pod level. Metrics from Prometheus are exposed in the same format as Metric Server and can be consumed by the HPA over an adapter (Prometheus Adapter) that is able to push metrics to HPA.</p><p><em>kind: HorizontalPodAutoscaler</em></p><p><em>apiVersion: autoscaling/v2alpha1</em></p><p><em>metadata:</em></p><p><em>name: rv-epi-card-hpa</em></p><p><em>spec:</em></p><p><em>scaleTargetRef:</em></p><p><em>kind: Deployment</em></p><p><em>name: rv-epi-card</em></p><p><em>minReplicas: 2</em></p><p><em>maxReplicas: 8</em></p><p><em>metrics:</em></p><p><em>- type: Object</em></p><p><em>object:</em></p><p><em>target:</em></p><p><em>kind: Service</em></p><p><em>name: sample-metrics-app</em></p><p><em>metricName: http_request</em></p><p><em>targetValue: 256</em></p><p>The above configuration specified in the *.yaml file configures the HPA to have as target 265 HTTP requests per second. To achieve this, it will increase and decrease the no. of replicas of our pod between 2 and 8 replicas to achieve the 265 HTTP requests per second.</p><p><strong>Cluster Autoscaler (CA)</strong></p><p>In comparison with HPA, the cluster autoscaling it is a more Azure specific functionality. Every 10 seconds is checking the load of the cluster and if the number of nodes of the cluster needs to be increased or decreased.</p><p>The current integration with HPA enables CA to remove unused nodes if no pods are running on nodes for more than 10 minutes. CA checks HPA if there are enough nodes for pods (every 10 seconds) and increase the number of nodes if there are not enough nodes for pods. There there are not enough resources to increase the number of pods, the HPA has specific metrics/flag that can read by CA.</p><p>A difference between CA and HPA is on how they are looking at resources consumed. HPA is looking at the actual resources consumed by a pod replica. In contrast, the default behavior of CA is to look at the resources required in the*.yaml file for a specific service.</p><p><em>resources:</em></p><p><em>requests:</em></p><p><em>cpu: 250m</em></p><p><em>memory: 96Mb</em></p><p>In the above example, we specified that the service instance requires a quarter of vCPU and 96Mb of memory.</p><p><strong>On-demand fast scaling</strong></p><p>CA and HPA work great, but it is impossible to add a new node to the cluster in just a few seconds. There is no SLA related to how long it takes to AKS to increase the cluster size. For this kind of situations what we can do to be able to handle the load peek on our application.</p><p>Imagine that you have a website that sales food and Friday afternoon you have a peek on the number of clients that want to order. If your application is slow for a few minutes, the clients will use another system to order the dinner.</p><p>In a standard Kubernetes deployment you would not be able to do too much if nodes are not physically available. Inside AWS or Azure, systems like CA can increase the number of nodes automatically, but still, there are a few minutes latency when you can lose business.</p><p>For this kind of situations, Microsoft gives us the ability to extend our cluster inside Azure Container Instances (ACI). ACI is a SaaS solution inside Azure to host and run our micro-services. By integrating ACI with AKS we can scale out our cluster in just a few seconds inside ACI.</p><p>This is possible by the way how ACI was integrated inside AKS. ACI it is seen as multiple notes of AKS cluster. From Kubernetes perspective is just a pool of nodes like any other nodes of the cluster.</p><p>Behind the scene, ACI is mapped as nodes that can run replicas of the poods. The virtual nodes are added inside a subnet that is secured connected to AKS. Even if the computation runs inside ACI, there is a sandbox that guarantee us that our pods are isolated from other users.</p><p><strong>Overview</strong></p><p>Scaling inside AKS is simple but at the same time complex. We have all the tools necessary to configure autoscaling, but the trick, as usual, is to know how to configure it to respond to your specific needs. Even if the integration with ACI is only at the beginning, the base concept is powerful and full with potential for high loads. HPA works as it would work on an on-premises cluster, allowing us to use the same configuration without taking into account if we are on-premises or inside Azure.</p><p>CA is useful when we need autoscaling, but can be tricky to configure when the default behavior is not enough for us. The good part is that is not too common to configure autoscaling at nodes level.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1749af79145e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>