Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDelphiRAD Studio

Flexible Multi-Tenancy REST Support Demo For RAD Server In Delphi

It requires InterBase to be installed on the machine or to connect to a remote server. Make sure that the server is running before you run the sample application.

With Multi-Tenancy support, a single RAD Server instance with a single RAD Server database connection can support multiple isolated tenants. Each tenant has a unique set of RAD Server resources including Users, Groups, Installations, Edge Modules, and other data. All tenants have custom resources that are installed in the EMS Server. Also, as an administrator you can create new tenants, edit existing ones, add, edit, or delete details of your tenants, specify if the tenant is active, and delete the tenants that you do not need.

Location

You can find the RAD Server Overview Multi-tenant sample project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to the following:
    • Object PascalDataBaseEMSMulti-Tenancy Demo
  • Subversion Repository:
    • You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

Overview

This sample application demonstrates RAD Server’s Multi-Tenancy supportRAD Server Overview is a turn-key application foundation for rapidly building and deploying services based applications. RAD Server enables developers to quickly build new application back-ends or migrate existing Delphi or C++ client/server business logic to a modern services based architecture that is open, stateless, secure and scalable.

A single RAD Server Overview instance with a single RAD Server database connection can support multiple isolated tenants.

This demo uses a chain of toy stores to highlight RAD Server’s multi-tenancy support where each store with its employees and goods is a tenant implementation.

Using the RAD Server Multi-Tenant Application

The sample application demonstrates a retail store deployment use case. Each store with its employees and goods is a tenant implementation.

Employees

There are two groups of users with different rights:

  • Managers
  • Cashiers

Managers can add new store items, delete them, and edit the details of the existing ones while cashiers can only view the information about the existing goods. Neither employee can see the information about the other stores in the chain.  

Description

Now, let us have a look at the sample application.

Store Log in Page

To access store specific information, enter the following information on the Store Log in page:

  • Toy Store: select a store from the list. Each store is a tenant implementation.
  • Store password: enter the password.

Tip: You can find credentials in the Readme.txt file provided with the sample application.

Employee Log in Page

On the Employee Log in page, each employee enters the following:

  • Employee login
  • Employee password

Tip: You can find credentials in the Readme.txt file provided with the sample application.

Store Items Page

After logging in, each employee sees the store items screen. The screen is displayed in two different modes: edit or view only, and access depends on the employee’s position. This uses EMS groups (a feature of RAD Server) to define access rights.

  • Managers can view, add, and delete the store items and edit the details.
  • Cashiers can view the items’ details only.
394px-managers_john1-7842519
385px-cashiers_tina-8914436

Please follow the link to the original post for more information:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/EMS.Sample_RAD_Server_Multi-Tenant_Application

Check out the full source code for the Multi-Tenancy REST Demo over on GitHub.

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES