Skip to main content

Posts

Showing posts with the label design

RIAK Database - A Distributed NoSQL Solution

Exploring Riak Database: A Distributed NoSQL Solution Introduction In the world of modern technology, data storage and retrieval have become crucial aspects of software development. Traditional relational databases often struggle to handle the scale and distribution demands of today's applications. This is where Riak, a distributed NoSQL database, comes into play. In this article, we will delve into the problem that Riak database solves and explore how it addresses these challenges with real-world examples. The Problem: Scalability and Fault Tolerance Traditional relational databases are built around a fixed schema and a single server. As data grows, these databases might struggle to handle the load efficiently, leading to performance bottlenecks and scaling challenges. Moreover, relying on a single server can be risky – if that server fails, data might be lost or unavailable. Riak's Solutio

How to design a method

Introduction We have been reading articles about how to architect / design a system, microservices etc. However, I still find that there are developers that require some details on how to write / create a method. These are valid for statically typed languages like C# , Java which I have worked. though some of them apply to Javascript as a good practice. Below are some of the points that I consider worth noting The method should have a descriptive verb of the action that it is performing. ReadFromConfigurationFile SaveUserData CheckInOrderPriorToPayment 2. The arguments if any to the method should be validated prior to consumption. There are some built-in types in Java that helps in checking for nulls like  requireNonNull  from  java.util Note:  The below given method is one that i had built which checks for null and empty value and if so, throws suitable exceptions. We have been using similar built-in functionality in  Microsoft Enterprise Library  for .Net as  Guard.Null  or  Guard.Nu

User Authentication schemes in a Multi-Tenant SaaS Application

User Authentication in Multi-Tenant SaaS Apps Introduction We will cover few scenarios that we can follow to perform the user authentication in a Multi-Tenant SaaS application. Scenario 1 - Global Users Authentication with Tenancy and Tenant forwarding In this scheme, we have the SaaS Provider Authentication gateway that takes care of Authentication of the users by performing the following steps Tenant Identification User Authentication User Authorization Forwarding the user to the tenant application / tenant pages in the SaaS App This demands that the SaaS provider authentication gateway be a scalable microservice that can take care of the load across all tenants. The database partitioning (horizontal or other means) is left upto the SaaS provider Service. Scenario 2 - Global Tenant Identification and User Authentication forwarding   In the above scenario, the tenant identification happens on part of the SaaS provider Tenant Identification gateway. Post which, the