1. Sabir Foux
  2. PowerServer 2020 or older (Obsolete)
  3. Monday, 2 September 2019 03:31 AM UTC

What is our need:

When a user logs into the app all data written to and retrieved from the database needs to be unique to their tenant.

Where we are now:

Our app is going from the desktop client/server to the web. Data was physically separated by each client location so there was no need to add a specific identifier to their data in the database.

What we've considered:

We've considered unloading the clients' data into a file and then updating the DB tables with a tenant ID or something similar. Then reloading the data and having each user's login credentials connect them to their data and not another clients'.

Our question:

Is there another option besides the manual process I mentioned above or is it the only one available given the situation? Note, we began looking into dynamically setting the data source with the appeon workarounds.pbl however SQL Anywhere is not supported.

As always, any advice, tips, or suggestions, are appreciated.

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 2 September 2019 05:12 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

Have one copy of the app and a 'login database'. The login database would have two tables. The first table would have their userid and company id. The second table would have company id and the database server/dbname and other connection parms for the company database.

The user would enter their userid/password. The app would connect to the login database, find their database connection parms, disconnect from the login database, and finally connect to the company database.

 

Comment
  1. Sabir Foux
  2. Monday, 2 September 2019 15:48 PM UTC
@Roland

Thanks Roland. Your method sounds brilliant in its simplicity. We'll check out this idea and see if it will work for us.



@Chris

Chris, I've read a few articles and seen a video or two warning us to avoid using the Dynamic Data Source connection option in AEM when possible. In short, can you describe or provide a link to an article that gives a safe way/example of how to use DDS?



In lieu of that, is there any disadvantage or downside to using Roland's method?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 3 September 2019 14:39 PM UTC
Hi Sabir;

Whether you use Dynamic or Static DataSources, you can redirect your App's DB connection at run time (aka by Tenant) by using the "CacheName" parameter, as follows:

https://www.appeon.com/support/documents/appeon_online_help/2017/server_configuration_guide_for_net/Dynamic_transaction_object_to_connection_cache_mapping.html

HTH

Regards ... Chris
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 3 September 2019 14:43 PM UTC
PS: *static* DS's can be used with SA DB's and then use the "CacheNAme" to redirect the DB connection by tenant.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 September 2019 18:19 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

The way Roland suggested is essentially how many software vendors have turned their products into SaaS offerings using the PowerServer Web deployment product for PowerBuilder.  So the point is that should be a good solution.

Just to clarify, PowerServer is not required to do multi-tenant.  The problem PowerServer solves is deploying your existing desktop app over the Internet and running within a Web browser. Many of our software vendor customers that want both web deployment and tenant so they are using PowerServer and doing what Roland said.

 

Comment
  1. Sabir Foux
  2. Tuesday, 3 September 2019 20:59 PM UTC
Thanks for clarifying those points Armeen. Our team is going to go with Roland's method.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 2 September 2019 03:56 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Sabir;

  I would like to suggest that you consider switching your DBMS to SQL Server (or equivalent) where Dynamic Data Sources are supported.

   You could also consider deploying your App by tentant, where each App instance maps to a specific DB instance.

Regards ... Chris

Comment
  1. Sabir Foux
  2. Monday, 2 September 2019 04:47 AM UTC
Thanks for your quick reply Chris. We'll look into both options. Although wouldn't deploying the app by tenant require a deploy to each tenant every time there's an update to our app? Or are you thinking of something else?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 2 September 2019 13:31 PM UTC
The bonus of the multiple App instances is that you can update tenents carefully one by one. The negative side however is the repetitive deployment.
  1. Helpful
  1. mike S
  2. Monday, 2 September 2019 16:42 PM UTC


there are tools to help with the repetitive deployment. if a database talks about being 'cloud' then they typically have these tools. sql azure (sql server on azure) has these tools, i'm pretty sure sql anywhere's cloud version does too. there are also 3rd party tools that do a lot of this.



in any case, there are pros/cons to each deployment method. the following link talks about some of them.



https://docs.microsoft.com/en-us/azure/sql-database/saas-tenancy-wingtip-app-guidance-tips
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.