Designing a Cache System

Load balancing helps us scale horizontally across an ever-increasing number of servers, but caching will enable us to make vastly better use of the resources we already have. Caches can exist at all levels in architecture. A cache is like short-term memory which has a limited amount of space. The cache is typically faster than the original data source.

Screen Shot 2018-06-21 at 1.45.54 PM.png
A simple global Caching System

Let’s talk about different approaches first.

Continue reading “Designing a Cache System”

Advertisements

Microservices vs Monolithic Applications

A developing a server-side enterprise application. You must think of different clients:

  • Mobile devices and its browsers.
  • Native mobile applications.
  • Desktop devices and its browsers.
  • Exposing your APIs to 3rd parties.
  • Integrating with other applications.
  • Executing business logic, accessing a database or exchanging messages with different systems.
  • Returning a response.
  • Figuring out technology stacks.
  • Keeping things in your mind such as CAP theorem.
  • many more depends on the complexity!

It is very hard to define an architecture that supports as a set of loosely coupled, collaborating services using the Monolithic approach. Let’s imagine that you are building an e-commerce application that takes orders from customers, verifies inventory, and ships them. The application consists of several components including the StoreFrontUI, which implements the user interface, along with some backend services for checking credit, maintaining inventory and shipping orders. The application consists of a set of services.

Continue reading “Microservices vs Monolithic Applications”