Closed leblancmeneses closed 9 years ago
I would add jsdoc comments but I don't fully know the args for query or interface requirements you have on "message".
That said I haven't had much exposure with typescript and am wondering if this project may benefit more from typescript than traditional js/jsdoc approach.
It might benefit from Typescript. Let's explore that route.
We'll need to do something different with classes and "new". I don't want different modules to get different instances. If I query in one file, and add a fact in another, the query should hit.
// Create a connection to your Firebase database
var ref = new Firebase("https://<YOUR-FIREBASE-APP>.firebaseio.com");
If someone needs to maintain the original reference use dependency injection framework to handle that e.g. angularjs factory. I recommend the framework use classes.
For the backend I remember you mentioning you are using a nested set model to store the facts. How does that perform for queries (indexes/partitions)? For tenancy I would assume creating a root node for the tenant.
That's a good point. OK, let's do that.
Queries are turned into a tree of predecessor/successor joins. Facts are stored in a tree with predecessor/successor references. To run a query, choose a starting point, and then walk the fact tree using the instructions in the join tree.
And, yes, tenancy will be represented as root nodes.
initial jinaga class