{"id":19333,"date":"2017-01-09T07:15:05","date_gmt":"2017-01-09T04:15:05","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=19333"},"modified":"2018-05-15T15:29:27","modified_gmt":"2018-05-15T12:29:27","slug":"enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/","title":{"rendered":"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry"},"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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#What_is_Steeltoe\" >What is 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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#A_sample_NET_Core_app_on_PCF\" >A sample .NET Core app on PCF<\/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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#Preparing_a_PCF_environment\" >Preparing a PCF environment<\/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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#Pushing_the_app_to_PCF\" >Pushing the app to PCF<\/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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#App_configuration\" >App configuration<\/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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#Service_discovery\" >Service discovery<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#Using_connectors\" >Using connectors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#Related_reading\" >Related reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"What_is_Steeltoe\"><\/span>What is 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=\"200\" class=\"alignright size-full wp-image-19396\" \/><\/p>\n<p><a href=\"http:\/\/steeltoe.io\" target=\"_blank\">Steeltoe<\/a> was built to simplify the adoption of microservices for .NET developers. It provides the access to the pool of <a href=\"https:\/\/projects.spring.io\/spring-cloud\/\" target=\"_blank\">Spring Cloud<\/a> and <a href=\"https:\/\/netflix.github.io\/\" target=\"_blank\">NetflixOSS<\/a> tools that power cloud-native Java apps. What is more, the new toolkit promises first-class integration with Pivotal Cloud Foundry (PCF).<\/p>\n<p>It also simplifies step-by-step porting of a .NET 4.x app to <a href=\"https:\/\/dotnet.microsoft.com\/en-us\/download\" target=\"_blank\">.NET Core<\/a> microservices by making decomposition of monolithic architectures much easier. The transition results in a heterogeneous environment for the app: some of its parts may run on the Windows platform, while others can be deployed to Linux containers running on Cloud Foundry.<\/p>\n<p><a href=\"https:\/\/tanzu.vmware.com\/content\/blog\/introducing-steeltoe-rc1-a-microservices-toolkit-for-net\" target=\"_blank\">This post<\/a> from Pivotal sheds more light on the topic, while <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\">this one<\/a> demonstrates how to use Steeltoe for ASP.NET 4.x apps.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"A_sample_NET_Core_app_on_PCF\"><\/span>A sample .NET Core app on PCF<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For this tutorial, we designed a demo app that uses the following services available on-demand from Pivotal CF:<\/p>\n<ul>\n<li><a href=\"http:\/\/docs.pivotal.io\/spring-cloud-services\/1-3\/config-server\/\" target=\"_blank\">Config Server<\/a> for Spring Cloud apps<\/li>\n<li><a href=\"http:\/\/docs.pivotal.io\/spring-cloud-services\/1-3\/service-registry\/\" target=\"_blank\">Service Registry<\/a> for Spring Cloud apps based on <a href=\"https:\/\/github.com\/Netflix\/eureka\" target=\"_blank\">Eureka<\/a><\/li>\n<li>Redis Cache<\/li>\n<\/ul>\n<p>We have also built a sample microservices-based solution consisting of two .NET Core projects:<\/p>\n<ul>\n<li style=\"margin-bottom: 10px;\"><strong>SentimentUI<\/strong> provides a UI for users where they can submit messages or phrases for sentiment analysis. The project is a simple <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">index.html<\/code> with a script behind it sending <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">GET<\/code> requests to the controller. (Make sure the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">app.UseStaticFiles()<\/code> method is added in the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Startup.cs<\/code> file.)<\/li>\n<p>\t<a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Sentiment-Detective.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Sentiment-Detective.png\" alt=\"Pivotal Cloud Foundry Steeltoe Sentiment Detective\" width=\"640\" class=\"aligncenter size-full wp-image-19354\" \/><\/a><\/p>\n<li style=\"margin-bottom: 10px;\"><strong>SentimentAPI<\/strong> provides the app logic, connecting to <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cognitive-services\/\" target=\"_blank\">Microsoft Cognitive Services<\/a> and returning the sentiment score for the submitted message. It has only one endpoint, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">\/api\/sentiment\/{message}<\/code>, that the SentimentUI controller discovers using the Eureka service.<\/li>\n<\/ul>\n<p>Note that the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">netcoreapp1.0<\/code> framework should be set in <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">project.json<\/code> files for both app components.<\/p>\n<p>The scope of services that can be added to this app is unlimited. We can provide APIs for various processing services, computing services, or DBs, but for the demo, I\u2019m going to keep this app simple.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Preparing_a_PCF_environment\"><\/span>Preparing a PCF environment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We used the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf create-service<\/code> command to create service instances.<\/p>\n<ol>\n<li>Redis Cache:<\/li>\n<pre style=\"padding-left: 20px;\">cf create-service p-redis shared-vm redCache<\/pre>\n<li>Config Server:<\/li>\n<pre style=\"padding-left: 20px;\">cf create-service p-config-server standard config-server<\/pre>\n<li>Service Registry:<\/li>\n<pre style=\"padding-left: 20px;\">cf create-service p-service-registry standard myDiscoveryService<\/pre>\n<\/ol>\n<p>To check that the services have been installed\u2014and whether there are any apps bound to them\u2014run the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf services<\/code> command:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-CF-Services.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-CF-Services.png\" alt=\"Pivotal Cloud Foundry Steeltoe CF Services\" width=\"640\" class=\"aligncenter size-full wp-image-19355\" \/><\/a><\/p>\n<p>You can also use the Pivotal Apps Manager dashboard to view the installed services in a more user friendly way:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Apps-Manager-Dashboard.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Apps-Manager-Dashboard.png\" alt=\"Pivotal Cloud Foundry Steeltoe Apps Manager Dashboard\" width=\"640\" class=\"aligncenter size-full wp-image-19357\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Pushing_the_app_to_PCF\"><\/span>Pushing the app to PCF<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The next step is to push the app to Pivotal CF and verify that the endpoints are working. First, we need to specify the buildpack used to run our app:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-buildpack.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-buildpack.png\" alt=\"Pivotal Cloud Foundry Steeltoe buildpack\" width=\"640\" class=\"aligncenter size-full wp-image-19358\" \/><\/a><\/p>\n<p>Go to the <strong>SentimentUI<\/strong> root project folder and run <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code>. The command will automatically locate the manifest and deploy the application to Pivotal CF. As shown on the screenshot above, the manifest contains a list of services. Those services will be bound automatically to the app.<\/p>\n<p>The same works for the <strong>SentimentAPI<\/strong> project: use the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> command from the SentimentAPI root folder. A few minutes later an OK message should appear.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentAPI-cf-push.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentAPI-cf-push.png\" alt=\"Pivotal Cloud Foundry Steeltoe SentimentAPI cf push\" width=\"640\" class=\"aligncenter size-full wp-image-19360\" \/><\/a><\/p>\n<p>Now that we have a .NET Core app up and running on Pivotal CF, we can take a look at basic Steeltoe functionality in action.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"App_configuration\"><\/span>App configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Our demo app relies on the following Steeltoe components:<\/p>\n<ul>\n<li>Configuration extension for accessing configuration parameters served by Spring Cloud Config Server<\/li>\n<li>Spring Cloud Eureka Server Client for service discovery<\/li>\n<li>Steeltoe Connector for Redis<\/li>\n<\/ul>\n<p>We are going to take a mixed approach to configuring the demo app: a JSON settings file will be used to run the application locally, while Spring Cloud Config Server will be leveraged for externalized configuration.<\/p>\n<p>For local configuration, add the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">appsettings.json<\/code> file to your projects. Below is what\u2019s inside of my SentimentAPI\u2019s <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">appsettings.json<\/code> file.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentAPI-app-settings.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentAPI-app-settings.png\" alt=\"Pivotal Cloud Foundry Steeltoe SentimentAPI app settings\" width=\"420\" height=\"565\" class=\"aligncenter size-full wp-image-19362\" \/><\/a><\/p>\n<p>As you can see from the snippet, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">appsettings.json<\/code> references localhost for Config Server and Eureka. However, as soon as the app is bound to Config Server settings (provided using environment variables), the local settings will be overridden.<\/p>\n<p>Next is configuring the Config Server settings.<\/p>\n<p>As we have already created the Config Server service instance, we can update it and specify the Git  repository to retrieve configuration from. I have already created a Git repository and pushed my settings there. There is a convention and <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">spring.application.name<\/code> specified in <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">app.settings<\/code> is used to fetch the required configuration file from the repository. (For example,  it is the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">sentimentapi.yml<\/code> file for the SentimentAPI project and the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">sentimentui.yml<\/code> file for the SentimentUI project.)<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentUI-github.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-SentimentUI-github.png\" alt=\"Pivotal Cloud Foundry Steeltoe SentimentUI github\" width=\"640\" class=\"aligncenter size-full wp-image-19363\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Sentimentui-github-config.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Sentimentui-github-config.png\" alt=\"Pivotal Cloud Foundry Steeltoe Sentimentui github config\" width=\"640\" class=\"aligncenter size-full wp-image-19365\" \/><\/a><\/p>\n<p>Next, I create a simple JSON file telling Config Server to retrieve the configuration settings from my Git repository.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-json-config-server.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-json-config-server.png\" alt=\"Pivotal Cloud Foundry Steeltoe sentimentui json config server\" width=\"640\" class=\"aligncenter size-full wp-image-19366\" \/><\/a><\/p>\n<p>Now, we update the server by running the following command:<\/p>\n<pre style=\"padding-left: 20px;\">cf update-service config-server -c cloudConfig.json<\/pre>\n<p>If we go to the Pivotal services dashboard and navigate to the Config Server manager, we will see that the settings have been applied:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-manager.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-manager.png\" alt=\"Pivotal Cloud Foundry Steeltoe config server manager\" width=\"640\" class=\"aligncenter size-full wp-image-19367\" \/><\/a><\/p>\n<p>Now, we need to add Config Server as a configuration source in the app\u2019s <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Startup.cs<\/code> file. Make sure that you have the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Steeltoe.Extensions.Configuration.CloudFoundry<\/code> package installed:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-startup.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-startup.png\" alt=\"Pivotal Cloud Foundry Steeltoe config server startup\" width=\"640\" class=\"aligncenter size-full wp-image-19368\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-configureservices.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-config-server-configureservices.png\" alt=\"Pivotal Cloud Foundry Steeltoe config server configureservices\" width=\"518\" height=\"70\" class=\"aligncenter size-full wp-image-19370\" \/><\/a><\/p>\n<p>Then, add a new configuration provider to our configuration and make settings accessible from the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Config<\/code> object (see the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">SettingFromConfig<\/code> method below):<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-settingfromconfig.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-settingfromconfig.png\" alt=\"Pivotal Cloud Foundry Steeltoe settingfromconfig\" width=\"640\" class=\"aligncenter size-full wp-image-19371\" \/><\/a><\/p>\n<p>The Config Server configuration is done\u2014the settings will be applied to the app. Also, there is support for DI, and we can serialize the app settings into .NET classes directly and inject them down the track.<\/p>\n<p>Thus, basic Config Server usage has been set. In case you experience any issues, refer to the detailed tutorials on how to get started with Steeltoe and Spring Cloud: <a href=\"https:\/\/github.com\/SteeltoeOSS\/Tutorials\/blob\/master\/getting-started-local.md\" target=\"_blank\">locally<\/a> or <a href=\"https:\/\/github.com\/SteeltoeOSS\/Tutorials\/blob\/master\/getting-started-pcf.md\" target=\"_blank\">on Pivotal CF<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Service_discovery\"><\/span>Service discovery<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We are going to use Steeltoe\u2019s .NET client for Eureka to register SentimentAPI and let SentimentUI discover it.<\/p>\n<p>First, we need to register the SentimentAPI project on Pivotal CF using myDiscoverService (Service Registry). (To do this, we have previously added <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">UseDiscoveryClient<\/code> to the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">Startup<\/code> class). Here is a part from the SentimentAPI manifest file:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentapi-manifest.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentapi-manifest.png\" alt=\"Pivotal Cloud Foundry Steeltoe sentimentapi manifest\" width=\"419\" height=\"183\" class=\"aligncenter size-full wp-image-19373\" \/><\/a><\/p>\n<p>By default, the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">shouldRegisterWithEureka<\/code> parameter is true, so it is omitted here, which means that the service registers itself. It doesn\u2019t need to fetch the registry book.<\/p>\n<p>For the SentimentUI project, the other way around, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">shouldFetchRegistry<\/code> is true by default. It does have to fetch the registry book, but has no need to register itself (<code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">shouldRegisterWithEureka<\/code> is set explicitly).<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-shouldregisterwitheureka.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-shouldregisterwitheureka.png\" alt=\"Pivotal Cloud Foundry Steeltoe sentimentui shouldregisterwitheureka\" width=\"408\" height=\"132\" class=\"aligncenter size-full wp-image-19375\" \/><\/a><\/p>\n<p>Now that we understand the concept behind service discovery and have the SentimentAPI project deployed, let\u2019s check Pivotal Apps Manager:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-apps-manger-service-registry.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-apps-manger-service-registry.png\" alt=\"Pivotal Cloud Foundry Steeltoe apps manger service registry\" width=\"640\" class=\"aligncenter size-full wp-image-19377\" \/><\/a><\/p>\n<p>We can see that both apps are bound to the <em>myDiscoveryService<\/em> instance.<\/p>\n<p>Having the SentimentAPI service on the service dashboard list means that Eureka knows about it and will fetch its host name to any service asking for it.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-service-registry-sentimentapi-eureka.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-service-registry-sentimentapi-eureka.png\" alt=\"Pivotal Cloud Foundry Steeltoe service registry sentimentapi eureka\" width=\"640\" class=\"aligncenter size-full wp-image-19378\" \/><\/a><\/p>\n<p>When calling the service from SentimentUI, the SentimentAPI address will be resolved, and we will be able to get data from <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">sentimentapi.pcf.den.altoros.com<\/code>.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-sentimentapi-sentimentservice.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentui-sentimentapi-sentimentservice.png\" alt=\"Pivotal Cloud Foundry Steeltoe sentimentui sentimentapi sentimentservice\" width=\"640\" class=\"aligncenter size-full wp-image-19379\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Using_connectors\"><\/span>Using connectors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now, we are going to use Steeltoe Redis Connector. Here is how we add the Redis Cache service:<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Redis-Connector.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-Redis-Connector.png\" alt=\"Pivotal Cloud Foundry Steeltoe Redis Connector\" width=\"496\" height=\"206\" class=\"aligncenter size-full wp-image-19380\" \/><\/a><\/p>\n<p>Below is the logic on the controller. Prior to fetching data from the external API, we can check Redis Cache in case someone has already been interested in just the same sentimental phrase. (It is possible, however unlikely.)<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentcontroller-redis-cache.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-sentimentcontroller-redis-cache.png\" alt=\"Pivotal Cloud Foundry Steeltoe sentimentcontroller redis cache\" width=\"640\" class=\"aligncenter size-full wp-image-19382\" \/><\/a><\/p>\n<p>So, we have seen how .NET developers can leverage Steeltoe to enable .NET Core apps to consume Spring Cloud services right from Pivotal Cloud Foundry. With thoroughly documented components and a relatively flat learning curve, Steeltoe makes a good job of facilitating development and deployment of microservices-based .NET apps.<\/p>\n<p>Check out Steeltoe&#8217;s <a href=\"https:\/\/github.com\/SteeltoeOSS\" target=\"_blank\">GitHub repository<\/a> to learn more about this promising tool. The source code of the sentiment manager can be found <a href=\"https:\/\/github.com\/Altoros\/Sentiment-Manager\" target=\"_blank\">here<\/a>.<\/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\/net-on-pivotal-cf-scaling-an-app-on-diego\/\">.NET on Pivotal CF: Scaling an App on Diego<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/net-on-pivotal-cloud-foundry-adding-a-ms-sql-service-to-an-app\/\">.NET on Pivotal CF: Adding a MS SQL Service to an App<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/net-on-pivotal-cloud-foundry-connecting-and-pushing-an-app\/\">.NET on Pivotal CF: Connecting and Pushing an App<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What is Steeltoe?<\/p>\n<p>Steeltoe was built to simplify the adoption of microservices for .NET developers. It provides the access to the pool of Spring Cloud and NetflixOSS tools that power cloud-native Java apps. What is more, the new toolkit promises first-class integration with Pivotal Cloud Foundry (PCF).<\/p>\n<p>It also simplifies step-by-step porting [&#8230;]<\/p>\n","protected":false},"author":113,"featured_media":19387,"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-19333","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>Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros<\/title>\n<meta name=\"description\" content=\"This tutorial explains how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app\u2014using Steeltoe, an OSS toolkit for creating .NET microservices.\" \/>\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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros\" \/>\n<meta property=\"og:description\" content=\"What is Steeltoe? Steeltoe was built to simplify the adoption of microservices for .NET developers. It provides the access to the pool of Spring Cloud and NetflixOSS tools that power cloud-native Java apps. What is more, the new toolkit promises first-class integration with Pivotal Cloud Foundry (PCF). It also simplifies step-by-step porting [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-09T04:15:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-15T12:29:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Alexander Pavlov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexander Pavlov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\",\"name\":\"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif\",\"datePublished\":\"2017-01-09T04:15:05+00:00\",\"dateModified\":\"2018-05-15T12:29:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/3034a1fc87d98b378897330985ebc55c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif\",\"width\":640,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry\"}]},{\"@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\/3034a1fc87d98b378897330985ebc55c\",\"name\":\"Alexander Pavlov\",\"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\/\u043f\u0430\u0432\u043b\u043e\u0432-150x150.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/\u043f\u0430\u0432\u043b\u043e\u0432-150x150.jpg\",\"caption\":\"Alexander Pavlov\"},\"description\":\"Alexander Pavlov is a senior full-stack developer at Altoros. He mainly focuses on .NET programming and JavaScript development, including Node.js, AngularJS, and Aurelia frameworks. His professional interests include microservices, domain-driven design, and mathematical statistics.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/aliaksandr-paulau\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros","description":"This tutorial explains how to consume Spring Cloud \/ NetflixOSS services from a .NET Core app\u2014using Steeltoe, an OSS toolkit for creating .NET microservices.","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\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/","og_locale":"en_US","og_type":"article","og_title":"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros","og_description":"What is Steeltoe? Steeltoe was built to simplify the adoption of microservices for .NET developers. It provides the access to the pool of Spring Cloud and NetflixOSS tools that power cloud-native Java apps. What is more, the new toolkit promises first-class integration with Pivotal Cloud Foundry (PCF). It also simplifies step-by-step porting [...]","og_url":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/","og_site_name":"Altoros","article_published_time":"2017-01-09T04:15:05+00:00","article_modified_time":"2018-05-15T12:29:27+00:00","og_image":[{"width":640,"height":360,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif","type":"image\/gif"}],"author":"Alexander Pavlov","twitter_misc":{"Written by":"Alexander Pavlov","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/","url":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/","name":"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif","datePublished":"2017-01-09T04:15:05+00:00","dateModified":"2018-05-15T12:29:27+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/3034a1fc87d98b378897330985ebc55c"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/Pivotal-Cloud-Foundry-Steeltoe-microservices-.net_.gif","width":640,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/enabling-dotnet-core-microservices-with-steeltoe-and-pivotal-cloud-foundry\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Enabling .NET Core Microservices with Steeltoe and Pivotal Cloud Foundry"}]},{"@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\/3034a1fc87d98b378897330985ebc55c","name":"Alexander Pavlov","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\/\u043f\u0430\u0432\u043b\u043e\u0432-150x150.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/\u043f\u0430\u0432\u043b\u043e\u0432-150x150.jpg","caption":"Alexander Pavlov"},"description":"Alexander Pavlov is a senior full-stack developer at Altoros. He mainly focuses on .NET programming and JavaScript development, including Node.js, AngularJS, and Aurelia frameworks. His professional interests include microservices, domain-driven design, and mathematical statistics.","url":"https:\/\/www.altoros.com\/blog\/author\/aliaksandr-paulau\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19333","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\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=19333"}],"version-history":[{"count":36,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19333\/revisions"}],"predecessor-version":[{"id":33238,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19333\/revisions\/33238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/19387"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=19333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=19333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=19333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}