Using Asynchronous programming to manage parallel processing

Background There was a requirement to perform series of tasks, involving generation of output files, such that the required throughput is achieved. These tasks involve database read operation, external API invocation and file i/o. Generally, benchmarking showed that executing them in sequential way was not helpful. What if asynchronous programming be used to perform this task. So Lets Start. Approach Lets assume that this typical use case requires, fetching data from database for the purpose of merging placeholders in a Template and perform mail merge ...

July 30, 2024 · 2 min · Sachin Sunkle

Using local LLM with Ollama and Semantic Kernel

Introduction Artificial Intelligence, especially Large language models (LLMs) are all in high demand. Since OpenAI released ChatGPT, interest has gone up multi-fold. Since 2023, Powerful LLMs can be run on local machines. Local Large Language Models offer advantages in terms of data privacy and security and can be enriched using enterprise-specific data using Retrieval augmentation generation (RAG).Several tools exist that make it relatively easy to obtain, run and manage such models locally on our machines. Few examples are Ollama, Langchain, LocalAI. ...

May 11, 2024 · 9 min · Sachin Sunkle

Troubleshooting TLS handshake issue

Background Ever encountered a scenario where REST API consumption works from tools like curl, Web Browser but not from Application. Lets dive in. The requirement is as simple as consuming REST API from a Application over TLS. Problem Statement The REST API, to be consumed, is standard API interface which requires access over TLS. The client in this case is Windows 2016 server. During Development, Windows 10 is used to develop and test the code. Later, the same is tested on a Windows 2016 Server. It is at this stage, it fails with cryptic Error “The request was aborted: Could not create SSL/TLS secure channel”. But it works fine with other tools like curl, PostMan or even from a Web Browser. ...

February 25, 2023 · 3 min · Sachin Sunkle

URL Shortener in High Throughput Service

Background A Client has E-commerce Application consisting of services aimed at specific domains of business functionality it serves. One of these services is responsible for accepting the order, authenticating it and forwarding it for further processing in terms of inventory checks, payment and so on. For Authentication, this service sends SMS to Customer’s Mobile number (and e-mail id) and customer is supposed to confirm this order placement by means of entering Code received in it. This code is valid for a short duration. ...

May 15, 2022 · 2 min · Sachin Sunkle

Can SQLite be considered for Server Applications?

Introduction While embarking on building any new server application, one of the key requirement is whether it needs durable, persistent storage of data (and in most cases, it does). This is followed by evaluating suitable data store. Likely evaluation criteria is Application’s Requirement (Tolerance for eventual consistency, High Availability etc.), Team’s familiarity, Costs, Tech. support availability and so on. In case of choices in relational databases, typical go to options are MySQL, PostgreSQL or even proprietary databases like Oracle , SQL Server. Seldom one considers SQLite for this purpose. ...

December 30, 2021 · 8 min · Sachin Sunkle