This is a problem I have personally spent several years thinking about and working on. The trick IMO will be to build it incrementally from what we already have. For anyone interested, here's my take on it: https://membrane.io
The TL;DR is that I've been building a orthogonally persistent, message-based, user centric, programmable (js/ts) graph