Search Unity

Inheritable configs

Discussion in 'Unity Remote Config' started by RichLogan, Oct 5, 2020.

  1. RichLogan

    RichLogan

    Joined:
    Aug 11, 2015
    Posts:
    11
    Hi there, I was wondering if there are any plans for "inheritable" configs. I understand that the current priority system will cascade down, but I wanted to know if there was a way for a rule to inherit from a parent rule without the parent rule needing to know.

    For example:

    - I have a rule per geographical region to define some services.
    - A user's specific rule wants to base itself off of that region's rule, and maybe override other config.
    - The region rule shouldn't need to be altered to know about the users that use it.
    - I want to manage all of this purely through remote config (the user doesn't pick their region in the app for example).

    To accomplish this at the moment I am defining a number of "template" rules whose condition matches a user attribute that includes that template's name. Specific user rules have a JSON list of any templates they want to use.

    The application now fetches config twice: firstly to get the list of templates for the current user, then I can set that list as a user attribute, and then fetch again so it matches and brings in the specified "template" rules. This is working for me, but there's no logical link between these things beyond how I happen to be using it.

    Any plans to support anything like this? I could imagine a new config type of `Rules` where you could specific any additional rules to include (still respecting priority). Maybe this is edge case enough that the way I'm doing it is fine.
     
  2. peterle_unity

    peterle_unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    8
    Hi RichLogan!

    Thanks for your interest in Remote Config - this is a very interesting use-case!

    We don't today have anything to link Rules together with 'inheritance' - although we have some things planned for the future that might address this. For example, one thing we have been thinking about is allowing Rules to reference other Rules in their conditions - so if you had Rule_A and Rule_B, you could specify that Rule_B is only to be considered if Rule_A is applied for the requesting user. Would that approach work with your use-case?