2

I have spend some time reading on this subject from different forums and understood to achieve multi-tenancy use partition strategy concept.

But still open questions like below,

1- Using gremlin query how can we connect two different partition strategies at the same, meaning query data from multiple tenants for cross tenanted business analysis case

2 - How do we rebuild only certain partition(one tenant) of graph without impacting other tenant operations

FYI,

My company deals with multiple tenants, writing one tenant data at time, but reading multiple tenants data based on user logged into system.

VT0906
  • 87
  • 7

1 Answers1

3

Using gremlin query how can we connect two different partition strategies at the same, meaning query data from multiple tenants for cross tenanted business analysis case

If you are using PartitionStrategy then it is simply a matter of adding the appropriate "read partitions" to the strategy. For example if there are three tenants, "a", "b" and "c" and you only want to traverse partitions "a" and "c" then construct your PartitionStrategy as:

PartitionStrategy strategy = PartitionStrategy.build().
                                 partitionKey("_partition").readPartitions("a", "c").create()

How do we rebuild only certain partition(one tenant) of graph without impacting other tenant operations

I'm not sure what you mean by "rebuild only certain partition" - if you can clarify your meaning I can try to answer.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Hi Stephen, Thanks for th reply. about the second question, in a multi tenant environment, rebuilding meaning, refreshing data of certain tenant only without impact other tenants in partition strategy. – VT0906 Jan 10 '20 at 23:07
  • also, if i can't use partition strategy for security and compliance reasons, and using separate graph for each customer can i still do a query across multiple graphs ? – VT0906 Jan 10 '20 at 23:14
  • "refreshing"/"rebuilding" - i'm sorry but neither of those words help me understand what you'd like to do. do you mean that you have to delete a tenants data and put it back for some reason? if you use a separate graph for each tenant you cannot query across multiple graphs. – stephen mallette Jan 11 '20 at 11:48
  • Thanks Stephen, refreshing - Lets say i have backup data in another SQL DB which needs to pushed back to graph. the reasons data lying around in other database technology is depends on customer. Other reason to do refreshing data is to change things at schema level. – VT0906 Jan 14 '20 at 19:20
  • i'm not sure what you can to not affect your other tenants if you have to remove data they rely and then put it back without taking any downtime. i guess if i had to do that, i might try to load the refreshed data to a new partition (keeping the old one in place) and then modify the read partition of the tenants to point at the new one. then, when no tenants are looking at the old one, you just bulk delete that. – stephen mallette Jan 14 '20 at 19:24
  • The gives some clarifications, Thanks stephen – VT0906 Jan 16 '20 at 19:19