Print Page | Close Window

Database multi-tenancy

Printed From: TMS Software
Category: Business Tools
Forum Name: Echo
Forum Discription:
Printed Date: 16 Sep 2019 at 12:46pm

Topic: Database multi-tenancy
Subject: Database multi-tenancy
Date Posted: 05 Jun 2018 at 12:07am
   Reading the uses cases we have:
  • You might have a distributed system where you need a central database server with all data for static purposes, but each client will only have access to a subset of that data (multi-tenancy architecture)

    I will have a central database and each  customer  will see only their. own data. 

    Can Echo handle that ?

     Client A,  with a desktop application and 3 mobiles devices  replicating to the central database   

     Client B,  with a desktop application and 5 mobiles devices  replicating to the central database

     So,  I could have a multi-tenancy database using Echo.

     Is it ok ? If so how is the proper way to implement it ?


Posted By: Wagner R. Landgraf
Date Posted: 05 Jun 2018 at 1:28pm
Yes, it's possible. You have to add your own routing logic when calling Route: -

The key is the anonymous method in the Route parameter:

    procedure(Log: TEchoLog; Node: TEchoNode; var Route: boolean)
      if SameText(Log.EntityClass, 'AppEntities.TEchoInvoice')
        and (Node.Id = 'Client1') then
        Route := false;

You have to implement your own logic to tell Echo if that specific record should be routed to that specific node.

Print Page | Close Window