0
votes

I have a continuous webjob which performs some actions like, it takes files from the server and uploads it into the database and maintains logs for every steps from start to end. Now I want to try this using logic apps. I don't know how to do this. I'm totally new to this technology. I was thinking to write my webjob code into azure functions and call it using logic apps. I'm confused. How can i do this using c#?

1

1 Answers

0
votes

With Azure functions and Logic Apps you move to a serverless architecture and you gain in terms of scalability and performance.

For Uploading Files scenario: I would not suggest uploading files to database but you can use Azure Storage to store files and store the URL of files in the database.

https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-azureblobstorage

To connect to the database you can use the SQL Connector and insert a row:

https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure

To retrive files from FTP Server you can use the FTP Connector

https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-ftp

Logic Apps is an orchestrator used to automate a business process or a workflow and make integrations easier since it has built in adapters (similar biztalk) that will connect to multiple systems like database, ftp and other systems so you only have to care about how to connect them and on your workflow.

Azure Functions are (functions) so in your case you will have to recode your Azure Web job and seperate it to multiple functions if you want scalability since each Azure Function have an execution limit.

If you can't find a suitable adapter in Logic App, you can then code your logic in Azure function and call it from Logic Apps.

For logging and monitoring , logic app can automatically log the workflows if you enable Log Analytics.

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-monitor-your-logic-apps-oms

An example of how you can integration a function with Logic App

https://docs.microsoft.com/en-us/azure/azure-functions/functions-twitter-email