Design Implementation : User Defined Relationships
It has always a goal to have completely user defined relationships, but it just occurred to me that this could occur sooner rather than later. What happened was that I was thinking about relationships as a linear progression of access privileges, from BLOCKED all the way up to FAVORITE. When I started thinking about implementation, I realized that these are best represented as a linear integer values. But then, if user relationships are defined more-so by their integer value than by their REL_TYPE in the database then why not allow users to define arbitrary relationship types and only do work based on the integer value?
So at a basic level, it's definitely possible. A extra call to WHERE rel.value
as opposed to directly comparing the REL_TYPE probably isn't the biggest performance loss. The biggest issue is going to be figuring out how to communicate mapping certain functions (the ability to private message someone, post visibility, etc) onto the different types of relationships, since relationships won't be mapped directly to certain functions.
For example, for you private messaging can be an r.value=50, and you can define relationships of r.value=45 and r.value=55, so that the only feature that switches on between those values is the ability to private message you.
There can probably also have the ability to directly set the r.value you have with someone (so essentially a trust slider), without also having to set a specific text based relationship type (example: Friend). This is honestly just a logical progression of doing most of the functions relative to r.value instead of relationship type, but opens up another issue where it's going to be hard to communicate between users the meaning of different r.values.
TLDR: its difficult to do, mainly because we will no longer be working off the model of relationships between online users that was "pioneered" by facebook. Which means there are going to be a lot of problems to which we will need to come up with completely new solutions.
It's a double edged sword TBH, but probably worth it?