Practical Serverless: A Scalable OCR Solution in 10 Minutes

Introduction

In this article, we will show you how to create a serverless solution for implementing a scalable Optical Character Recognition (OCR) system. In a system like this, scalability is a requirement. At certain times, we can expect possible bursts of traffic into the system where we need to process all of these requests and communicate the result back to the user in a timely manner.  To cater to this, we need a system that scales dynamically. One possible solution is to model the required workers and deploy them in a Kubernetes environment to achieve our scaling requirements. This approach has been implemented and discussed in this article.

Here, we will implement the same solution using Azure Functions in Ballerina (referred to as Ballerinalang in the rest of the article) and show how it can be implemented with considerably fewer lines of code, which resulted in lesser complexity and better maintainability.