Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dexie Cloud Feature request: user-specific public realm #1979

Open
dusty-phillips opened this issue May 5, 2024 · 0 comments
Open

Dexie Cloud Feature request: user-specific public realm #1979

dusty-phillips opened this issue May 5, 2024 · 0 comments

Comments

@dusty-phillips
Copy link
Contributor

The problem I am trying to solve: Individual users can have public data about themselves (a display name and profile image). If a user accepts an invite to a realm created by another user, I want the public data to be visible to both users.

Solutions I've considered:

  • Put all public data in the public realm. I don't like this because forcing all users to download all the profile images for all other users on the platform is suboptimal when any one user is only interacting with a subset of other users.
  • Copy each user's public data into the shared realm whenever a user requests/accepts an invite. I don't like this because each user has to sync a separate copy of their own public data for every profile they invite someone to or are invited to.
  • Create a single realm for each user's public data. Whenever I create a shared realm between two users, additionally invite each user to the other user's public data. In the default setup, this isn't ideal because both users have to accept an invite to the other's public data (in addition to the shared realm).
  • (addendum to above) I can theoretically work around this by creating a serverless endpoint that uses the dexie-cloud REST API to bypass invitations for these realms. But last time I tried force-inviting a user to a realm using the REST API it wasn't actually syncing the data to the client device (this may have been fixed since I reported it?) Also I don't like maintaining serverless endpoints if I can avoid it. :-D

Potential solutions that Dexie Cloud could consider:

  • Automatic shared realms: If a user invites another user AND the other user accepts the invite, both users get silently and implicitly added to a public realm shared by the other user. This seems quite elegant, but it doesn't generalize to any related problems.
  • Some kind of lazy sync mechanism: In the public realm or a new "lazyPublic" realm, somehow only load data into the user's database if it is explicitly requested. An advantage of this is that users' public data may become accessible without an invitation, which could be useful for social network style applications. Problem 1: How does the user even know what to request? Problem 2: How do users add stuff to this lazy-public realm without implicitly exposing every user's e-mail address publicly (via the owner field)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants