1 Reply Latest reply on Feb 27, 2014 1:26 PM by Lars Burgess

    Syncing multiple Sources in RhoConnect with different partitioning

    Steve Harman

      Hi,

       

      We have an established RhoMobile app and RhoConnect configuration using a .NET plugin to synchronize sources to RhoMobile models.

       

      Until now we have only have 1 Model/Source, and all was well, then came a requirement for a second source.

       

       

      Model 1 - Used 'user' partitioning as each user has different data in the model

      Model 2 - Should use 'app' partitioning because this model contains reference data that would be common across all users.

       

      With plugins, the partitioning is defined in the body of the response to the "POST /rc/v1/app/login" request (i.e. send 'app' for app partitioning and '<loginid>' for user partitioning). Am I correct in understanding then that all sources/models must use the same partitioning type? There seems to be no way I can see to enable Model 1 (user partitioned) and Model 2 (app partitioned). To get around this we are user partitioning both sources for now, but this is obviously quite wasteful for REDIS.

       

      Thanks.

        • Re: Syncing multiple Sources in RhoConnect with different partitioning

          With plugins, the partitioning is defined in the body of the response to the "POST /rc/v1/app/login" request (i.e. send 'app' for app partitioning and '<loginid>' for user partitioning). Am I correct in understanding then that all sources/models must use the same partitioning type? There seems to be no way I can see to enable Model 1 (user partitioned) and Model 2 (app partitioned). To get around this we are user partitioning both sources for now, but this is obviously quite wasteful for REDIS.

           

          The POST /rc/v1/app/login response does not technically mean the "partition type."  It represents the name or key of the user partition (the default key is just the username that was sent in the request).  Currently plugins only support user partitioning, so make sure your backend app model utilizes the same user naming convention that you return in the authenticate hook.