You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this requirement we can store the user roles in a new column userRoles in FeatureFlagUserMapping table, but this will lead to inconsistency when the user roles gets updated, it also needs to be updated in FeatureFlagUserMapping table.
Have a new table for UserRolesFeatureFlagMapping which has the combination of roles to flagIds with status.
Here we pass the user roles from the calling service.
The amount of data transfer via the network increases in this approach. (We are transmitting the user roles and this data can increase over time).
Approach 2:
In this we don't store the roles in feature flag DDB tables and fetch them from the firebase User tables, so here we will have the user roles consistent, as we have single data source.
Any update on roles will be updated in Users table.
We can do this by querying the user data from the userId which is passed from the consumer service.
We need to think of caching on User's API which fetches details by userId
Two ways which we can have is directly talking to firestore or querying using website-backend
In case of querying using website-backend, if the feature flag's user roles API throughput increases website backend's users userId API throughput also increases, which isn't the right way.
The text was updated successfully, but these errors were encountered:
I think we should first define what we mean by roles here
If by roles, we mean only member, super_user, and admin roles then the number of times the user roles get updated is not that frequent.
(We are transmitting the user roles and this data can increase over time).
I am not sure I understand this. How will the data increase over time?
I think whichever approach we take, we will have to store the mapping of flagId to user roles. For example, in approach 2 when a request comes in to check if the feature flag is enabled for a userId then without storing the information of roles and flag Id mapping we won't be able to give a result.
We also need to think about which will have more priority in case of a difference where the feature flag is enabled for a userId but its disabled for the role of the same user or vice versa.
Consider a scenario, that a developer with role=user working on a feature that will only roll out to role=members users need to also get access to the feature for testing. I think to handle such scenarios we will have to query both the tables of flagId, userId mapping & flagId, roles mapping (assuming we store them in separate tables) and in the case of approach 2 we will also be querying the Firestore tale to get the users role.
The features which we have planned in V2 are
Approach 1:
userRoles
inFeatureFlagUserMapping
table, but this will lead to inconsistency when the user roles gets updated, it also needs to be updated inFeatureFlagUserMapping
table.UserRolesFeatureFlagMapping
which has the combination of roles to flagIds with status.Approach 2:
Users
table.userId
which is passed from the consumer service.userId
The text was updated successfully, but these errors were encountered: