This article is part of #SeasonsOfServerless.
Each week we will publish a challenge co-created by Azure Advocates with some amazing Student Ambassadors around the world. Discover popular festive recipes and learn how Microsoft Azure empowers you to do more with Azure Serverless services! :fork_and_knife_with_plate: :smiling_face_with_heart_eyes:.
In Korea, when New Year begins, everyone eats tteok-guk (rice cake soup). There are various shapes of tteok, but especially for greeting New Year, garae-tteok is the most popular to make the soup.
As garae-tteok has a long and cylindrical shape, people wish to live long, by eating tteok-guk. When cooking tteok-guk, the garae-tteok is sliced into small pieces, which look like coins. This coin-like shape is believed to bring wealth.
Here are the challengers, aka Chefs.
I took an interview video with MLSAs how they have implemented. They actually did awesome jobs! Although we took the video in Korean, we provide subtitles in both English and Korean. So, turn on the subtitles and you won't regret it.
Cooking tteok-guk is fairly straightforward. Here is the list of ingredients for four people.
The simplest way to cook tteok-guk is the following:
You Jin depicted the recipe in the flow-chart format (some letters are in Korean).
While Durable Function was used for each step, Azure Logic Apps was used for their overall orchestration. Based on the flow-chart above, the Logic App is triggered by an HTTP request, passes the payload to Step 1 (Slicing Garae-tteok), Step 2 (Slicing Spring Onion), Step 3 (Stir-fry Beef) and Step 6 (Beating Eggs) and process them at the same time. Then, the response from each step is aggregated to move forward. It's a typical pattern called Fan-Out/Fan-In or Scatter-Gather.
Then, add garlic and sauce (Step 7), Add beaten eggs and spring onion (Step 8), and finally serve the soup by adding salt and pepper (Step 9). Step 9 returns a random tteok-guk image from Azure Blob Storage, and the image is sent to the designated email.
At this stage, we have to consider the two-minute limitation of Logic Apps during this execution. Therefore, instead of using the HTTP action, we used the HTTP webhook action to overcome this restriction. The following screenshot shows the end-to-end execution result.
As you can see the last action, the tteok-guk image is sent to the given email like this:
Both Durable Function apps and Logic App orchestration are all automatically built and deployed to Azure via GitHub Actions. You can find more details at the following links. As we used Bicep to build ARM template, you might like to know more about it. This link would be helpful, if you like.
The first plan was to migrate the Logic App to Power Automate flow. However, we eventually decided to separate Power Automate side from Logic App side. Within the Power Automate workflow, we call the Logic App workflow using the webhook action. As Power Apps calls this Power Automate workflow, it sends the result back to the Power App through the push notification.
In order to use the push notification feature on Power Automate, we should slightly update the Logic App. The final action on the Logic App is not only sending an email but also calling back to the Power Automate with the image URL.
Once completed, publish the Power Apps and run it on our mobile phone. And here's the result.
As this repository also contains the sample Power Apps and Power Automate workflow, download the zip files and import them to your Power Platform and run them. It will be super easy! If you like to challenge the other recipes, check out this page, #SeasonsOfServerless!
This article was originally published on Dev Kimchi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.