{"id":20352,"date":"2017-01-31T05:06:53","date_gmt":"2017-01-31T02:06:53","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=20352"},"modified":"2018-05-15T15:31:45","modified_gmt":"2018-05-15T12:31:45","slug":"microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/","title":{"rendered":"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Why_Steeltoe\" >Why Steeltoe<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Microservices-based_and_cross-platform\" >Microservices-based and cross-platform<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Website_implementation\" >Website implementation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Services_implementation\" >Services implementation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#Related_reading\" >Related reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Why_Steeltoe\"><\/span>Why Steeltoe<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-logo-v2.png\" alt=\"Pivotal Cloud Foundry Steeltoe logo v2\" width=\"180\" class=\"alignright size-full wp-image-19396\" \/><\/p>\n<p><a href=\"https:\/\/steeltoe.io\/\" target=\"_blank\">Steeltoe<\/a> is an open-source project that can help developers to create .NET microservices on Cloud Foundry, providing access to Spring Cloud and NetflixOSS tools powering cloud-native Java apps.<\/p>\n<p>In our <a href=\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\">previous post<\/a>, we explained how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app using Steeltoe. If you want to explore Steeltoe in detail, you may also check out these two articles: <a href=\"https:\/\/tanzu.vmware.com\/content\/blog\/introducing-steeltoe-rc1-a-microservices-toolkit-for-net\" target=\"_blank\">Introducing Steeltoe<\/a> and <a href=\"https:\/\/seroter.com\/2016\/10\/18\/using-steeltoe-with-asp-net-4-x-apps-that-need-a-microservices-friendly-config-store\/\" target=\"_blank\">Steeltoe for ASP.NET 4.x<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Microservices-based_and_cross-platform\"><\/span>Microservices-based and cross-platform<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With this blog post, we wanted to go further and created a sample <a href=\"https:\/\/dotnet.microsoft.com\/en-us\/download\" target=\"_blank\">.NET Core<\/a> app using RabbitMQ and Microsoft Cognitive Services API. The app allows users to detect human faces on a photo and extract avatars from it. With .NET Core, the code can be used for both Windows and Linux systems.<\/p>\n<p>This example demonstrates the results of how the app works. \ud83d\ude09 We&#8217;ve taken the source photo (featuring the legendary <a href=\"https:\/\/www.linkedin.com\/in\/jamesjwatters\" target=\"_blank\">James Watters<\/a>) from <a href=\"https:\/\/twitter.com\/badnima\" target=\"_blank\">Nima Badiey&#8217;s Twitter<\/a>:<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/face-api-microsoft-cognitive-services.jpg\" alt=\"face-api-microsoft-cognitive-services\" width=\"600\" class=\"aligncenter size-full wp-image-20501\" \/><small><em>Image credit: <a href=\"https:\/\/twitter.com\/badnima\/status\/722534013093580800\" target=\"_blank\">Nima Badiey<\/a><\/em><\/small><\/center><\/p>\n<p>The extracted avatars:<\/p>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/face-api-microsoft-cognitive-services-output-v11.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/face-api-microsoft-cognitive-services-output-v11.png\" alt=\"face-api-microsoft-cognitive-services-output-v11\" width=\"600\" height=\"314\" class=\"aligncenter size-full wp-image-20549\" \/><\/a><\/center><\/p>\n<p>The solution itself consists of a website and two services. All communication between the website and the services was done via RabbitMQ queues. Implementing the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dn568101.aspx\" target=\"_blank\">Competing Consumers pattern<\/a> made the system more reliable and scalable, while also helping us to decouple this system into small components.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/building-microservices-with-steeltoe-microsoft-cognitive-api-and-cloud-foundry.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/building-microservices-with-steeltoe-microsoft-cognitive-api-and-cloud-foundry.png\" alt=\"building-microservices-with-steeltoe-microsoft-cognitive-api-and-cloud-foundry\" width=\"640\" class=\"aligncenter size-full wp-image-20357\" \/><\/a><\/p>\n<p>The source code of the app is available in <a href=\"https:\/\/github.com\/Altoros\/cf-example-netcore-rabbit-steeltoe\" target=\"_blank\">this GitHub repository<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Website_implementation\"><\/span>Website implementation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We used Steeltoe to simplify the code needed to initialize the RabbitMQ client. It hooks up automatically the app\u2019s environment variables to the RabbitMQ client and provides a factory for creating instances of the client.<\/p>\n<p>Configuration initialization:<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n    public class Startup\r\n    {\r\n        public Startup(IHostingEnvironment env, ILoggerFactory logFactory)\r\n        {\r\n            ...\r\n\r\n            \/\/ Set up configuration sources.\r\n            var builder = new ConfigurationBuilder()\r\n            ...\r\n                .AddEnvironmentVariables()\r\n                \/\/ Add to configuration the Cloudfoundry VCAP settings\r\n                .AddCloudFoundry();\r\n\r\n            Configuration = builder.Build();\r\n        }\r\n        \r\n        public void ConfigureServices(IServiceCollection services)\r\n        {\r\n            ...\r\n            services.AddRabbitConnection(Configuration);\r\n        }\r\n    }<\/pre>\n<p>The <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">FromServices<\/code>  attribute tells the dependency injection resolver to create an instance of the client using <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">ConnectionFactory<\/code> initialized with a connection string and credentials from environment variables.<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n    public class MainController : ApiController\r\n    {\r\n        private readonly ConnectionFactory _rabbitConnection;\r\n\r\n        public MainController(&#x5B;FromServices] ConnectionFactory rabbitConnection)\r\n        {\r\n            _rabbitConnection = rabbitConnection;\r\n        }\r\n    }\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Building the project<\/strong><\/p>\n<p>To create a framework-dependent deployment, we set <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">\"type\": \"platform\"<\/code> in the <em>project.json<\/em> file. To build the project, you can run the following commands:<\/p>\n<pre style=\"padding-left: 20px;\">dotnet restore<\/pre>\n<p>The command restores NuGet packages for third-party dependencies.<\/p>\n<pre style=\"padding-left: 20px;\">dotnet publish -o publish -c Release<\/pre>\n<p>The command builds and publishes the project into the <em>publish<\/em> folder.<\/p>\n<p>&nbsp;<br \/>\n<strong>Cloud Foundry manifest file<\/strong><\/p>\n<p>The <em>manifest.yml<\/em> file contains settings for application deployment to Cloud Foundry:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">---\r\napplications:\r\n- name: avatarmaker.web\r\n  memory: 512M\r\n  command: dotnet .\/AvatarMaker.Web.dll --server.urls &quot;http:\/\/*:$PORT&quot;\r\n  buildpack: https:\/\/github.com\/cloudfoundry-community\/asp.net5-buildpack.git\r\n  services:\r\n   - avatarmaker.rmq<\/pre>\n<p>Since the .NET framework is installed into containers by Cloud Foundry\u2019s .NET Core buildpack (that\u2019s why we opted for the framework-dependent deployment setting in the project), the command for starting the application looks as follows:<\/p>\n<pre style=\"padding-left: 20px;\">dotnet .\/AvatarMaker.Web.dll --server.urls \"http:\/\/*:$PORT\"<\/pre>\n<p>We also needed to set the RabbitMQ service as a dependency to bind the service instance automatically to the app.<\/p>\n<pre style=\"padding-left: 20px;\">services:\r\n - avatarmaker.rmq<\/pre>\n<p>&nbsp;<br \/>\n<strong>Deployment<\/strong><\/p>\n<p>To create an instance of the RabbitMQ service and deploy the application, the following commands should be used.<\/p>\n<ol>\n<li>\n<p>Get the list of services available in the Cloud Foundry marketplace:<\/p>\n<pre style=\"padding-left: 20px;\">cf marketplace\r\n\r\nservice            plans                         description\r\nmysql              100mb, 1gb                    MySQL databases on demand\r\np-rabbitmq         standard                      RabbitMQ is a robust and scalable high-performance multi-protocol messaging broker.\r\npostgresql95       free                          postgresql 9.5 (beta1) service for application development and testing\r\nredis              shared-vm, dedicated-vm       Redis service to provide a key-value store<\/pre>\n<\/li>\n<li>\n<p>Create an instance of the service:<\/p>\n<pre style=\"padding-left: 20px;\">cf create-service p-rabbitmq standard avatarmaker.rmq<\/pre>\n<\/li>\n<li>\n<p>Deploy the application:<\/p>\n<pre style=\"padding-left: 20px;\">cf push -p publish<\/pre>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/pushing-net-core-app-to-cloud-foundry.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/pushing-net-core-app-to-cloud-foundry.png\" alt=\"pushing-net-core-app-to-cloud-foundry\" width=\"640\" class=\"aligncenter size-full wp-image-20519\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Services_implementation\"><\/span>Services implementation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Similarly to the website implementation process, we relied on Steeltoe to create instances of the RabbitMQ client:<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">IServiceCollection services = new ServiceCollection();\r\nvar config = new ConfigurationBuilder()\r\n                .AddEnvironmentVariables()\r\n                .AddCloudFoundry()\r\n                .Build();\r\nservices.AddRabbitConnection(config);\r\nvar connectionFactory = services.BuildServiceProvider().GetService&lt;ConnectionFactory&gt;();<\/pre>\n<p>The <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cognitive-services\/face-api\/\" target=\"_blank\">Face API<\/a> from <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cognitive-services\/\" target=\"_blank\">Microsoft Cognitive Services<\/a> was used to detect human faces in images. The Recognizer app sends an image URL to the web service, and the latter returns an array of rectangles with faces. The data is then sent to the message broker and processed by the last microservice in the chain\u2014the EmailSender app. It downloads the image, crops it using the list of rectangles, and sends the cropped out face avatars back by email.<\/p>\n<p><center><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-net-app-using-ms-face-api-service-implementation.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-net-app-using-ms-face-api-service-implementation.png\" alt=\"microservices-with-steeltoe-and-cloud-foundry-net-app-using-ms-face-api-service-implementation\" width=\"640\" class=\"aligncenter size-full wp-image-20551\" \/><\/a><small><em>Image credit: <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cognitive-services\/face-api\/\" target=\"_blank\">Microsoft<\/a><\/em><\/small><\/center><\/p>\n<p>&nbsp;<br \/>\n<strong>Building the services<\/strong><\/p>\n<p>To build the services, see the website building steps described above.<\/p>\n<p>&nbsp;<br \/>\n<strong>Cloud Foundry manifest file<\/strong><\/p>\n<p>The <em>manifest.yml<\/em> file for the services is different from the website\u2019s manifest file:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">---\r\napplications:\r\n- name: avatarmaker.emailsender\r\n  memory: 512M\r\n  buildpack: https:\/\/github.com\/cloudfoundry\/dotnet-core-buildpack.git\r\n  command: dotnet .\/AvatarMaker.EmailSender.dll\r\n  services:\r\n   - avatarmaker.rmq\r\n  no-route: true\r\n  health-check-type: none<\/pre>\n<p>This application is a worker without an HTTP endpoint, so no routes are needed:<\/p>\n<pre style=\"padding-left: 20px;\">no-route: true<\/pre>\n<p>You have to disable <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">health-check<\/code> to make Cloud Foundry believe that the app is running properly:<\/p>\n<pre style=\"padding-left: 20px;\">health-check-type: none<\/pre>\n<p>&nbsp;<br \/>\n<strong>Deployment<\/strong><\/p>\n<p>The deployment process is the same as that of the website, but with the first two steps skipped: there is no need to create another service instance.<\/p>\n<p>Note that this demo app has some deficiencies  that real-life applications don\u2019t have the luxury to disregard, such as:<\/p>\n<ul>\n<li style=\"margin-bottom: 10px;\">App settings are hardcoded, while the best practice is to use centralized storage for the settings, such as Spring Cloud Config Server\u2014Steeltoe offers helper classes for it.<\/li>\n<li>Nothing was done for error logging, and only the Cloud Foundry log aggregator component was used.<\/li>\n<\/ul>\n<p>The source code of the app is available in <a href=\"https:\/\/github.com\/Altoros\/cf-example-netcore-rabbit-steeltoe\" target=\"_blank\">this GitHub repository<\/a>.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/net-core-microservices-with-steeltoe-and-cloud-foundry.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/net-core-microservices-with-steeltoe-and-cloud-foundry.png\" alt=\"net-core-microservices-with-steeltoe-and-cloud-foundry\" width=\"640\" class=\"aligncenter size-full wp-image-20430\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>With Cloud Foundry, a .NET developer can create and deploy a scalable microservices-based .NET Core app fast and cost-effectively. Usage of Steeltoe\u2019s adapter for ASP.NET Core RabbitMQ Client saved the effort required to initialize RabbitMQ connectors\u2014otherwise, connection strings and credentials would need to be extracted from environment variables manually.<\/p>\n<p>The developed system can be deployed on any Cloud Foundry distribution. Since the project uses .NET Core, it supports both Windows and Linux stacks. However, since <a href=\"https:\/\/dotnet.microsoft.com\/en-us\/download\" target=\"_blank\">.NET Core<\/a> is a cross-platform technology, one should not expect that it supports the full .NET Framework functionality.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Related_reading\"><\/span>Related reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\">Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry<\/a><\/li>\n<\/ul>\n<hr\/>\n","protected":false},"excerpt":{"rendered":"<p>Why Steeltoe<\/p>\n<p>Steeltoe is an open-source project that can help developers to create .NET microservices on Cloud Foundry, providing access to Spring Cloud and NetflixOSS tools powering cloud-native Java apps.<\/p>\n<p>In our previous post, we explained how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app using Steeltoe. If [&#8230;]<\/p>\n","protected":false},"author":132,"featured_media":20572,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,146,206,28],"class_list":["post-20352","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-microservices","tag-oss-cloud-foundry","tag-pivotal-cf"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros<\/title>\n<meta name=\"description\" content=\"Demonstrating how to develop\/deploy a cross-platform .NET Core app on Cloud Foundry, this solution is using RabbitMQ and Microsoft Cognitive Services API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros\" \/>\n<meta property=\"og:description\" content=\"Why Steeltoe Steeltoe is an open-source project that can help developers to create .NET microservices on Cloud Foundry, providing access to Spring Cloud and NetflixOSS tools powering cloud-native Java apps. In our previous post, we explained how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app using Steeltoe. If [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-31T02:06:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-15T12:31:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"550\" \/>\n\t<meta property=\"og:image:height\" content=\"407\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Aleksey Yermolenko\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aleksey Yermolenko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/\",\"name\":\"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif\",\"datePublished\":\"2017-01-31T02:06:53+00:00\",\"dateModified\":\"2018-05-15T12:31:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/8c1081a61a22caf31068f96a6b4bb957\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif\",\"width\":550,\"height\":407},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/8c1081a61a22caf31068f96a6b4bb957\",\"name\":\"Aleksey Yermolenko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/IMG_author-150x150.png\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/IMG_author-150x150.png\",\"caption\":\"Aleksey Yermolenko\"},\"description\":\"Aleksey Yermolenko is a Solutions Architect at Altoros. With over 3 years of experience in cloud-native application development and about 10 years in software development, Aleksey has accumulated extensive expertise in delivering complex large-scale solutions. He is also a Microsoft Certified Professional Developer.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/aleksey-yermolenko\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros","description":"Demonstrating how to develop\/deploy a cross-platform .NET Core app on Cloud Foundry, this solution is using RabbitMQ and Microsoft Cognitive Services API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/","og_locale":"en_US","og_type":"article","og_title":"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros","og_description":"Why Steeltoe Steeltoe is an open-source project that can help developers to create .NET microservices on Cloud Foundry, providing access to Spring Cloud and NetflixOSS tools powering cloud-native Java apps. In our previous post, we explained how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app using Steeltoe. If [...]","og_url":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/","og_site_name":"Altoros","article_published_time":"2017-01-31T02:06:53+00:00","article_modified_time":"2018-05-15T12:31:45+00:00","og_image":[{"width":550,"height":407,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif","type":"image\/gif"}],"author":"Aleksey Yermolenko","twitter_misc":{"Written by":"Aleksey Yermolenko","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/","url":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/","name":"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif","datePublished":"2017-01-31T02:06:53+00:00","dateModified":"2018-05-15T12:31:45+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/8c1081a61a22caf31068f96a6b4bb957"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/microservices-with-steeltoe-and-cloud-foundry-a-net-application-using-ms-face-api-v14.gif","width":550,"height":407},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/microservices-with-steeltoe-and-cloud-foundry-a-dotnet-app-using-microsoft-face-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Microservices with Steeltoe and Cloud Foundry: A .NET App Using MS Face API"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/8c1081a61a22caf31068f96a6b4bb957","name":"Aleksey Yermolenko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/IMG_author-150x150.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/IMG_author-150x150.png","caption":"Aleksey Yermolenko"},"description":"Aleksey Yermolenko is a Solutions Architect at Altoros. With over 3 years of experience in cloud-native application development and about 10 years in software development, Aleksey has accumulated extensive expertise in delivering complex large-scale solutions. He is also a Microsoft Certified Professional Developer.","url":"https:\/\/www.altoros.com\/blog\/author\/aleksey-yermolenko\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/20352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=20352"}],"version-history":[{"count":63,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/20352\/revisions"}],"predecessor-version":[{"id":33239,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/20352\/revisions\/33239"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/20572"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=20352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=20352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=20352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}