phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Huffman <>
Subject Shared Multi-Tenant Views
Date Mon, 26 Dec 2016 16:45:29 GMT
I'm starting on a project in which I will have multi-tenant data, but some
of that data will be shared with access controlled by an out-of-band ACL
management system in my application.

Tenants will be creating records in a single table, and creating views that
will add dynamic columns to the table specific to their own record types.
They will also be creating indexes on these views/dynamic columns.

If I want to promote one of these tenant views to a globally accessible
view I am kind of stuck. If I connect without the TenantID property I can
see all the data in the base table of course, but without the indexes it
would be impractical to use it.

I was planning to proceed without multi-tenant features enabled and just
handle that myself in my application logic, but then I run up against a
limit of indexed views - the VIEW_INDEX_ID is a smallint in CATALOG. If my
project is successful it would quickly exceed 65K indexed views.

What would be ideal is if tenants could create unqualified views that are
accessible like a non-multi-tenant table is accessible. So they may start
by creating their own tenant view, then decide to share that by creating a
"global" view based on it that could be queried by any tenant.

Another - maybe simpler feature would be if unqualified connection could
use indexed views - maybe by qualifying them with the tenant_id.

Any other ideas for how to enable this type of sharing functionality in
Phoenix as it presently exists? Otherwise I think what I may be facing is
to work with my own fork of Phoenix and modify the VIEW_INDEX_ID to be an



View raw message