Adventures with Microsoft Azure

Pieter-Jan Drouillon
2 min readNov 3, 2020

The last few weeks I spent looking into Microsoft Azure. I followed along with the fundamental learning paths, but I also focused mostly on the spring boot part. Here are some findings.

Azure Spring Cloud workshop

The Azure Spring Cloud Workshop is a nice overview how to deploy your spring boot application to Azure.

Take-aways

  • Something nowhere mentioned is that you get a Eureka Discover compatible server OOTB :) You just need to add the Eureka Discovery Client dependency.
  • The Cloud gateway works great with the discovery service. Without any configurations, it queries the discover service to get a list of services and it creates automatically endpoints for each service. For instance I had a running todo-service, with @GetMapping("/todos")returning all todos. Using the gateway, you get all todos by sending a request to <GATEWAY-URI>/TODO-SERVICE/

Toy service — the profanity service

I had an additional day to spend on Azure. I wanted to use the azure content moderation service. I only needed a source to get some questionable content. And then I remembered this twitter account

fuck u

- Developers Swearing (@gitlost) November 8, 2020

And its follow-up tweet

fuck u again

- Developers Swearing (@gitlost) November 8, 2020

So I made these services:

  • TwitterServiceusing twitter4j returning the last 20 tweets as Strings
  • ModerationSerivce connecting to the Azure Content Moderation Service returning scores for offensiveness, sexual suggestiveness and sexual explicitness
  • OffensiveTweetService pipes the tweets into the ModerationServicethe original tweet with 3 scores

To make it more visual, I refreshed my jQuery skills and sorted the tweets based on each of the 3 scores.

All in all, it was a fun project to work on. Unfortunately it no longer is available online as my free credit is already used.

Originally published at http://www.pieterjd.be on November 3, 2020.

--

--