I am new to Kotlin & Ktor framework, mainly having experience on Java & Spring Boot frameworks. We are in the process of migrating our Spring boot microservice application into Ktor based microservices. As a cloud partner we are using Azure along with different integrations from Spring to Azure application insight, Key Value & Blob Storage. So while migrating from Spring Boot to Ktor, we are looking for similar plugins available in Ktor for the same Azure integration. Does any one have any idea how to get this integrations done or any plugin already available in the ktor framework?
Related
My app needs a background service that constantly receives and handles events streamed from an Azure Event Hub.
I see that Azure Functions has built-in triggers for this, but the problem is that my app is written in .NET 5 and Azure Function support for it is fairly immature at this point.
I also see from this documentation that .NET has an readily-made SDK Azure.Messaging.EventHubs. My understanding is that this will run as a console app.
I'm already using the Azure App Service (Linux plan) to host the main web app.
So if I create a console app using Azure.Messaging.EventHubs, I'd want to deploy it as something like a web job, but the Linux app service plan doesn't support it. I guess I can deploy the console app it to a separate Windows App Service plan.
What's the next best option? Are there any practical differences compared to using Azure Functions?
There's also this .NET Core Worker Service that's more optimized for background services. I wonder if there's a place for it in this use case.
These options are confusing me a bit. Your advices would be greatly appreciated.
Azure function should be the best choice. It has the built-in eventhub trigger and process logic, and easy to setup / configure(like logging via Application Insights) / less code to write. And recently(Mar 10 2021), it is supported for running production .NET 5 apps on Azure Functions. I suggest you can give it a try and use it if no issues.
For azure webjobs, in this case, if you're directly using the SDK, you need to write many codes and configure something like logging.
For .NET Core Worker Service, it can also be published as azure webjobs if you want to use it. You can follow this doc on how to publish worker service as azure webjob.
With the release of .NET Core 3.0, the latest version of visual studio offers the gRPC Service template to create this type of service.
Does anyone have idea what are my choice to host this kind of service (written in .Net Core 3.0) on the web?
Does Azure have a solution to this?
You can create a kubernetes cluster on Azure and deploy your application on it. Azure App Services doesn't support gRPC. If you want to learn how you can create your first service in gRPC follow this article:
gRPC service in .Net Core
I have an existing ASP.NET Web API, and I would like to deploy it to Azure Kubernetes Service. So far, I have only found tutorials showing how to deploy ASP.NET Core Web API Apps. Can anyone guide me towards the tutorial for pure ASP.NET Web API AKS deployment and not the Core one?
I would say the first step is to containerize your app. There's a good source of information about it in here: https://github.com/dotnet-architecture/eShopModernizing/wiki/02.-How-to-containerize-the-.NET-Framework-web-apps-with-Windows-Containers-and-Docker
After that: https://learn.microsoft.com/en-us/azure/aks/windows-container-cli
Is there a Java SDK for Azure Machine Learning service? If not, is there a way to create Azure ML pipelines, experiments etc from Java codebase?
No, today there is only a SDK for Python. Alternatively you could use the Azure CLI extension for ML which you could call from your Java code: https://learn.microsoft.com/en-us/azure/machine-learning/service/reference-azure-machine-learning-cli
The Azure Machine Learning Studio directly supports only R & Python.
There is no way to handle Azure ML pipelines with java code at the moment.
However, you can consume Azure Cognitive Services (which provides pre-trained models) through the exposed Java API.
Refer this for more details.
Is it possible to create a tomcat and MySQL/SqlServer service using azure-sdk-for-java or azure-sdk-for-net, and deploy a war file programmatically?
I went through the example codes about creating resource groups and virtual machines, but couldn't find an api about creating a tomcat, sqlserver or MySQL inside sdk.
If this is not possible what is the way to make a programmatic/automatic deployment to azure?
According to your description, based on my understanding, I think you want to create an Azure website with tomcat and database to deploy a Java WebApp all at one time programmatically.
For the purpose, per my experience, you need to implement these via do the three steps below.
Create a webapp with tomcat & database using ARM template in a Java/.NET program with Azure SDK for Java/.NET. There are many existing samples which include two Azure deployment templates (sample 1, 2) & sample deployment program (for Java & .NET) that you can refer to.
Get publish settings file or set deployment credentials to get the credentials you used for deployment. It seems that you need to do this step manually, not programmatically.
Deploy your Java WebApp programmatically via FTP, Kudu REST API or others that you can refer to some offical documents & wiki. Meanwhile, you can refer to the Azure Java WebApp sample on GitHub to know what files you need to upload.
Hope it helps. Any concern, please feel free to let me know.