Register for masterclass

How To Design a
Multi-Tenant Place Finder

A Multi-Tenant Place Finder is a service that allows visitors to search for different types of places in the proximity of a region, address, state, country and/or postal code.

About Me (Bharat Savani)

Welcome to my online course registration page. I am a Senior Software Engineer at Apple. Prior to that I worked at PayPal, Inc for almost 7 years.

Hiking at Paro Taktshang, Bhutan.

I will TEACH you to design a Robust Backend in Spring Boot using Hexagonal Architecture. We will use MongoDB as a System of Record Database and ElasticSearch as our Search Engine. I will also teach you different ways to replicate data from MongoDB to ElasticSearch.

Terminology

Multi-Tenancy

Multi-Tenancy can be used to describe different things in software. Let's look at the term from a SaaS perspective.

SaaS (Software as a Service) is a term that is used to describe the software licensing and delivery model in which the user pays a subscription fee to use the software.

A Tenant is a customer, and Multi-Tenant means multiple customers. SaaS solutions that use Multi-Tenant architecture are providing a single software system that can be used by multiple customers with a centralized configuration.

Place Finder

A Place Finder or a Place Finder Service is a service that is used to show different places within a certain proximity of a selected region, address and/or postal code.

For example, when you search for an Apple store at https://www.apple.com/retail/ using a postal code, it returns a few stores near that postal code. Try it out.

What if I don’t know Multi-Tenancy, Spring Framework, MongoDB, Apache Kafka, ElasticSearch, CQRS, Hexagonal Architecture or Immutable Architecture?

That’s ok. As part of this course I will teach you how to use all these technologies and databases. It will be fun to learn these new concepts and use them together to design something awesome.

Learning By Example

This course is designed to take you through a project from start to finish. It isn't just a collection of random concepts and modules that will be taught one by one in a monotonous way. I strongly believe that using an example shows how things really work and provides a great learning experience.

This course teaches you how to design a Multi-Tenant Place Finder, a real world use-case, using Spring Framework.

This project is big enough that we'll need to consider our approach carefully. The idea is simple here. We'll design a project with a big problem statement. Then we'll start to break it down into smaller problem statements and tasks. If these tasks are still large, we'll go on to break them down into smaller ones, and so on. Finally, we will solve each small problem one-by-one and connect them together to solve our main problem statement.

You will get your hands dirty with code. That is my promise. :-)

Tech Stack

Language : Java 17
Framework : Spring Framework 5 and Spring Boot 2
Database : MongoDB
Search Engine : ElasticSearch
Messaging : Apache Kafka

Along the way I'll explain why we have selected the tools and methodologies we have for the implementation of this project.

What will you learn :

  1. Design Rest APIs using OpenAPI Specifications.
  2. Design and Implement a Microservice that supports Multi-Tenancy.
    1. Multi-Tenant Rest APIs that support whitelisted tenants and subsidiaries.
    2. RestAPIs for places like ATMs, Listings, Rentals, Stores, Malls, etc.
  3. Design and Implement
    1. Microservice that supports Multi-Tenancy.
    2. Microservice using Hexagonal Architecture.
  4. Implement MongoDB as a System of Record database.
    1. I will teach how to create databases, collections and indexes in MongoDB. We will also connect to different MongoDB databases and collections from our application. We will then replicate this data into ElasticSearch using CQRS.
  5. Design and Implement CQRS
    1. CQRS stands for Command and Query Responsibility Segregation, a pattern that separates read and update operations for a data store. We will implement this using event-based programming.
    2. The basic idea behind CQRS is that we can use different models for update and read queries. This gives rise to Eventual Consistency (it takes time for two databases to be in sync), and we will see how to deal with that too.
  6. Implement batch upload of places using
    1. Rest Batch
    2. Spring Batch
  7. Unit Testing: We will use Dependency Injection for unit testing.
  8. Along the way I will also describe how to design a component using best practices, such as
    1. SOLID principles
    2. Keeping classes small
    3. Giving meaningful names to classes, objects and modules
    4. Using less logical constructs or eliminating them(if conditions)
    5. Using Stream APIs

This project is big enough so how will we approach it? Idea is simple here. We will design a project with a big problem statement. We will start to decompose it into smaller problem statements and tasks. If these tasks are still large we will break that down into smaller ones and so on. Finally, we will solve all small problems one-by-one and connect them together to solve our main problem statement.

Prerequisites

  1. You should know Object Oriented Programming concepts and Collections and Generics.
  2. You'll also need to know the basics of the Rest API.

If you've got these prerequisites covered, you're ready to take this course.

READY TO learn how to design muti-tenant place finder??

    We respect your privacy. Unsubscribe at any time.