by bullen · 4y ago · 0 comments
If you remove marcus:
http://root.rupy.se/meta/user/user/marc
You get what the github GraphQL gives you, a paginatable JSON list.
This is the most intuitive and simple way to represent any data and the entire distributed db is 2000 lines of code.
* meta/users/marc <- the user we're querying, and where we can get his info
* meta/users/marc/sponsors <- every user who is a sponsor of marc
* meta/users/marc/sponsors/marcus <- is marcus one of marc's sponsors?
Of course it wouldn't be a forum oriented towards developers if 10 users didn't hold a dozen conflicting opinions.
The marc/marcus is related to those so for user/item it could be marc/sword f.ex.
The reason it's that way is that how it needs to be stored on disk.
The detail data (what the relation has as meta data is subordined to the relationship of nodes user/user), you can put anything that marc/marcus have in common in that JSON file. (I just added that we used to be colleagues)
Even if it feels awkward when you are used to wasteful structures once you know this is the least complex solution you will be thankful, specially in the long run since you wont have to learn anything else ever again.
And user/user/marcus/marc has it if marcus funds marc.