phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: Shared Multi-Tenant Views
Date Tue, 27 Dec 2016 16:37:54 GMT
Hi Jeremy,
Please file a JIRA for VIEW_INDEX_ID to be an int. The code would just need
to be tolerant when reading the data if the length is two byte short versus
four byte int. At write time, we'd just always write an int. If you could
put together a patch that maintains backward compatibility, we'd be willing
to pull it in.

I like the idea of using the tenant-specific index when accessed globally
with that tenant ID. Please file a JIRA for this as well. Sharing of tenant
specific indexes across different tenants might be a bit tricky, though, as
each tenant would have different tenant-specific columns (potentially even
with conflicting/different types).

Thanks,
James

On Mon, Dec 26, 2016 at 8:45 AM, Jeremy Huffman <jeremy@jeremyhuffman.com>
wrote:

> 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
> int.
>
>
> Regards,
>
> Jeremy
>

Mime
View raw message