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
I wanted to share my thoughts on the ongoing discussion in PR #741. about whether to use Realm or RealmId.
The more I consider it, the more it seems that the name Realm is the natural choice. It is more an atomic concept, much like the concept of a region in AWS.
If we take a closer look at the current usage across Polaris—in documentation, error messages, and configurations—realm and realmId are already used interchangeably. In fact, in most cases, we simply use realm rather than realmId.
Here are a few examples in the Polaris repo:
Error Messages:
realm: <realm> root principal credentials: <client-id>:<client-secret>
Based on this consistency and the conceptual clarity it brings, I proposed two options:
Option 1, using the name realm instead of realmId throughout Polaris and still keeping the interface (public interface Realm) for dependency injection purposes. The interface can be extensible in case we want to add any subconcept to the realm, which may never happen to be honest.
Option 2, purely using a string for realm instead of an interface, this is simpler ultimately, but not extensible and needs more effort to refactor the current code.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
I wanted to share my thoughts on the ongoing discussion in PR #741. about whether to use
Realm
orRealmId
.The more I consider it, the more it seems that the name Realm is the natural choice. It is more an atomic concept, much like the concept of a
region
in AWS.If we take a closer look at the current usage across Polaris—in documentation, error messages, and configurations—
realm
andrealmId
are already used interchangeably. In fact, in most cases, we simply userealm
rather thanrealmId
.Here are a few examples in the Polaris repo:
Error Messages:
realm: <realm> root principal credentials: <client-id>:<client-secret>
Configurations:
Polaris.realm-context.realms
jdbc:h2:file:./build/test_data/polaris/{realm}/db
Documentation:
Proposal
Based on this consistency and the conceptual clarity it brings, I proposed two options:
realm
instead ofrealmId
throughout Polaris and still keeping the interface (public interface Realm
) for dependency injection purposes. The interface can be extensible in case we want to add any subconcept to the realm, which may never happen to be honest.realm
instead of an interface, this is simpler ultimately, but not extensible and needs more effort to refactor the current code.The text was updated successfully, but these errors were encountered: