Multi Tenant Design

6 posts, 0 answers
  1. JoPi
    JoPi avatar
    8 posts
    Member since:
    Dec 2006

    Posted 26 Oct 2015 Link to this post

    Hi,

    I'm designing a hybrid app in AppBuilder for our business customers whereby each business (which has many users) gets their own copy of a database and the app can point at the relevant database for each customer/business.  I'm new to AppBuilder but it doesn't seem to be possible to configure Backend Services Cloud Data to point to different databases or link an app to different API Keys.  Am I right about this or is there a work around?

    Thanks

  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 29 Oct 2015 Link to this post

    Hello Joth,

    I believe that my colleague answered your question in your private support ticket. Let us know should you have any further questions or suggestions.

    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
  3. David Weinberg
    David Weinberg avatar
    18 posts
    Member since:
    Jul 2015

    Posted 10 May Link to this post

    Hi JoPi,

    Are you able to share any of the details of the answer provided?

    David

  4. David Weinberg
    David Weinberg avatar
    18 posts
    Member since:
    Jul 2015

    Posted 10 May Link to this post

    Hi JoPi,

    Are you able to share any of the details of the answer provided?

    David

  5. JoPi
    JoPi avatar
    8 posts
    Member since:
    Dec 2006

    Posted 10 May in reply to David Weinberg Link to this post

    Hi David,

    Happy to share the response.  It was only private because I was in a hurry and trying forums & support tickets...

    I've cut & paste the 2 emails for Telerik with my further questions in between....

    What you need is possible, but cannot be fully automated. You could create a reference Backend Services project and then duplicate it for each of your customers. The duplicate functionality only copies the structure (content types, fields) and does not copy any data. Each duplicate project will get its own API key and the data will be kept separately.

    Unfortunately, this cannot be fully automated at the moment, meaning you have to manually duplicate the project from the UI. I am not certain if this is good enough for your solution.

    Actually, the only missing part for the automation is the creation/duplication of the project. This is still not available as public API. We are planning to introduce it at some point. Once you have the project ready, you can use its master key for all administrative tasks related to it (initialize some data, etc.).

    Let me know if you have any other questions, I will be happy to help.

    Also, I'd like to offer our apologies for the late reply. 

    Regards,
    Lyubomir Dokov 
    Telerik

    Hi Lyubomir,
    Thank you for your reply.  This sounds fine and lack of automation not a problem since duplication copies structure :)
    I'm afriad I'm still new to AppBuilder/Javascript so could you clarify a few basics;
    1. to create a 'reference Backend Services project', I'm assuming I just create a New Project (Hybrid/blank) and add a Backend Services Project to it with Cloud Data etc. and then reference that project as shown here: http://docs.telerik.com/platform/backend-services/rest/administration-api/projects/managing-projects .  Could you confirm.
    2. I can't see how to duplicate a project from UI.  Could you just explain or provide links.
    Thanks

    The steps are basically as follows:
    You create an app from the Telerik Platform Web Portal.
    You add a Backend Services project to it and set up everything the way you need - content types, permissions, cloud code, etc. You will use this project as a reference - you will duplicate it for every different customer(or business) you have.
    Whenever you need to create a separate data store for a new business, you duplicate the Backend Services project created in step 2. You can find more about duplicating projects here.

    I am not sure how you want to use the different projects in your mobile app. Are you going to have different mobile apps built for each customer(business) or one app that will be able to work with all the businesses?

    In any case, duplicating the project will duplicate the structure and everything else you need and will give you a separate API key and data store. You can then use the API key for the business you want to work with.

    Note, that if you need to make a change on the project structure at a later time you will either have to do it manually on all the duplicated projects or you will have to automate it through the API.

    I hope this helps, let me know if you need more information.


    Regards,
    Lyubomir Dokov 
    Telerik

  6. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 12 May Link to this post


    @JoPi

    Thanks for sharing this information with the community.

    @David, JoPi

    Do not hesitate to post your further questions or considerations on the subject.


    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
Back to Top