There are many valid use cases for using and implementing Azure Functions:
- Implementing microservices: Azure Functions help in breaking down large applications into smaller, discreet functional code units. Each unit is treated independently of the other and evolves in its own life cycle. Each such code unit has its own compute, hardware, and monitoring requirements. Each Function can be connected to all other functions. These units are weaved together by orchestrators to build complete functionality. For example, in an e-commerce application, there can be individual Functions (code units), each responsible for listing catalogs, recommendations, categories, subcategories, shopping carts, checkouts, payment types, payment gateways, shipping addresses, billing addresses, taxes, shipping charges, cancellations, returns, emails, SMS, and so on. Some of these functions are brought together to create use cases for e-commerce applications, such as product browsing, checkout flow, and so on.
- Integration between multiple endpoints: Azure Functions can build overall application functionality by integrating multiple Functions. The integration can be based on the triggering of events or it could be on a push basis. This helps in decomposing large monolithic applications into small components.
- Data processing: Azure Functions can be used for processing incoming data in batches. They can help in processing data in multiple formats, such as XML, CSV, JSON, TXT, and so on. They can also run conversion, enrichment, cleaning, and filtering algorithms. In fact, multiple Functions can be used, each doing either conversion or enrichment, cleaning or filtering. Azure Functions can also be used to incorporate advanced cognitive services, such as optical character recognition (OCR), computer vision, and image manipulation and conversion.
- Integrating legacy applications: Azure Functions can help in integrating legacy applications with newer protocols and modern applications. Legacy applications might not be using industry-standard protocols and formats. Azure Functions can act as a proxy for these legacy applications, accept requests from users or other applications, convert the data into a format understood by a legacy application, and talk to it on protocols it understands. This opens a world of opportunity for integrating and bringing old and legacy applications into the mainstream portfolio.
- Scheduled jobs: Azure Functions can be used to execute continuously or periodically for certain application Functions. These application Functions can perform tasks such as periodically taking backups, restoring, running batch jobs, exporting and importing data, and bulk emailing.
- Communication gateways: Azure Functions can be used in communication gateways when using notification hubs, SMS, and email, for instance.