-
Notifications
You must be signed in to change notification settings - Fork 1
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
Flexible privacy rules #2
Comments
Hi! Thank you for your interest to my library.
Check documentation to get more details regarding visibility management |
Thank you for your reply! I've seen the documentation but it's still difficult for me to imagine how you would model something like avalon's visibility rules. Here's how I do it with my framework: https://github.com/hpx7/rtag/blob/d93e0eac9a1e467cf200013ae3544ee008a8940d/examples/avalon/server/impl.ts#L169-L188 The interesting part is |
The concept is simple and flexible: public objects/properties can be traced by all listeners, but private are available only for listeners with access tag. Also checkout magx-examples project - for example chat room. In chat example every user have own tag. All messages are private by default and hidden for all users. There are two ways how to make message visible (user can send public and private messages):
Try to make some experiments with private objects/properties and tags and you will get it. |
Great idea, try to port your game to magx, I'll try to help you. As for your case, it also looks pretty simple to implement state filtering using tags.
I have already implemented several games based on mosx state, including very dynamic ones. |
First of all, I wanted to say this library looks really cool! I think tracking state mutations and broadcasting deltas is a great way to model the data layer for games.
One question I had was how you think about privacy rules. I noticed you have a concept of "access tags" but I'm having difficulty imagining what kind of use cases this can support.
Some use cases I have in mind:
Are these use cases that can be modeled using access tags?
I've been working on a framework myself, but the approach I took for privacy was to allow for an user-defined function which can filter a custom view for each user. The downside of the approach is that computing diffs/deltas become much harder, which is why I wanted to explore other ways of modeling privacy.
The text was updated successfully, but these errors were encountered: