Skip to content

Module-level subscriptions #2445

@Superxwolf

Description

@Superxwolf

Hello,

First of, amazing job with this database. The level of dedication and commitment to innovating tech definitively shows a lot of progress! I can see the potential for SpacetimeDB not only for gaming, but for more general purpose business application, with the exception of the current client permission scheme. While RLS is a good step, what if you allow modules to subscribe users to queries rather than just relying on the client side to manage it? Most business application require stricter rule around data management that would better fit on the server side. Combining module-based subscription and allowing an option to disallow client subscriptions means you could choose to control the subscriptions exclusively on the server side via reducers.

I wanted to give a good gaming example where this change can grant better flexibility with data; Lets say we have a table for player's inventory and players should only see their own inventory. This can be implemented with RLS, however if the developer wants to integrate pickpocketing players via a special skill or item, RLS would block any way for the client to get temporary visibility to another player's inventory.

I started looking through the code to see how viable this is, however I have no experience with Rust, yet I'd love to help where I can with this.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions